-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
31 lines (22 loc) · 896 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
CXX = g++ --std=c++0x
JSONPATH = jsoncpp-src-0.5.0/include
FLAGS = -Wall -L/usr/local/lib -Wl,-rpath=/usr/local/lib -I$(JSONPATH)
LIBS = -lpthread
TARGET = flows.out
JSON_OBJECTS = jsoncpp-src-0.5.0/src/lib_json/json_reader.o \
jsoncpp-src-0.5.0/src/lib_json/json_value.o \
jsoncpp-src-0.5.0/src/lib_json/json_writer.o
BASE_SOURCES = $(wildcard */*.cpp) $(wildcard *.cpp)
BASE_OBJ = ${BASE_SOURCES:.cpp=.o}
BASE_OBJECTS = ${BASE_OBJ:.c=.o}
OBJECTS = ${BASE_OBJECTS} ${JSON_OBJECTS}
all: ${TARGET}
${TARGET}: ${OBJECTS}
${CXX} ${FLAGS} -o ${TARGET} ${OBJECTS} ${LIBS}
clean:
tmpfolder=`echo /tmp/CF-clean-$$$$.removed` && mkdir -p $$tmpfolder && touch a && mv -t $$tmpfolder/ a `for a in ${OBJECTS} ${TARGET} *~ base/*~ user/*~ ; do if [ -e $$a ]; then echo $$a; fi; done`
.cpp.o:
${CXX} ${FLAGS} -c $< -o $@
.c.o:
${CXX} ${FLAGS} -c $< -o $@
.PHONY: all clean submit