source: trunk/src2/core/Makefile.in @ 751

Last change on this file since 751 was 751, checked in by dkearney, 14 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: 5.7 KB
Line 
1# Makefile for Rappture2
2# Copyright (C) 2004-2007 Derrick S. Kearney.
3# For conditions of distribution and use, see license.terms
4
5# To compile and test, type:
6#    ./configure; make test
7# The call of configure is optional if you don't have special requirements
8#
9# To install librappture2.* and rappture2.h, type:
10#    make install
11# To install in $HOME instead of /usr/local, use:
12#    make install prefix=$HOME
13
14CXX             = @CXX@
15
16CFLAGS=-g -Wall -fPIC
17#CFLAGS=-O
18#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
19#CFLAGS=-g -DDEBUG
20#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
21#           -Wstrict-prototypes -Wmissing-prototypes
22
23LDFLAGS=librappture2.a
24LDSHARED=$(CXX)
25CPP=$(CC) -E
26
27LIBS=librappture2.a
28SHAREDLIB=librappture2.so
29SHAREDLIBV=librappture2.so.0.0
30SHAREDLIBM=librappture2.so.1
31
32AR=ar rcv
33RANLIB=ranlib
34TAR=tar
35SHELL=/bin/sh
36EXE=
37
38prefix = @prefix@
39exec_prefix = ${prefix}
40libdir = ${exec_prefix}/lib
41includedir = ${prefix}/include
42mandir = ${prefix}/share/man
43man3dir = ${mandir}/man3
44
45OBJS = RpMesh1D.o RpField1D.o RpMeshTri2D.o RpMeshRect3D.o \
46       RpFieldRect3D.o RpMeshPrism3D.o RpFieldPrism3D.o RpSerialBuffer.o \
47       RpSerializer.o RpSerializable.o RpBuffer.o RpEncode.o Ptr.o Outcome.o
48       # Lookup.o
49
50OBJA =
51# to use the asm code: make OBJA=match.o
52
53TEST_OBJS = test.o RpBuffer_test.o
54
55all: test$(EXE) RpBuffer_test$(EXE)
56
57check: testall
58testall: all
59        @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
60        if ./test; then \
61          echo '                *** test test OK ***'; \
62        else \
63          echo '                *** test test FAILED ***'; \
64        fi
65        if ./RpBuffer_test; then \
66          echo '                *** RpBuffer_test test OK ***'; \
67        else \
68          echo '                *** RpBuffer_test test FAILED ***'; \
69        fi
70
71librappture2.a: $(OBJS) $(OBJA)
72        $(AR) $@ $(OBJS) $(OBJA)
73        -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
74
75$(SHAREDLIBV): $(OBJS)
76        $(LDSHARED) -shared -Wl,-rpath,${libdir} -o $@ $(OBJS) @LIB_SEARCH_DIRS@ -lz -lb64
77        rm -f $(SHAREDLIB) $(SHAREDLIBM)
78        ln -s $@ $(SHAREDLIB)
79        ln -s $@ $(SHAREDLIBM)
80
81test(EXE): test.o Ptr.o Outcome.o Lookup.o
82        $(CXX) $(CFLAGS) -o $@ test.o Ptr.o Outcome.o Lookup.o
83
84
85RpBuffer_test$(EXE): RpBuffer_test.o $(LIBS)
86        $(CXX) $(CFLAGS) -o $@ RpBuffer_test.o $(LDFLAGS) @LIB_SEARCH_DIRS@ -lz -lb64
87
88install: $(LIBS) $(SHAREDLIBV)
89        -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi
90        -@if [ ! -d $(includedir)/rappture2  ]; then mkdir -p $(includedir)/rappture2; fi
91        -@if [ ! -d $(libdir)      ]; then mkdir -p $(libdir); fi
92        -@if [ ! -d $(man3dir)     ]; then mkdir -p $(man3dir); fi
93        cp *.h $(includedir)/rappture2
94        chmod 644 $(includedir)/rappture2/*.h
95        cp $(LIBS) $(libdir)
96        cp $(SHAREDLIBV) $(libdir)
97        cd $(libdir); chmod 755 $(LIBS)
98        -@(cd $(libdir); $(RANLIB) librappture2.a || true) >/dev/null 2>&1
99        cd $(libdir); if test -f $(SHAREDLIBV); then \
100          rm -f $(SHAREDLIB) $(SHAREDLIBM); \
101          ln -s $(SHAREDLIBV) $(SHAREDLIB); \
102          ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
103          (ldconfig || true)  >/dev/null 2>&1; \
104        fi
105#       cp rappture.3 $(man3dir)
106#       chmod 644 $(man3dir)/rappture.3
107# The ranlib in install is needed on NeXTSTEP which checks file times
108# ldconfig is for Linux
109
110uninstall:
111        cd $(includedir)/rappture2; rm *.h; \
112        cd $(libdir); rm -f librappture2.a; \
113        if test -f $(SHAREDLIBV); then \
114          rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \
115        fi
116        cd $(man3dir); rm -f rappture.3
117
118mostlyclean: clean
119clean:
120        rm -f *.o *~ viz buffer1.txt test$(EXE) RpBuffer_test$(EXE) librappture2.*
121
122maintainer-clean: distclean
123distclean: clean
124        rm Makefile
125
126depend:
127        makedepend -- $(CFLAGS) -- *.[ch]
128
129# DO NOT DELETE THIS LINE -- make depend depends on it.
130
131viz: viz.o librappture2.a
132        $(CXX) $(CFLAGS) -o viz $^
133
134libviz.a: Outcome.o RpMesh1D.o RpField1D.o RpMeshTri2D.o RpMeshRect3D.o RpFieldRect3D.o RpMeshPrism3D.o RpFieldPrism3D.o RpSerialBuffer.o RpSerializer.o RpSerializable.o RpBuffer.o
135        $(AR) $@ $^
136
137viz.o: viz.cc
138        $(CXX) $(CFLAGS) -c -o viz.o viz.cc
139
140test: test.o Ptr.o Outcome.o Lookup.o
141        $(CXX) $(CFLAGS) -o test test.o Ptr.o Outcome.o Lookup.o
142
143docs:
144        if test ! -d ../../docs/rappture2; then \
145          mkdir ../../docs; \
146          mkdir ../../docs/rappture2; \
147        fi
148        doxygen
149
150test.o: test.cc Ptr.h
151        $(CXX) $(CFLAGS) -c -o test.o test.cc
152
153Ptr.o: Ptr.h Ptr.cpp
154        $(CXX) $(CFLAGS) -c -o Ptr.o Ptr.cpp
155
156Outcome.o: Outcome.cpp Ptr.h
157        $(CXX) $(CFLAGS) -c -o Outcome.o Outcome.cpp
158
159Lookup.o: Lookup.cpp Ptr.h
160        $(CXX) $(CFLAGS) -c -o Lookup.o Lookup.cpp
161
162RpMesh1D.o: RpMesh1D.cc RpMesh1D.h RpNode.h
163        $(CXX) $(CFLAGS) -c -o RpMesh1D.o RpMesh1D.cc
164
165RpField1D.o: RpField1D.cc RpField1D.h RpMesh1D.h RpNode.h
166        $(CXX) $(CFLAGS) -c -o RpField1D.o RpField1D.cc
167
168RpMeshTri2D.o: RpMeshTri2D.cc RpMeshTri2D.h RpNode.h
169        $(CXX) $(CFLAGS) -c -o RpMeshTri2D.o RpMeshTri2D.cc
170
171RpFieldTri2D.o: RpFieldTri2D.cc RpFieldTri2D.h RpNode.h
172        $(CXX) $(CFLAGS) -c -o RpFieldTri2D.o RpFieldTri2D.cc
173
174RpMeshRect3D.o: RpMeshRect3D.cc RpMeshRect3D.h RpNode.h
175        $(CXX) $(CFLAGS) -c -o RpMeshRect3D.o RpMeshRect3D.cc
176
177RpFieldRect3D.o: RpFieldRect3D.cc RpFieldRect3D.h RpNode.h
178        $(CXX) $(CFLAGS) -c -o RpFieldRect3D.o RpFieldRect3D.cc
179
180RpMeshPrism3D.o: RpMeshPrism3D.cc RpMeshPrism3D.h RpNode.h
181        $(CXX) $(CFLAGS) -c -o RpMeshPrism3D.o RpMeshPrism3D.cc
182
183RpFieldPrism3D.o: RpFieldPrism3D.cc RpFieldPrism3D.h RpNode.h
184        $(CXX) $(CFLAGS) -c -o RpFieldPrism3D.o RpFieldPrism3D.cc
185
186RpSerialBuffer.o: RpSerialBuffer.cc RpSerialBuffer.h
187        $(CXX) $(CFLAGS) -c -o RpSerialBuffer.o RpSerialBuffer.cc
188
189RpSerializer.o: RpSerializer.cc RpSerializer.h
190        $(CXX) $(CFLAGS) -c -o RpSerializer.o RpSerializer.cc
191
192RpSerializable.o: RpSerializable.cc RpSerializable.h
193        $(CXX) $(CFLAGS) -c -o RpSerializable.o RpSerializable.cc
194
195RpEncode.o: RpEncode.cc RpEncode.h
196        $(CXX) $(CFLAGS) -c -o RpEncode.o RpEncode.cc
197
198RpBuffer.o: RpBuffer.cc RpBuffer.h
199        $(CXX) $(CFLAGS) -c -o $@ -I ${includedir} RpBuffer.cc
200
201RpBuffer_test.o: RpBuffer_test.cc
202        $(CXX) $(CFLAGS) -c -o $@ -I ${includedir} RpBuffer_test.cc
203
Note: See TracBrowser for help on using the repository browser.