-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
fdobad
committed
Sep 2, 2024
1 parent
4b723b5
commit 3c6d5c2
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Compiler and flags | ||
CXX = clang++ | ||
CXXFLAGS = -Wall -Wextra -std=c++11 | ||
LDFLAGS = -lm -lpthread -ltiff -L$(OPT)/libtiff/lib | ||
|
||
# Source files | ||
SRCS = Cell2Fire.cpp Cells.cpp FuelModelSpain.cpp FuelModelKitral.cpp FuelModelFBP.cpp Spotting.cpp ReadCSV.cpp ReadArgs.cpp Lightning.cpp WriteCSV.cpp Ellipse.cpp DataGenerator.cpp | ||
|
||
# Object files | ||
OBJS = $(SRCS:.cpp=.o) | ||
|
||
# Targets | ||
TARGET_ARM64 = Cell2Fire_arm64 | ||
TARGET_X86_64 = Cell2Fire_x86_64 | ||
|
||
# Default target | ||
all: $(TARGET_ARM64) $(TARGET_X86_64) | ||
|
||
# Build for arm64 | ||
$(TARGET_ARM64): $(OBJS) | ||
$(CXX) $(CXXFLAGS) -arch arm64 -o $@ $^ $(LDFLAGS) | ||
|
||
# Build for x86_64 | ||
$(TARGET_X86_64): $(OBJS) | ||
$(CXX) $(CXXFLAGS) -arch x86_64 -o $@ $^ $(LDFLAGS) | ||
|
||
# Compile source files to object files | ||
%.o: %.cpp | ||
$(CXX) $(CXXFLAGS) -c $< -o $@ | ||
|
||
# Clean up build artifacts | ||
clean: | ||
rm -f $(OBJS) $(TARGET_ARM64) $(TARGET_X86_64) |