-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
51 lines (44 loc) · 1.73 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
###
# Location of INET project directory (relative to './src/' and './simulations/'):
#
INET ?= ../../inet
NESTING ?= ./../nesting
#
###
.PHONY: all clean cleanall makefiles checkmakefiles
all: checkmakefiles
cd src && $(MAKE)
cd simulations && $(MAKE)
clean: checkmakefiles
cd src && $(MAKE) clean
cd simulations && $(MAKE) clean
cleanall: checkmakefiles
@cd src && $(MAKE) MODE=release clean
@cd src && $(MAKE) MODE=debug clean
@rm -f src/Makefile
@cd simulations && $(MAKE) MODE=release clean
@cd simulations && $(MAKE) MODE=debug clean
@rm -f simulations/Makefile
###
# Command line arguments for 'opp_makemake' generated by IDE using meta flags
# '--meta:use-exported-include-paths'
# '--meta:use-exported-libs'
# for correct resolution of INET dependencies (cf. '.oppbuildspec'):
#
#MAKEMAKE_OPTIONS = -f --deep -o detnetmod -O out -KINET_PROJ=$(INET) -DINET_IMPORT -I'$$(INET_PROJ)/src' -L'$$(INET_PROJ)/src' -l'INET$$(D)'
MAKEMAKE_OPTIONS = -f --deep -o detnetmod -O out -KINET_PROJ=../../inet -KNESTING_PROJ=../../nesting -DINET_IMPORT -I$$\(INET_PROJ\)/src -I$$\(NESTING_PROJ\)/simulations -I$$\(NESTING_PROJ\)/src -L$$\(INET_PROJ\)/src -L$$\(NESTING_PROJ\)/src -L../out/$$\(CONFIGNAME\)/src -lINET$$\(D\) -lnesting$$\(D\)
#
###
makefiles:
@cd src && opp_makemake --make-so $(MAKEMAKE_OPTIONS)
@cd simulations && opp_makemake $(MAKEMAKE_OPTIONS)
checkmakefiles:
@if [ ! -f src/Makefile -o ! -f simulations/Makefile ]; then \
echo; \
echo ' ---------------------------------------------------------'; \
echo '| Makefiles in "src/" and/or "simulations/" do not exist. |'; \
echo '| Please use "make makefiles" to generate them! |'; \
echo ' ---------------------------------------------------------'; \
echo; \
exit 1; \
fi