-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
48 lines (37 loc) · 793 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
46
47
CC=g++ -fpic -g
ifeq ($(DEBUG),yes)
CXXFLAGS=-Wall -g
LDFLAGS=-Wall -g
else
CXXFLAGS=-Wall
LDFLAGS=-Wall
endif
INCPATH=inc
SRCPATH=src
OBJPATH=obj
LIBPATH=lib
BINPATH=bin
SRC=$(SRCPATH)/State_Base.cpp \
$(SRCPATH)/State.cpp \
$(SRCPATH)/A_Star.cpp \
$(SRCPATH)/main.cpp \
$(SRCPATH)/PriorMap.cpp
OBJ=$(OBJPATH)/State_Base.o \
$(OBJPATH)/State.o \
$(OBJPATH)/A_Star.o \
$(OBJPATH)/main.o \
$(OBJPATH)/PriorMap.o
EXEC=$(BINPATH)/example
INCLUDES=-I ./$(INCPATH)
default: $(EXEC)
$(EXEC): $(OBJ)
# $(CC) $(LDFLAGS) -o $@ $^
$(CC) -shared -o lib/libastar.so $(OBJ)
$(OBJPATH)/%.o: $(SRCPATH)/%.cpp
$(CC) $(CXXFLAGS) $(INCLUDES) -c $< -o $@
.PHONY: clean cleanall
clean:
rm -f $(OBJPATH)/*.o
rm -f lib/libastar.so
cleanall: clean
rm -f $(EXEC)