-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (41 loc) · 1.12 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
CC=gcc
CFLAGS=-g
TARGET: test.exe CommandParser/libcli.a
LIBS=-lpthread -L ./CommandParser -lcli
OBJS=gluethread/glthread.o \
graph.o \
topologies.o \
net.o \
nwcli.o \
utils.o \
comm.o \
layer2/layer2.o
test.exe:testapp.o ${OBJS} CommandParser/libcli.a
${CC} ${CFLAGS} testapp.o ${OBJS} -o test.exe ${LIBS}
testapp.o:testapp.c
${CC} ${CFLAGS} -c testapp.c -o testapp.o
gluethread/glthread.o:gluethread/glthread.c
${CC} ${CFLAGS} -c -I gluethread gluethread/glthread.c -o gluethread/glthread.o
graph.o:graph.c
${CC} ${CFLAGS} -c -I . graph.c -o graph.o
topologies.o:topologies.c
${CC} ${CFLAGS} -c -I . topologies.c -o topologies.o
net.o: net.c
${CC} ${CFLAGS} -c -I . net.c -o net.o
nwcli.o:nwcli.c
${CC} ${CFLAGS} -c -I . nwcli.c -o nwcli.o
CommandParser/libcli.a:
(cd CommandParser; make)
comm.o:comm.c
${CC} ${CFLAGS} -c -I . comm.c -o comm.o
Layer2/layer2.o:Layer2/layer2.c
${CC} ${CFLAGS} -c -I . Layer2/layer2.c -o Layer2/layer2.o
clean:
rm *.o
rm gluethread/glthread.o
rm layer2/layer2.o
rm *.exe
(cd CommandParser; make clean)
all:
make
(cd CommandParser; make)