Statistics
| Branch: | Revision:

root / src / utils / Makefile @ master

History | View | Annotate | Download (2.59 KB)

1 01873262 Georg Kunz
#
2
# variables set by `configure':
3
#
4
5
include ../../Makefile.inc
6
7
# Make sure that output locations are set
8
ifeq ("$(strip $(OMNETPP_BIN_DIR))","")
9
$(error OMNETPP_BIN_DIR must be correctly set)
10
endif
11
ifeq ("$(strip $(OMNETPP_OUT_DIR))","")
12
$(error OMNETPP_OUT_DIR must be correctly set)
13
endif
14
ifeq ("$(strip $(OMNETPP_LIB_DIR))","")
15
$(error OMNETPP_LIB_DIR must be correctly set)
16
endif
17
18
#
19
# Local definitions
20
#
21
O=$(OMNETPP_OUT_DIR)/$(TOOLCHAIN_NAME)-$(MODE)/src/utils
22
L=$(OMNETPP_LIB_DIR)/$(TOOLCHAIN_NAME)
23
24
#
25
# Rules
26
#
27
all: $O/opp_lcg32_seedtool$(EXE_SUFFIX) $O/abspath$(EXE_SUFFIX)
28
	echo "#!/bin/sh" >opp_configfilepath && echo 'echo `dirname $$0`/../Makefile.inc' >>opp_configfilepath
29
#	echo "#!/bin/sh" >opp_configfilepath && echo "echo $(OMNETPP_ROOT)/Makefile.inc" >>opp_configfilepath
30
	chmod +x opp_makemake opp_test opp_makedep splitvec opp_configfilepath opp_runall omnetpp omnest
31
	if [ "$$OS" = "Windows_NT" ] ; then \
32
	  echo "@echo $(OMNETPP_ROOT)/Makefile.inc" >opp_configfilepath.cmd && \
33
	  cp opp_configfilepath.cmd $(OMNETPP_BIN_DIR); \
34
	  cp opp_makemake.cmd $(OMNETPP_BIN_DIR); \
35
	  cp opp_runall.cmd $(OMNETPP_BIN_DIR); \
36
	  cp opp_test.cmd $(OMNETPP_BIN_DIR); \
37
	  cp opp_makedep.cmd $(OMNETPP_BIN_DIR); \
38
	  cp omnetpp.cmd $(OMNETPP_BIN_DIR); \
39
	  cp omnest.cmd $(OMNETPP_BIN_DIR); \
40
	fi
41
	cp opp_configfilepath $(OMNETPP_BIN_DIR)
42
	cp opp_makemake $(OMNETPP_BIN_DIR)
43
	cp opp_test $(OMNETPP_BIN_DIR)
44
	cp opp_makedep $(OMNETPP_BIN_DIR)
45
	cp opp_shlib_postprocess $(OMNETPP_BIN_DIR)
46
	cp opp_runall $(OMNETPP_BIN_DIR)
47
	cp splitvec $(OMNETPP_BIN_DIR)
48
	cp omnetpp $(OMNETPP_BIN_DIR)
49
	cp omnest $(OMNETPP_BIN_DIR)
50
	cd $O && $(OMNETPP_ROOT)/src/utils/install-prog opp_lcg32_seedtool$(EXE_SUFFIX) $(OMNETPP_BIN_DIR)
51
	cd $O && $(OMNETPP_ROOT)/src/utils/install-prog abspath$(EXE_SUFFIX) $(OMNETPP_BIN_DIR)
52
	@# next line is for samples/rundemo
53
	echo $(WISH) >$(HOME)/.wishname
54
55
$O/opp_lcg32_seedtool$(EXE_SUFFIX) : opp_lcg32_seedtool.cc
56
	@mkdir -p $O
57
	$(CXX) opp_lcg32_seedtool.cc -o $O/opp_lcg32_seedtool$(EXE_SUFFIX)
58
59
$O/abspath$(EXE_SUFFIX) : abspath.cc
60
	@mkdir -p $O
61
	$(CXX) abspath.cc -o $O/abspath$(EXE_SUFFIX)
62
63
depend:
64
	$(MAKEDEPEND) -I. -P\$$O/ -- *.cc *.c
65
66
clean:
67
	rm -rf $O
68
	cd $(OMNETPP_BIN_DIR) && rm -f opp_lcg32_seedtool$(EXE_SUFFIX) abspath$(EXE_SUFFIX) opp_makemake opp_runall opp_test opp_makedep splitvec
69
#	rm -f opp_configfilepath
70
#	rm -f opp_configfilepath.cmd
71
72
# DO NOT DELETE THIS LINE -- make depend depends on it.
73
$O/abspath.o: abspath.cc \
74
  ../common/ver.h
75
$O/opp_lcg32_seedtool.o: opp_lcg32_seedtool.cc \
76
  ../common/ver.h
77
$O/opp_pefileversion.o: opp_pefileversion.cc
78
$O/ln.o: ln.c
79
$O/opp_replace.o: opp_replace.c