-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
59 lines (45 loc) · 1.25 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
53
54
55
56
57
58
59
CXX=g++
CFLAGS=-g -std=c++17 -Wall
TARGET:test.out
LIBS= -L ./CommandParser -lcli -lrt -lpthread
OBJS=graph.o \
topologies.o \
net.o \
color.o \
nwcli.o \
comm.o \
packet_dump.o \
Layer2/layer2.o \
Layer2/l2switch.o
test.out:testapp.o ${OBJS} CommandParser/libcli.a
${CXX} ${CFLAGS} testapp.o ${OBJS} -o test.out ${LIBS}
testapp.o:testapp.cpp
${CXX} ${CFLAGS} -c testapp.cpp -o testapp.o
graph.o:graph.cpp
${CXX} ${CFLAGS} -c -I . graph.cpp -o graph.o
topologies.o:topologies.cpp
${CXX} ${CFLAGS} -c -I . topologies.cpp -o topologies.o
net.o:net.cpp
${CXX} ${CFLAGS} -c -I . net.cpp -o net.o
color.o:color.cpp
${CXX} ${CFLAGS} -c -I . color.cpp -o color.o
nwcli.o:nwcli.cpp
${CXX} ${CFLAGS} -c -I . -o nwcli.o nwcli.cpp
comm.o:comm.cpp
${CXX} ${CFLAGS} -c -I . -o comm.o comm.cpp
packet_dump.o:packet_dump.cpp
${CXX} ${CFLAGS} -c -I . -o packet_dump.o packet_dump.cpp
Layer2/layer2.o:Layer2/layer2.cpp
${CXX} ${CFLAGS} -c -I . Layer2/layer2.cpp -o Layer2/layer2.o
Layer2/l2switch.o:Layer2/l2switch.cpp
${CXX} ${CFLAGS} -c -I . Layer2/l2switch.cpp -o Layer2/l2switch.o
CommandParser/libcli.a:
(cd CommandParser; make)
clean:
rm -f *.o
rm -f Layer2/*.o
rm -f *.out
(cd CommandParser; make clean)
all:
make
(cd CommandParser; make)