Project

General

Profile

Statistics
| Branch: | Revision:

root / src / layout / Makefile @ 8aeaaccc

History | View | Annotate | Download (4.66 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=libopplayout$D
22
O=$(OMNETPP_OUT_DIR)/$(TOOLCHAIN_NAME)-$(MODE)/src/layout
23
L=$(OMNETPP_LIB_DIR)/$(TOOLCHAIN_NAME)
24
25
COPTS=$(CFLAGS) -I. -I../common -I$(OMNETPP_INCL_DIR)/platdep
26
27
IMPLIBS= -L$L -loppcommon$D
28
29
OBJS= $O/geometry.o $O/graphcomponent.o $O/heapembedding.o $O/startreeembedding.o \
30
      $O/forcedirectedparametersbase.o $O/forcedirectedparameters.o $O/forcedirectedembedding.o \
31
      $O/graphlayouter.o $O/basicspringembedderlayout.o $O/forcedirectedgraphlayouter.o
32
33
#
34
# Automatic rules
35
#
36
.SUFFIXES : .cc
37
38
$O/%.o: %.cc
39
	@mkdir -p $O
40
	$(CXX) -c $(COPTS) -o $@ $<
41
42
#
43
# Targets
44
#
45
all: $L/$(LIBNAME)$(LIB_SUFFIX)
46
	cd $(OMNETPP_LIB_DIR) && rm -f $(LIBNAME).* && $(LN) $(TOOLCHAIN_NAME)/$(LIBNAME).* .
47
48
$L/$(LIBNAME)$(A_LIB_SUFFIX) : $(OBJS)
49
	mkdir -p $L
50
	$(AR) $O/$(LIBNAME)$(A_LIB_SUFFIX) $(OBJS)
51
	$(RANLIB) $O/$(LIBNAME)$(A_LIB_SUFFIX)
52
	cd $O && $(OMNETPP_ROOT)/src/utils/install-lib $(LIBNAME)$(A_LIB_SUFFIX) $L
53
54
$L/$(LIBNAME)$(SO_LIB_SUFFIX) : $(OBJS)
55
	mkdir -p $L
56
	$(SHLIB_LD) $(LDFLAGS) -o $O/$(LIBNAME)$(SO_LIB_SUFFIX) $(OBJS) $(IMPLIBS)
57
	$(SHLIB_POSTPROCESS) $O/$(LIBNAME)$(SO_LIB_SUFFIX)
58
	cd $O && $(OMNETPP_ROOT)/src/utils/install-lib $(LIBNAME)$(SO_LIB_SUFFIX) $L
59
	rm -f $(OMNETPP_LIB_DIR)/$(LIBNAME)$(SO_LIB_SUFFIX) && $(LN) $L/$(LIBNAME)$(SO_LIB_SUFFIX) $(OMNETPP_LIB_DIR)
60
	$(SHLIB_POSTPROCESS) $(OMNETPP_LIB_DIR)/$(LIBNAME)$(SO_LIB_SUFFIX)
61
62
$L/$(LIBNAME)$(DLL_LIB_SUFFIX) : $(OBJS)
63
	mkdir -p $L
64
	$(SHLIB_LD) $(LDFLAGS) -o $O/$(LIBNAME)$(DLL_LIB_SUFFIX) $(OBJS) $(IMPLIBS) -Wl,--out-implib,$O/$(LIBNAME)$(A_LIB_SUFFIX)
65
	cd $O && $(OMNETPP_ROOT)/src/utils/install-lib $(LIBNAME)$(A_LIB_SUFFIX) $L
66
	cp $O/$(LIBNAME)$(DLL_LIB_SUFFIX) $(OMNETPP_BIN_DIR)
67
68
depend:
69
	$(MAKEDEPEND) -I. -I../common -P\$$O/ -- *.cc
70
71
clean:
72
	rm -rf $O
73
	rm -f $L/$(LIBNAME).* $(OMNETPP_LIB_DIR)/$(LIBNAME).*
74
75
# DO NOT DELETE THIS LINE -- make depend depends on it.
76
$O/basicspringembedderlayout.o: basicspringembedderlayout.cc \
77
  graphlayouter.h \
78
  basicspringembedderlayout.h \
79
  ../common/exception.h \
80
  ../common/commonutil.h \
81
  ../common/lcgrandom.h \
82
  layoutdefs.h \
83
  ../common/commondefs.h
84
$O/concentrictreeembedding.o: concentrictreeembedding.cc \
85
  geometry.h \
86
  concentrictreeembedding.h \
87
  ../common/exception.h \
88
  ../common/commonutil.h \
89
  graphcomponent.h \
90
  ../common/commondefs.h \
91
  layoutdefs.h
92
$O/forcedirectedembedding.o: forcedirectedembedding.cc \
93
  geometry.h \
94
  ../common/exception.h \
95
  ../common/commonutil.h \
96
  ../common/commondefs.h \
97
  layoutdefs.h \
98
  forcedirectedparameters.h \
99
  forcedirectedparametersbase.h \
100
  forcedirectedembedding.h \
101
  ../common/lcgrandom.h
102
$O/forcedirectedgraphlayouter.o: forcedirectedgraphlayouter.cc \
103
  startreeembedding.h \
104
  geometry.h \
105
  graphlayouter.h \
106
  heapembedding.h \
107
  ../common/exception.h \
108
  ../common/commonutil.h \
109
  graphcomponent.h \
110
  layoutdefs.h \
111
  ../common/commondefs.h \
112
  forcedirectedparameters.h \
113
  forcedirectedparametersbase.h \
114
  forcedirectedembedding.h \
115
  forcedirectedgraphlayouter.h \
116
  ../common/lcgrandom.h
117
$O/forcedirectedparameters.o: forcedirectedparameters.cc \
118
  geometry.h \
119
  ../common/exception.h \
120
  ../common/commonutil.h \
121
  ../common/commondefs.h \
122
  layoutdefs.h \
123
  forcedirectedparameters.h \
124
  forcedirectedparametersbase.h \
125
  forcedirectedembedding.h
126
$O/forcedirectedparametersbase.o: forcedirectedparametersbase.cc \
127
  geometry.h \
128
  ../common/exception.h \
129
  ../common/commonutil.h \
130
  ../common/commondefs.h \
131
  layoutdefs.h \
132
  forcedirectedparametersbase.h
133
$O/geometry.o: geometry.cc \
134
  geometry.h \
135
  ../common/commonutil.h \
136
  ../common/exception.h \
137
  layoutdefs.h \
138
  ../common/commondefs.h
139
$O/graphcomponent.o: graphcomponent.cc \
140
  geometry.h \
141
  ../common/exception.h \
142
  ../common/commonutil.h \
143
  ../common/commondefs.h \
144
  layoutdefs.h \
145
  graphcomponent.h
146
$O/graphlayouter.o: graphlayouter.cc \
147
  graphlayouter.h \
148
  ../common/exception.h \
149
  layoutdefs.h \
150
  ../common/commondefs.h \
151
  ../common/lcgrandom.h
152
$O/heapembedding.o: heapembedding.cc \
153
  geometry.h \
154
  heapembedding.h \
155
  ../common/exception.h \
156
  ../common/commonutil.h \
157
  graphcomponent.h \
158
  ../common/commondefs.h \
159
  layoutdefs.h
160
$O/startreeembedding.o: startreeembedding.cc \
161
  startreeembedding.h \
162
  geometry.h \
163
  ../common/exception.h \
164
  ../common/commonutil.h \
165
  graphcomponent.h \
166
  ../common/commondefs.h \
167
  layoutdefs.h