Skip to content

Commit

Permalink
aa
Browse files Browse the repository at this point in the history
  • Loading branch information
fdobad committed Sep 2, 2024
1 parent 4b723b5 commit 3c6d5c2
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Cell2Fire/makefile.macos-test
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)

0 comments on commit 3c6d5c2

Please sign in to comment.