-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·52 lines (35 loc) · 1.28 KB
/
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
46
47
48
49
50
51
52
CXX = $(shell wx-config --cxx) -ggdb -fdiagnostics-color=auto -Wfatal-errors
OBJDIR = obj
OBJVENDORDIR = obj/vendor
SRCDIR = src
SRCVENDORDIR = src/vendor
BINDIR = bin
WX_FLAGS = `wx-config --cxxflags`
WX_LIBS = `wx-config --libs --gl-libs`
LIBS = $(WX_LIBS) -lGL -lGLU -lglew
PROGRAM = $(BINDIR)/generator
OBJ_NAMES = Canvas MapSurfaceVisualisation MapIO SimpleCanvas Window Objects Island HexPointSelector SquarePointSelector RandomPointSelector PoissonPointSelector RadialMapShaper RoundMapShaper CrescentMapShaper SquareMapShaper BlobMapShaper GraphVisualisation Generator
OBJECTS = $(addsuffix .o, $(addprefix $(OBJDIR)/, $(OBJ_NAMES)))
OBJ_VENDOR = VoronoiDiagramGenerator PDSampling
OBJECTSVENDOR = $(addsuffix .o, $(addprefix $(OBJVENDORDIR)/, $(OBJ_VENDOR)))
.SUFFIXES: .o .cpp
all: $(PROGRAM)
run: $(PROGRAM)
./$(PROGRAM)
debug: $(PROGRAM)
gdb -ex run $(PROGRAM)
$(OBJDIR):
mkdir -p $(OBJDIR)
$(OBJVENDORDIR):
mkdir -p $(OBJVENDORDIR)
$(BINDIR):
mkdir -p $(BINDIR)
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp $(OBJDIR)
$(CXX) -c $(WX_FLAGS) -o $@ $<
$(OBJVENDORDIR)/%.o: $(SRCVENDORDIR)/%.cpp $(OBJVENDORDIR)
$(CXX) -c $(WX_FLAGS) -o $@ $<
$(PROGRAM): $(OBJECTS) $(OBJECTSVENDOR) $(BINDIR)
$(CXX) -o $(PROGRAM) $(OBJECTS) $(OBJECTSVENDOR) $(LIBS)
clean:
rm -rf $(BINDIR)
rm -rf $(OBJDIR)