Switch to unified view

a/Makefile b/Makefile
1
all: checkmakefiles
1
#
2
  cd src && $(MAKE)
2
# OMNeT++/OMNEST Makefile for rina
3
#
4
# This file was generated with the command:
5
#  opp_makemake -f --deep --nolink -O out -d policies -d src -X. -L./out/$$\(CONFIGNAME\)/policies -L./out/$$\(CONFIGNAME\)/src
6
#
3
7
4
clean: checkmakefiles
8
# Output directory
5
  cd src && $(MAKE) clean
9
PROJECT_OUTPUT_DIR = out
10
PROJECTRELATIVE_PATH =
11
O = $(PROJECT_OUTPUT_DIR)/$(CONFIGNAME)/$(PROJECTRELATIVE_PATH)
6
12
7
cleanall: checkmakefiles
13
#------------------------------------------------------------------------------
8
  cd src && $(MAKE) MODE=release clean
9
  cd src && $(MAKE) MODE=debug clean
10
  rm -f src/Makefile
11
14
12
makefiles:
15
# Pull in OMNeT++ configuration (Makefile.inc or configuser.vc)
13
  cd src && opp_makemake -f --deep
14
16
15
checkmakefiles:
17
ifneq ("$(OMNETPP_CONFIGFILE)","")
16
  @if [ ! -f src/Makefile ]; then \
18
CONFIGFILE = $(OMNETPP_CONFIGFILE)
17
  echo; \
19
else
18
  echo '======================================================================='; \
20
ifneq ("$(OMNETPP_ROOT)","")
19
  echo 'src/Makefile does not exist. Please use "make makefiles" to generate it!'; \
21
CONFIGFILE = $(OMNETPP_ROOT)/Makefile.inc
20
  echo '======================================================================='; \
22
else
21
  echo; \
23
CONFIGFILE = $(shell opp_configfilepath)
22
  exit 1; \
24
endif
23
  fi
25
endif
26
27
ifeq ("$(wildcard $(CONFIGFILE))","")
28
$(error Config file '$(CONFIGFILE)' does not exist -- add the OMNeT++ bin directory to the path so that opp_configfilepath can be found, or set the OMNETPP_CONFIGFILE variable to point to Makefile.inc)
29
endif
30
31
include $(CONFIGFILE)
32
33
# we want to recompile everything if COPTS changes,
34
# so we store COPTS into $COPTS_FILE and have object
35
# files depend on it (except when "make depend" was called)
36
COPTS_FILE = $O/.last-copts
37
ifneq ($(MAKECMDGOALS),depend)
38
ifneq ("$(COPTS)","$(shell cat $(COPTS_FILE) 2>/dev/null || echo '')")
39
$(shell $(MKPATH) "$O" && echo "$(COPTS)" >$(COPTS_FILE))
40
endif
41
endif
42
43
#------------------------------------------------------------------------------
44
# User-supplied makefile fragment(s)
45
# >>>
46
# <<<
47
#------------------------------------------------------------------------------
48
49
# Main target when "Build Project" is invoked
50
all:
51
  $(qecho) Creating library librinasimcore ...
52
  $(Q)find $(PROJECT_OUTPUT_DIR) -type f -name "librinasim.*" -exec rm -rf {} \;  
53
  $(Q)cd src && $(MAKE) all
54
  $(qecho) Creating library librinasim ...
55
  $(Q)cd policies && $(MAKE) all  
56
57
submakedirs:  src_dir policies_dir
58
59
.PHONY: all clean cleanall depend msgheaders src policies
60
policies: policies_dir
61
src: src_dir
62
63
policies_dir:
64
  cd policies && $(MAKE) all
65
66
src_dir:
67
  cd src && $(MAKE) all
68
69
msgheaders:
70
  $(Q)cd src && $(MAKE) msgheaders
71
  $(Q)cd policies && $(MAKE) msgheaders   
72
73
# When "Clean Local/Project" is invoked
74
clean: cleansrc cleanpolicies
75
  $(qecho) Cleaning project ...  
76
  $(Q)rm -rf $(O)  
77
  $(Q)rm -f librinasim.so librinasim.dll librinasimcore.a librinasimcore.lib  
78
            
79
cleanall: clean
80
  $(Q)rm -rf $(PROJECT_OUTPUT_DIR)
81
  
82
cleanlibs:
83
  $(qecho) Cleaning libraries ...     
84
  $(Q)find $(PROJECT_OUTPUT_DIR) -type f -name "librinasimcore.*" -exec rm -rf {} \;  
85
  $(Q)find $(PROJECT_OUTPUT_DIR) -type f -name "librinasim.*" -exec rm -rf {} \;
86
  
87
cleansrc:
88
  $(Q)cd src && $(MAKE) clean && rm -f .tmp*
89
  
90
cleanpolicies:        
91
  $(Q)cd policies && $(MAKE) clean && rm -f .tmp*
92
  
93
depend:
94
  $(qecho) Creating dependencies...
95
  $(Q)cd src && if [ -f Makefile ]; then $(MAKE) depend; fi
96
  $(Q)cd policies && if [ -f Makefile ]; then $(MAKE) depend; fi
97
  
98