Statistics
| Branch: | Revision:

root / src / cmdenv / Makefile @ fbe00e73

History | View | Annotate | Download (4.03 KB)

1 01873262 Georg Kunz
#
2
# Definitions to be customized 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
LIBNAME=liboppcmdenv$D
22
O=$(OMNETPP_OUT_DIR)/$(TOOLCHAIN_NAME)-$(MODE)/src/cmdenv
23
L=$(OMNETPP_LIB_DIR)/$(TOOLCHAIN_NAME)
24
25
COPTS=$(CFLAGS) -I$(OMNETPP_INCL_DIR) -I$(OMNETPP_INCL_DIR)/platdep -I../common -I../envir -DBUILDING_CMDENV
26
27
IMPLIBS= -L$L -loppsim$D -loppenvir$D -loppcommon$D
28
29
OBJS = $O/cmdenv.o
30
31
#
32
# Automatic rules
33
#
34
.SUFFIXES : .cc
35
36
$O/%.o: %.cc
37
	@mkdir -p $O
38
	$(CXX) -c $(COPTS) -o $@ $<
39
40
#
41
# Targets
42
#
43
all: $L/$(LIBNAME)$(LIB_SUFFIX)
44
	cd $(OMNETPP_LIB_DIR) && rm -f $(LIBNAME).* && $(LN) $(TOOLCHAIN_NAME)/$(LIBNAME).* .
45
46
$L/$(LIBNAME)$(A_LIB_SUFFIX) : $(OBJS)
47
	mkdir -p $L
48
	$(AR) $O/$(LIBNAME)$(A_LIB_SUFFIX) $(OBJS)
49
	$(RANLIB) $O/$(LIBNAME)$(A_LIB_SUFFIX)
50
	cd $O && $(OMNETPP_ROOT)/src/utils/install-lib $(LIBNAME)$(A_LIB_SUFFIX) $L
51
52
$L/$(LIBNAME)$(SO_LIB_SUFFIX) : $(OBJS)
53
	mkdir -p $L
54
	$(SHLIB_LD) $(LDFLAGS) -o $O/$(LIBNAME)$(SO_LIB_SUFFIX) $(OBJS) $(IMPLIBS)
55
	$(SHLIB_POSTPROCESS) $O/$(LIBNAME)$(SO_LIB_SUFFIX)
56
	cd $O && $(OMNETPP_ROOT)/src/utils/install-lib $(LIBNAME)$(SO_LIB_SUFFIX) $L
57
	rm -f $(OMNETPP_LIB_DIR)/$(LIBNAME)$(SO_LIB_SUFFIX) && $(LN) $L/$(LIBNAME)$(SO_LIB_SUFFIX) $(OMNETPP_LIB_DIR)
58
	$(SHLIB_POSTPROCESS) $(OMNETPP_LIB_DIR)/$(LIBNAME)$(SO_LIB_SUFFIX)
59
60
$L/$(LIBNAME)$(DLL_LIB_SUFFIX) : $(OBJS)
61
	mkdir -p $L
62
	$(SHLIB_LD) $(LDFLAGS) -o $O/$(LIBNAME)$(DLL_LIB_SUFFIX) $(OBJS) $(IMPLIBS) -Wl,--out-implib,$O/$(LIBNAME)$(A_LIB_SUFFIX)
63
	cd $O && $(OMNETPP_ROOT)/src/utils/install-lib $(LIBNAME)$(A_LIB_SUFFIX) $L
64
	cp $O/$(LIBNAME)$(DLL_LIB_SUFFIX) $(OMNETPP_BIN_DIR)
65
66
depend:
67
	$(MAKEDEPEND) -I. -I../envir -I../../include -P\$$O/ -- *.cc
68
69
clean:
70
	rm -rf $O
71
	rm -f $L/$(LIBNAME).* $(OMNETPP_LIB_DIR)/$(LIBNAME).*
72
73
# DO NOT DELETE THIS LINE -- make depend depends on it.
74
$O/cmdenv.o: cmdenv.cc \
75
  ../../include/regmacros.h \
76
  ../envir/args.h \
77
  cmdenv.h \
78
  ../envir/envirdefs.h \
79
  ../../include/cnamedobject.h \
80
  ../../include/cexpression.h \
81
  cmddefs.h \
82
  ../envir/objectprinter.h \
83
  ../envir/speedometer.h \
84
  ../../include/ccomponent.h \
85
  ../../include/cproperties.h \
86
  ../../include/cregistrationlist.h \
87 b781545c Georg Kunz
  ../../include/platdep/timeutil.h \
88 01873262 Georg Kunz
  ../../include/cconfiguration.h \
89
  ../../include/cthreadpool.h \
90
  ../../include/errmsg.h \
91
  ../../include/cownedobject.h \
92
  ../../include/cmessage.h \
93
  ../../include/onstartup.h \
94
  ../envir/envirbase.h \
95
  ../../include/clistener.h \
96 b781545c Georg Kunz
  ../../include/envirext.h \
97
  ../../include/cscheduler.h \
98 01873262 Georg Kunz
  ../../include/cpar.h \
99
  ../../include/globals.h \
100
  ../envir/appreg.h \
101
  ../../include/cvisitor.h \
102 93d0d4d3 Simon Tenbusch
  ../../include/cpthreadlock.h \
103
  ../../include/cttaslock.h \
104 01873262 Georg Kunz
  ../../include/csimplemodule.h \
105
  ../../include/cobjectfactory.h \
106 b781545c Georg Kunz
  ../../include/cnolock.h \
107 01873262 Georg Kunz
  ../../include/cmodule.h \
108
  ../../include/platdep/platmisc.h \
109
  ../../include/cexception.h \
110
  ../../include/platdep/intxtypes.h \
111 fbe00e73 Mirko Stoffers
  ../../include/ccomponenttype.h \
112
  ../../include/cstopwatch.h \
113
  ../../include/platdep/platdefs.h \
114
  ../../include/cmathfunction.h \
115
  ../envir/resultlistener.h \
116
  ../../include/clockedmsgheap.h \
117
  ../../include/catomicopsdebug.h \
118
  ../envir/eventlogfilemgr.h \
119
  ../../include/simtime.h \
120
  ../../include/cgate.h \
121
  ../../include/carray.h \
122
  ../../include/cenvir.h \
123
  ../../include/simtime_t.h \
124
  ../../include/cmsgpar.h \
125
  ../../include/cconfigoption.h \
126
  ../../include/cnumgen.h \
127
  ../envir/intervals.h \
128
  ../../include/opp_string.h \
129
  ../../include/simkerneldefs.h \
130
  ../../include/random.h \
131
  ../../include/csimulation.h \
132
  ../../include/cobject.h \
133
  ../../include/cdummystringpool.h \
134
  ../../include/cstringpool.h \
135
  ../../include/ctaskheap.h \
136
  ../../include/cdefaultlist.h \
137
  ../../include/crng.h \
138
  ../../include/simutil.h \
139
  ../../include/cmessageheap.h \
140
  ../../include/cproperty.h