forked from inet-framework/inet
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
50 lines (36 loc) · 1.62 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
FEATURETOOL = opp_featuretool
FEATURES_H = src/inet/features.h
.PHONY: all clean cleanall makefiles makefiles-so makefiles-lib makefiles-exe checkmakefiles doxy doc submodule-init
all: checkmakefiles $(FEATURES_H)
@cd src && $(MAKE)
clean: checkmakefiles
@cd src && $(MAKE) clean
cleanall: checkmakefiles
@cd src && $(MAKE) MODE=release clean
@cd src && $(MAKE) MODE=debug clean
@rm -f src/Makefile $(FEATURES_H)
MAKEMAKE_OPTIONS := -f --deep -o INET -O out -pINET -I.
makefiles: makefiles-so
makefiles-so: $(FEATURES_H)
@FEATURE_OPTIONS=$$($(FEATURETOOL) options -f -l) && cd src && opp_makemake --make-so $(MAKEMAKE_OPTIONS) $$FEATURE_OPTIONS
makefiles-lib: $(FEATURES_H)
@FEATURE_OPTIONS=$$($(FEATURETOOL) options -f -l) && cd src && opp_makemake --make-lib $(MAKEMAKE_OPTIONS) $$FEATURE_OPTIONS
makefiles-exe: $(FEATURES_H)
@FEATURE_OPTIONS=$$($(FEATURETOOL) options -f -l) && cd src && opp_makemake $(MAKEMAKE_OPTIONS) $$FEATURE_OPTIONS
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
# generate an include file that contains all the WITH_FEATURE macros according to the current enablement of features
$(FEATURES_H): $(wildcard .oppfeaturestate) .oppfeatures
@$(FEATURETOOL) defines >$(FEATURES_H)
doc:
@cd doc/src && $(MAKE)
@doxygen doxy.cfg
ddoc:
@cd doc/src && ./docker-make html && echo "===> file:$$(pwd)/_build/html/index.html"