-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
124 lines (102 loc) · 4.07 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# SPDX-FileCopyrightText: 2021 Mario Franke <[email protected]>
#
# SPDX-License-Identifier: GPL-2.0-or-later
.PHONY: all space_veins clean_space_veins cleanall_space_veins inet clean_inet cleanall_inet veins_inet clean cleanall makefiles spaceVeinsMakefiles inetMakefiles veinsInetMakefiles checkmakefiles checkInetMakefiles checkVeinsInetMakefiles veins veinsMakefiles checkVeinsMakefiles
all: space_veins
@echo 'space_Veins compiled successfully'
# command line scripts
bin/space_veins_run: src/scripts/space_veins_run.in.py
@echo "Creating script \"$@\""
@mkdir -p bin
@sed '/# v-- contents of out\/config.py go here/r out/config.py' "$<" > "$@"
@chmod a+x "$@"
space_veins: checkmakefiles bin/space_veins_run veins_inet
cd src && $(MAKE) MODE=release
cd src && $(MAKE) MODE=debug
clean_space_veins: checkmakefiles
cd src && $(MAKE) clean
cleanall_space_veins: checkmakefiles
cd src && $(MAKE) MODE=release clean
cd src && $(MAKE) MODE=debug clean
rm -f src/Makefile
rm -rf out/config.py
rm -rf build/
inet: checkInetMakefiles
cd lib/inet/src && $(MAKE) MODE=release
cd lib/inet/src && $(MAKE) MODE=debug
clean_inet: checkInetMakefiles
cd lib/inet && $(MAKE) clean
cleanall_inet: checkInetMakefiles
cd lib/inet && $(MAKE) cleanall
veins: checkVeinsMakefiles
cd lib/veins/src && $(MAKE) MODE=release
cd lib/veins/src && $(MAKE) MODE=debug
cd lib/veins && $(MAKE) bin/veins_run
veins_inet: checkVeinsInetMakefiles veins inet
cd lib/veins/subprojects/veins_inet/src && $(MAKE) MODE=release
cd lib/veins/subprojects/veins_inet/src && $(MAKE) MODE=debug
clean: checkmakefiles checkInetMakefiles checkVeinsInetMakefiles
cd src && $(MAKE) clean
cd lib/inet && $(MAKE) clean
cd lib/veins/subprojects/veins_inet/src && $(MAKE) clean
cleanall: checkmakefiles checkInetMakefiles checkVeinsInetMakefiles
rm -rf out/config.py
rm -rf bin
cd src && $(MAKE) MODE=release clean
cd src && $(MAKE) MODE=debug clean
rm -f src/Makefile
cd lib/inet && $(MAKE) cleanall
rm -rf lib/inet/out
cd lib/veins && $(MAKE) cleanall
cd lib/veins/subprojects/veins_inet && $(MAKE) cleanall
makefiles: inetMakefiles veinsMakefiles veinsInetMakefiles spaceVeinsMakefiles
spaceVeinsMakefiles:
@echo
@echo '====================================================================='
@echo 'Warning: make makefiles has been deprecated in favor of ./configure'
@echo '====================================================================='
@echo
./configure
@echo
@echo '====================================================================='
@echo 'Warning: make makefiles has been deprecated in favor of ./configure'
@echo '====================================================================='
@echo
inetMakefiles:
cd lib/inet && opp_featuretool reset
cd lib/inet && $(MAKE) src/inet/features.h
cd lib/inet && $(MAKE) makefiles
veinsMakefiles:
cd lib/veins && ./configure
veinsInetMakefiles:
cd lib/veins/subprojects/veins_inet && ./configure
checkmakefiles:
@if [ ! -f src/Makefile ]; then \
echo; \
echo '======================================================================='; \
echo 'src/Makefile does not exist. Please use "make makefiles" to generate it!'; \
echo '======================================================================='; \
echo; \
exit 1; \
fi
checkInetMakefiles:
cd lib/inet && $(MAKE) checkmakefiles
checkVeinsMakefiles:
@if [ ! -f lib/veins/src/Makefile ]; then \
echo; \
echo '======================================================================='; \
echo 'lib/veins/src/Makefile does not exist. Please use "make veinsMakefiles" to generate it!'; \
echo '======================================================================='; \
echo; \
exit 1; \
fi
checkVeinsInetMakefiles:
@if [ ! -f lib/veins/subprojects/veins_inet/src/Makefile ]; then \
echo; \
echo '======================================================================='; \
echo 'lib/veins/subprojects/veins_inet/src/Makefile does not exist.';\
echo 'Please use "make veinsInetMakefiles" to generate it!'; \
echo '======================================================================='; \
echo; \
exit 1; \
fi