-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile
45 lines (37 loc) · 932 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
INCLUDE=-I"src"
OPTIMIZE=-O3
CXXFLAGS=$(OPTIMIZE) $(INCLUDE) -c -std=c++11 -Wall
LDFLAGS=
LDLIBS=
.PHONY: all clean
SOURCEPATH=src
SOURCES=$(SOURCEPATH)/aabb.cpp \
$(SOURCEPATH)/fluidsimulation.cpp \
$(SOURCEPATH)/interpolation.cpp \
$(SOURCEPATH)/levelsetutils.cpp \
$(SOURCEPATH)/macvelocityfield.cpp \
$(SOURCEPATH)/main.cpp \
$(SOURCEPATH)/meshlevelset.cpp \
$(SOURCEPATH)/particlelevelset.cpp \
$(SOURCEPATH)/pressuresolver.cpp \
$(SOURCEPATH)/trianglemesh.cpp \
$(SOURCEPATH)/viscositysolver.cpp \
$(SOURCEPATH)/vmath.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=fluidsim
ifeq ($(OS),Windows_NT)
RM = del /F /Q
SEP=\\
ERRIGNORE = 2>NUL || true
else
RM = rm -rf
SEP=/
ERRIGNORE = 2>/dev/null
endif
all: $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CXX) $(LDFLAGS) $(OBJECTS) $(LDLIBS) -o $@
.cpp.o:
$(CXX) $(CXXFLAGS) $< -o $@
clean:
@$(RM) $(SOURCEPATH)$(SEP)*.o $(EXECUTABLE)* $(ERRIGNORE)