source: trunk/src/Makefile.in @ 751

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

moved encode code to src2/core so it can be used in librappture2 for nanovis
updated nanovis configure script
updated src and src2/core makefiles with encode code move

File size: 7.4 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
51LIB_RP_OBJECTS  = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lRpObjects
52LIB_RAPPTURE    = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lrappture
53
54INCL_CORE       = -I$(CORE_SRC)
55INCL_CORE2      = -I$(CORE2_SRC)
56INCL_CEE        = -I$(CEE_SRC)
57INCL_FORTRAN    = -I$(FORT_SRC)
58INCL_MATLAB     = -I$(MATLAB_SRC)
59INCL_OCTAVE     = -I$(OCTAVE_SRC)
60
61# default:
62
63all: ${PROGS}
64install:        install_rappture \
65                        install_rpobjs
66
67RP_IO_DEPS      = RpLibrary.o RpLibraryCInterface.o RpLibraryFInterface.o \
68                  scew_extras.o RpEntityRef.o RpUtils.o
69RP_UNITS_DEPS   = RpUnitsStd.o RpUnits.o RpUnitsCInterface.o RpUnitsFInterface.o
70RP_UTILS_DEPS   = RpUtils.o RpUtilsCInterface.o RpUtilsFInterface.o
71RP_OTHER_DEPS   = RpFortranCommon.o RpBindingsDict.o \
72                  RpBufferCInterface.o RpOutcomeCInterface.o
73RP_OBJS_DEP     = RpVariable.o RpAbout.o RpNumber.o RpString.o RpBoolean.o \
74                  RpChoice.o RpOption.o RpUnitsStd.o RpUnits.o
75                  #RpValue.o RpValueDouble.o RpValueString.o
76RP2_OBJ_DEP     = $(CORE2_SRC)/Outcome.o $(CORE2_SRC)/Ptr.o $(CORE2_SRC)/RpBuffer.o $(CORE2_SRC)/RpEncode.o
77
78
79LDLIB_MACOSX = -dynamiclib -o $(LIB_DIR)/$@.dylib
80LDLIB_LINUX = -shared -Wl,-rpath,$(LIB_DIR)/ -Wl,-soname,$@.so -o $(LIB_DIR)/$@.so.0.0
81
82# include rappture library definitions
83
84#### librappture shared object ###########################################
85
86librappture: $(RP_IO_DEPS) $(RP_UTILS_DEPS) $(RP_UNITS_DEPS) $(RP_OTHER_DEPS)
87        (cd ../src2/core/; make Outcome.o Ptr.o RpBuffer.o RpEncode.o)
88        $(INSTALL_DATA) $(CORE_SRC)/*.h $(INCLUDES_DIR)
89        $(INSTALL_DATA) $(CEE_SRC)/*.h $(INCLUDES_DIR)
90        $(INSTALL_DATA) $(FORT_SRC)/*.h $(INCLUDES_DIR)
91        $(INSTALL_DATA) $(CORE2_SRC)/Outcome.h $(INCLUDES_DIR)
92        $(INSTALL_DATA) $(CORE2_SRC)/Ptr.h $(INCLUDES_DIR)
93        $(INSTALL_DATA) $(CORE2_SRC)/RpBuffer.h $(INCLUDES_DIR)
94        $(INSTALL_DATA) $(CORE2_SRC)/RpEncode.h $(INCLUDES_DIR)
95        $(INSTALL_DATA) $(CORE2_SRC)/rappture2.h $(INCLUDES_DIR)
96        @if test "`uname`" == "Darwin"; then \
97                $(CXX) $(DEGUG) $(LDLIB_MACOSX) $^ $(RP2_OBJ_DEP) $(EXTERNAL_RP_LIBS); \
98                ar -r $@.a $^ $(RP2_OBJ_DEP); \
99                ranlib -s $@.a; \
100        else \
101                $(CXX) $(DEGUG) $(LDLIB_LINUX) $^ $(RP2_OBJ_DEP) $(EXTERNAL_RP_LIBS); \
102                /sbin/ldconfig -n $(LIB_DIR); \
103                ar -r $@.a $^ $(RP2_OBJ_DEP); \
104                ranlib $@.a; \
105        fi
106
107install_rappture: librappture
108        @if test "`uname`" == "Darwin"; then \
109                cp $<.dylib $(libdir); \
110                cp $<.a $(libdir); \
111        else \
112                cp -d $<.so* $(libdir); \
113                cp -d $<.a $(libdir); \
114        fi
115        $(INSTALL_DATA) $(INCLUDES_DIR)/* $(includedir)
116
117#### libRpObjects ########################################################
118libRpObjects: $(RP_OBJS_DEP)
119        @if test "`uname`" == "Darwin"; then \
120                $(CXX) $(DEGUG) $(LDLIB_MACOSX) $^ -lstdc++; \
121        else \
122                $(CXX) $(DEGUG) $(LDLIB_LINUX) $^ -lstdc++; \
123                /sbin/ldconfig -n $(LIB_DIR); \
124        fi
125
126install_rpobjs: libRpObjects
127        @if test "`uname`" == "Darwin"; then \
128                cp $<.dylib $(libdir); \
129        else \
130                cp -d $<.so* $(libdir); \
131        fi
132
133####################################################################
134
135# include core source files
136
137RpLibrary.o: $(CORE_SRC)/RpLibrary.cc
138        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_CORE2) $(INCL_RP_DEPS)
139
140scew_extras.o: $(CORE_SRC)/scew_extras.c
141        $(CC) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_RP_DEPS)
142
143RpEntityRef.o: $(CORE_SRC)/RpEntityRef.cc
144        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_CORE2)
145
146RpUtils.o: $(CORE_SRC)/RpUtils.cc
147        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
148
149RpUnitsStd.o: $(CORE_SRC)/RpUnitsStd.cc
150        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
151
152RpUnits.o: $(CORE_SRC)/RpUnits.cc
153        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
154
155RpBindingsDict.o: $(CORE_SRC)/RpBindingsDict.cc
156        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
157
158
159# objects for rappture 2 developement
160
161RpVariable.o: $(CORE_SRC)/RpVariable.cc
162        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
163
164RpAbout.o: $(CORE_SRC)/RpAbout.cc
165        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
166
167RpNumber.o: $(CORE_SRC)/RpNumber.cc
168        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
169
170RpString.o: $(CORE_SRC)/RpString.cc
171        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
172
173RpBoolean.o: $(CORE_SRC)/RpBoolean.cc
174        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
175
176RpChoice.o: $(CORE_SRC)/RpChoice.cc
177        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
178
179RpOption.o: $(CORE_SRC)/RpOption.cc
180        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
181
182RpValue.o: $(CORE_SRC)/RpValue.cc
183        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
184
185RpValueDouble.o: $(CORE_SRC)/RpValueDouble.cc
186        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
187
188RpValueString.o: $(CORE_SRC)/RpValueString.cc
189        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE)
190
191
192# include cee binding definitions
193
194RpUtilsCInterface.o: $(CEE_SRC)/RpUtilsCInterface.cc
195        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_CEE)
196
197RpUnitsCInterface.o: $(CEE_SRC)/RpUnitsCInterface.cc
198        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_CEE)
199
200RpLibraryCInterface.o: $(CEE_SRC)/RpLibraryCInterface.cc $(CEE_SRC)/RpLibraryCInterface.h $(CEE_SRC)/RpBufferCInterface.h
201        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $< $(INCL_CORE) $(INCL_CORE2) $(INCL_CEE) $(INCL_RP_DEPS)
202
203RpBufferCInterface.o: $(CEE_SRC)/RpBufferCInterface.cc $(CEE_SRC)/RpBufferCInterface.h $(CEE_SRC)/RpOutcomeCInterface.h
204        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $< $(INCL_CORE) $(INCL_CORE2) $(INCL_CEE) $(INCL_RP_DEPS)
205
206RpOutcomeCInterface.o: $(CEE_SRC)/RpOutcomeCInterface.cc
207        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $< $(INCL_CORE) $(INCL_CORE2) $(INCL_CEE) $(INCL_RP_DEPS)
208
209
210
211# include fortran binding definitions
212
213RpUtilsFInterface.o: $(FORT_SRC)/RpUtilsFInterface.cc
214        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_FORTRAN)
215
216RpUnitsFInterface.o: $(FORT_SRC)/RpUnitsFInterface.cc
217        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_FORTRAN)
218
219RpFortranCommon.o: $(FORT_SRC)/RpFortranCommon.cc
220        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $< $(INCL_FORTRAN)
221
222RpLibraryFInterface.o: $(FORT_SRC)/RpLibraryFInterface.cc
223        $(CXX) $(CFLAGS) $(DEBUG) -o $@ -c $? $(INCL_CORE) $(INCL_CORE2) $(INCL_FORTRAN) $(INCL_RP_DEPS)
224
225
226docs:
227        if test ! -d docs; then \
228                mkdir docs; \
229        fi
230        if test ! -d docs/doxygen; then \
231                mkdir docs/doxygen; \
232        fi
233        doxygen
234
235#### CLEAN UP ############################################################
236clean:
237        - rm -f *.o librappture.* libRp*.so*
238        - rm -rf build
239
240distclean: clean
241        - rm Makefile
Note: See TracBrowser for help on using the repository browser.