forked from cs7org/veins3d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
70 lines (59 loc) · 1.89 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
.PHONY: all makefiles clean cleanall doxy
# if out/config.py exists, we can also create command line scripts for running simulations
ADDL_TARGETS =
ifeq ($(wildcard out/config.py),)
else
ADDL_TARGETS += run debug memcheck
endif
# default target
all: src/Makefile $(ADDL_TARGETS)
@cd src && $(MAKE)
# command line scripts
run debug memcheck: % : src/scripts/%.in.py out/config.py
@echo "Creating script \"./$@\""
@head -n1 "$<" > "$@"
@cat out/config.py >> "$@"
@tail -n+2 "$<" >> "$@"
@chmod a+x "$@"
# legacy
makefiles:
@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
clean: src/Makefile
cd src && $(MAKE) clean
rm -f run debug memcheck
cleanall: src/Makefile
cd src && $(MAKE) MODE=release clean
cd src && $(MAKE) MODE=debug clean
rm -f src/Makefile
rm -f run debug memcheck
src/Makefile:
@echo
@echo '====================================================================='
@echo '$@ does not exist.'
@echo 'Please run "./configure" or use the OMNeT++ IDE to generate it.'
@echo '====================================================================='
@echo
@exit 1
out/config.py:
@echo
@echo '====================================================================='
@echo '$@ does not exist.'
@echo 'Please run "./configure" to generate it.'
@echo '====================================================================='
@echo
@exit 1
# autogenerated documentation
doxy:
doxygen doxy.cfg
doxyshow: doxy
xdg-open doc/doxy/index.html