-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·53 lines (37 loc) · 1.05 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
include Makefile.inc
.PHONY: all clean distclean lib error conf doc
TARGETS=lib main
all: lib
${CC} ${CFLAGS} main.c -Isrc -Lsrc -lmbn ${LFLAGS} -o main
main: all
gateway: all
lib: force_look
${MAKE} -C src/
clean:
${MAKE} -C src/ clean
${MAKE} -C doc/ clean
rm -f main
distclean: clean
rm Makefile.inc
Makefile.inc: Makefile.inc.in
@if [ "`uname`" = 'Linux' ]; then\
echo "Detected target: linux";\
sed 's/PLATFORM=/PLATFORM=linux/' Makefile.inc.in |\
sed 's/#IF_ETHERNET=/IF_ETHERNET=if_eth_linux/' |\
sed 's/#IF_TCP=/IF_TCP=if_tcp/' |\
sed 's/#IF_UDP=/IF_UDP=if_udp/' |\
sed 's/#IF_UNIX=/IF_UNIX=if_unix/' > Makefile.inc;\
else\
echo "Detected target: mingw";\
sed 's/PLATFORM=/PLATFORM=mingw/' Makefile.inc.in |\
sed 's/#IF_ETHERNET=/IF_ETHERNET=if_eth_wpcap/' |\
sed 's/#IF_TCP=/IF_TCP=if_tcp/' |\
sed 's/#IF_UDP=/IF_UDP=if_udp/' > Makefile.inc;\
fi
@echo "Autogenerated Makefile.inc, you may want to make some modifications"
@false
conf: Makefile.inc
config: Makefile.inc
doc:
${MAKE} -C doc/
force_look: