source: trunk/src/Makefile.in @ 951

Last change on this file since 951 was 951, checked in by gah, 16 years ago

added datarootdir to Makefile.in

File size: 7.3 KB
Line 
1
2bindir          = @bindir@
3datadir         = @datadir@
4datarootdir     = @datarootdir@
5exec_prefix     = @exec_prefix@
6includedir      = @includedir@
7libdir          = @libdir@
8mandir          = @mandir@
9prefix          = @prefix@
10
11INSTALL         = @INSTALL@
12INSTALL_PROGRAM = ${INSTALL} -m 755
13INSTALL_DATA    = ${INSTALL} -m 644
14INSTALL_SCRIPT  = ${INSTALL}
15
16
17# tell make where to find the expat & libscew headers
18INCL_RP_DEPS    = -I$(includedir)
19
20EXTERNAL_RP_LIBS   = @LIB_SEARCH_DIRS@ -lexpat -lscew -lz -lb64 -lm
21
22
23# define the top of the rappture directory structure
24RP_BASE   = @RP_BASE@
25
26# define which programs can be made
27PROGS           =   librappture    \
28                    libRpObjects
29
30# define our compiling environment
31#
32CC              = @CC@
33CXX             = @CXX@
34DEBUG           = -g -Wall
35DEBUG_PLUS      = -g -DDEBUG
36LN              = ln
37CFLAGS = -fPIC
38
39# define our directories
40#
41INCLUDES_DIR    = $(RP_BASE)/include
42BIN_DIR         = $(RP_BASE)/bin
43LIB_DIR         = $(RP_BASE)/src
44SRC_DIR         = $(RP_BASE)/src
45SRC2_DIR        = $(RP_BASE)/src2
46TEST_DIR        = $(RP_BASE)/test
47
48CORE_SRC        = $(SRC_DIR)/core
49CORE2_SRC       = $(SRC2_DIR)/core
50FORT_SRC        = $(SRC_DIR)/fortran
51CEE_SRC         = $(SRC_DIR)/cee
52
53INCL_CORE       = -I$(CORE_SRC)
54INCL_CORE2      = -I$(CORE2_SRC)
55INCL_CEE        = -I$(CEE_SRC)
56INCL_FORTRAN    = -I$(FORT_SRC)
57INCL_MATLAB     = -I$(MATLAB_SRC)
58INCL_OCTAVE     = -I$(OCTAVE_SRC)
59
60# default:
61
62all: ${PROGS}
63install:        install_rappture \
64                        install_rpobjs
65
66RP_IO_DEPS      = RpLibrary.o RpLibraryCInterface.o RpLibraryFInterface.o \
67                  scew_extras.o RpEntityRef.o RpUtils.o
68RP_UNITS_DEPS   = RpUnitsStd.o RpUnits.o RpUnitsCInterface.o RpUnitsFInterface.o
69RP_UTILS_DEPS   = RpUtils.o RpUtilsCInterface.o RpUtilsFInterface.o
70RP_OTHER_DEPS   = RpFortranCommon.o RpBindingsDict.o \
71                  RpBufferCInterface.o RpOutcomeCInterface.o
72RP_OBJS_DEP     = RpVariable.o RpAbout.o RpNumber.o RpString.o RpBoolean.o \
73                  RpChoice.o RpOption.o RpUnitsStd.o RpUnits.o
74                  #RpValue.o RpValueDouble.o RpValueString.o
75RP2_OBJ_DEP     = $(CORE2_SRC)/Outcome.o $(CORE2_SRC)/Ptr.o $(CORE2_SRC)/RpBuffer.o $(CORE2_SRC)/RpEncode.o
76
77
78LDLIB_MACOSX = -dynamiclib -o $(LIB_DIR)/$@.dylib
79LDLIB_LINUX = -shared -Wl,-soname,$@.so -o $(LIB_DIR)/$@.so.0.0
80
81# include rappture library definitions
82
83#### librappture shared object ###########################################
84
85librappture: $(RP_IO_DEPS) $(RP_UTILS_DEPS) $(RP_UNITS_DEPS) $(RP_OTHER_DEPS)
86        (cd ../src2/core/; make Outcome.o Ptr.o RpBuffer.o RpEncode.o)
87        $(INSTALL_DATA) $(CORE_SRC)/*.h $(INCLUDES_DIR)
88        $(INSTALL_DATA) $(CEE_SRC)/*.h $(INCLUDES_DIR)
89        $(INSTALL_DATA) $(FORT_SRC)/*.h $(INCLUDES_DIR)
90        $(INSTALL_DATA) $(CORE2_SRC)/Outcome.h $(INCLUDES_DIR)
91        $(INSTALL_DATA) $(CORE2_SRC)/Ptr.h $(INCLUDES_DIR)
92        $(INSTALL_DATA) $(CORE2_SRC)/RpBuffer.h $(INCLUDES_DIR)
93        $(INSTALL_DATA) $(CORE2_SRC)/RpEncode.h $(INCLUDES_DIR)
94        $(INSTALL_DATA) $(CORE2_SRC)/rappture2.h $(INCLUDES_DIR)
95        @if test "`uname`" == "Darwin"; then \
96                $(CXX) $(DEGUG) $(LDLIB_MACOSX) $^ $(RP2_OBJ_DEP) $(EXTERNAL_RP_LIBS); \
97                ar -r $@.a $^ $(RP2_OBJ_DEP); \
98                ranlib -s $@.a; \
99        else \
100                $(CXX) $(DEGUG) $(LDLIB_LINUX) $^ $(RP2_OBJ_DEP) $(EXTERNAL_RP_LIBS); \
101                /sbin/ldconfig -n $(LIB_DIR); \
102                ar -r $@.a $^ $(RP2_OBJ_DEP); \
103                ranlib $@.a; \
104        fi
105
106install_rappture: librappture
107        @if test "`uname`" == "Darwin"; then \
108                cp $<.dylib $(libdir); \
109                cp $<.a $(libdir); \
110        else \
111                cp -d $<.so* $(libdir); \
112                cp -d $<.a $(libdir); \
113        fi
114        $(INSTALL_DATA) $(INCLUDES_DIR)/* $(includedir)
115
116#### libRpObjects ########################################################
117libRpObjects: $(RP_OBJS_DEP)
118        @if test "`uname`" == "Darwin"; then \
119                $(CXX) $(DEGUG) $(LDLIB_MACOSX) $^ -lstdc++; \
120        else \
121                $(CXX) $(DEGUG) $(LDLIB_LINUX) $^ -lstdc++; \
122                /sbin/ldconfig -n $(LIB_DIR); \
123        fi
124
125install_rpobjs: libRpObjects
126        @if test "`uname`" == "Darwin"; then \
127                cp $<.dylib $(libdir); \
128        else \
129                cp -d $<.so* $(libdir); \
130        fi
131
132####################################################################
133
134# include core source files
135
136RpLibrary.o: $(CORE_SRC)/RpLibrary.cc
137        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_CORE2) $(INCL_RP_DEPS)
138
139scew_extras.o: $(CORE_SRC)/scew_extras.c
140        $(CC) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_RP_DEPS)
141
142RpEntityRef.o: $(CORE_SRC)/RpEntityRef.cc
143        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_CORE2)
144
145RpUtils.o: $(CORE_SRC)/RpUtils.cc
146        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
147
148RpUnitsStd.o: $(CORE_SRC)/RpUnitsStd.cc
149        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
150
151RpUnits.o: $(CORE_SRC)/RpUnits.cc
152        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
153
154RpBindingsDict.o: $(CORE_SRC)/RpBindingsDict.cc
155        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
156
157
158# objects for rappture 2 developement
159
160RpVariable.o: $(CORE_SRC)/RpVariable.cc
161        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
162
163RpAbout.o: $(CORE_SRC)/RpAbout.cc
164        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
165
166RpNumber.o: $(CORE_SRC)/RpNumber.cc
167        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
168
169RpString.o: $(CORE_SRC)/RpString.cc
170        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
171
172RpBoolean.o: $(CORE_SRC)/RpBoolean.cc
173        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
174
175RpChoice.o: $(CORE_SRC)/RpChoice.cc
176        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
177
178RpOption.o: $(CORE_SRC)/RpOption.cc
179        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
180
181RpValue.o: $(CORE_SRC)/RpValue.cc
182        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
183
184RpValueDouble.o: $(CORE_SRC)/RpValueDouble.cc
185        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
186
187RpValueString.o: $(CORE_SRC)/RpValueString.cc
188        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
189
190
191# include cee binding definitions
192
193RpUtilsCInterface.o: $(CEE_SRC)/RpUtilsCInterface.cc
194        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_CEE)
195
196RpUnitsCInterface.o: $(CEE_SRC)/RpUnitsCInterface.cc
197        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_CEE)
198
199RpLibraryCInterface.o: $(CEE_SRC)/RpLibraryCInterface.cc $(CEE_SRC)/RpLibraryCInterface.h $(CEE_SRC)/RpBufferCInterface.h
200        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $< $(INCL_CORE) $(INCL_CORE2) $(INCL_CEE) $(INCL_RP_DEPS)
201
202RpBufferCInterface.o: $(CEE_SRC)/RpBufferCInterface.cc $(CEE_SRC)/RpBufferCInterface.h $(CEE_SRC)/RpOutcomeCInterface.h
203        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $< $(INCL_CORE) $(INCL_CORE2) $(INCL_CEE) $(INCL_RP_DEPS)
204
205RpOutcomeCInterface.o: $(CEE_SRC)/RpOutcomeCInterface.cc
206        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $< $(INCL_CORE) $(INCL_CORE2) $(INCL_CEE) $(INCL_RP_DEPS)
207
208
209
210# include fortran binding definitions
211
212RpUtilsFInterface.o: $(FORT_SRC)/RpUtilsFInterface.cc
213        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_FORTRAN)
214
215RpUnitsFInterface.o: $(FORT_SRC)/RpUnitsFInterface.cc
216        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_FORTRAN)
217
218RpFortranCommon.o: $(FORT_SRC)/RpFortranCommon.cc
219        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $< $(INCL_FORTRAN)
220
221RpLibraryFInterface.o: $(FORT_SRC)/RpLibraryFInterface.cc
222        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_CORE2) $(INCL_FORTRAN) $(INCL_RP_DEPS)
223
224
225docs:
226        if test ! -d docs; then \
227                mkdir docs; \
228        fi
229        if test ! -d docs/doxygen; then \
230                mkdir docs/doxygen; \
231        fi
232        doxygen
233
234#### CLEAN UP ############################################################
235clean:
236        - rm -f *.o librappture.* libRp*.so*
237        - rm -rf build
238
239distclean: clean
240        - rm Makefile
Note: See TracBrowser for help on using the repository browser.