source: trunk/src/Makefile.in @ 829

Last change on this file since 829 was 762, checked in by dkearney, 17 years ago

removed rpath from linking to make sure /apps is not mounted on render servers when running vizservers

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