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

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

splitting buffer from simple buffer so i can use simple buffer elsewhere

File size: 5.9 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 -pg -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@
39datadir = @datadir@
40datarootdir = @datarootdir@
41exec_prefix = ${prefix}
42libdir = ${exec_prefix}/lib
43includedir = ${prefix}/include
44mandir = ${prefix}/share/man
45man3dir = ${mandir}/man3
46
47OBJS = RpMesh1D.o RpField1D.o RpMeshTri2D.o RpMeshRect3D.o \
48       RpFieldRect3D.o RpMeshPrism3D.o RpFieldPrism3D.o RpSerialBuffer.o \
49       RpSerializer.o RpSerializable.o RpSimpleBuffer.o RpBuffer.o \
50           RpEncode.o Ptr.o Outcome.o
51       # Lookup.o
52
53OBJA =
54# to use the asm code: make OBJA=match.o
55
56TEST_OBJS = test.o RpBuffer_test.o
57
58all: test$(EXE) RpBuffer_test$(EXE)
59
60check: testall
61testall: all
62        @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
63        if ./test; then \
64          echo '                *** test test OK ***'; \
65        else \
66          echo '                *** test test FAILED ***'; \
67        fi
68        if ./RpBuffer_test; then \
69          echo '                *** RpBuffer_test test OK ***'; \
70        else \
71          echo '                *** RpBuffer_test test FAILED ***'; \
72        fi
73
74librappture2.a: $(OBJS) $(OBJA)
75        $(AR) $@ $(OBJS) $(OBJA)
76        -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
77
78$(SHAREDLIBV): $(OBJS)
79        $(LDSHARED) -shared -o $@ $(OBJS) @LIB_SEARCH_DIRS@ -lz -lb64
80        rm -f $(SHAREDLIB) $(SHAREDLIBM)
81        ln -s $@ $(SHAREDLIB)
82        ln -s $@ $(SHAREDLIBM)
83
84test(EXE): test.o Ptr.o Outcome.o Lookup.o
85        $(CXX) $(CFLAGS) -o $@ test.o Ptr.o Outcome.o Lookup.o
86
87
88RpBuffer_test$(EXE): RpBuffer_test.o $(LIBS)
89        $(CXX) $(CFLAGS) -o $@ RpBuffer_test.o $(LDFLAGS) @LIB_SEARCH_DIRS@ -lz -lb64
90
91install: $(LIBS) $(SHAREDLIBV)
92        -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi
93        -@if [ ! -d $(includedir)/rappture2  ]; then mkdir -p $(includedir)/rappture2; fi
94        -@if [ ! -d $(libdir)      ]; then mkdir -p $(libdir); fi
95        -@if [ ! -d $(man3dir)     ]; then mkdir -p $(man3dir); fi
96        cp *.h $(includedir)/rappture2
97        chmod 644 $(includedir)/rappture2/*.h
98        cp $(LIBS) $(libdir)
99        cp $(SHAREDLIBV) $(libdir)
100        cd $(libdir); chmod 755 $(LIBS)
101        -@(cd $(libdir); $(RANLIB) librappture2.a || true) >/dev/null 2>&1
102        cd $(libdir); if test -f $(SHAREDLIBV); then \
103          rm -f $(SHAREDLIB) $(SHAREDLIBM); \
104          ln -s $(SHAREDLIBV) $(SHAREDLIB); \
105          ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
106          (ldconfig || true)  >/dev/null 2>&1; \
107        fi
108#       cp rappture.3 $(man3dir)
109#       chmod 644 $(man3dir)/rappture.3
110# The ranlib in install is needed on NeXTSTEP which checks file times
111# ldconfig is for Linux
112
113uninstall:
114        cd $(includedir)/rappture2; rm *.h; \
115        cd $(libdir); rm -f librappture2.a; \
116        if test -f $(SHAREDLIBV); then \
117          rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \
118        fi
119        cd $(man3dir); rm -f rappture.3
120
121mostlyclean: clean
122clean:
123        rm -f *.o *~ viz buffer1.txt test$(EXE) RpBuffer_test$(EXE) librappture2.*
124
125maintainer-clean: distclean
126distclean: clean
127        rm Makefile
128
129depend:
130        makedepend -- $(CFLAGS) -- *.[ch]
131
132# DO NOT DELETE THIS LINE -- make depend depends on it.
133
134viz: viz.o librappture2.a
135        $(CXX) $(CFLAGS) -o viz $^
136
137libviz.a: Outcome.o RpMesh1D.o RpField1D.o RpMeshTri2D.o RpMeshRect3D.o RpFieldRect3D.o RpMeshPrism3D.o RpFieldPrism3D.o RpSerialBuffer.o RpSerializer.o RpSerializable.o RpSimpleBuffer.o RpBuffer.o
138        $(AR) $@ $^
139
140viz.o: viz.cc
141        $(CXX) $(CFLAGS) -c -o viz.o viz.cc
142
143test: test.o Ptr.o Outcome.o Lookup.o
144        $(CXX) $(CFLAGS) -o test test.o Ptr.o Outcome.o Lookup.o
145
146docs:
147        if test ! -d ../../docs/rappture2; then \
148          mkdir ../../docs; \
149          mkdir ../../docs/rappture2; \
150        fi
151        doxygen
152
153test.o: test.cc Ptr.h
154        $(CXX) $(CFLAGS) -c -o test.o test.cc
155
156Ptr.o: Ptr.h Ptr.cpp
157        $(CXX) $(CFLAGS) -c -o Ptr.o Ptr.cpp
158
159Outcome.o: Outcome.cpp Ptr.h
160        $(CXX) $(CFLAGS) -c -o Outcome.o Outcome.cpp
161
162Lookup.o: Lookup.cpp Ptr.h
163        $(CXX) $(CFLAGS) -c -o Lookup.o Lookup.cpp
164
165RpMesh1D.o: RpMesh1D.cc RpMesh1D.h RpNode.h
166        $(CXX) $(CFLAGS) -c -o RpMesh1D.o RpMesh1D.cc
167
168RpField1D.o: RpField1D.cc RpField1D.h RpMesh1D.h RpNode.h
169        $(CXX) $(CFLAGS) -c -o RpField1D.o RpField1D.cc
170
171RpMeshTri2D.o: RpMeshTri2D.cc RpMeshTri2D.h RpNode.h
172        $(CXX) $(CFLAGS) -c -o RpMeshTri2D.o RpMeshTri2D.cc
173
174RpFieldTri2D.o: RpFieldTri2D.cc RpFieldTri2D.h RpNode.h
175        $(CXX) $(CFLAGS) -c -o RpFieldTri2D.o RpFieldTri2D.cc
176
177RpMeshRect3D.o: RpMeshRect3D.cc RpMeshRect3D.h RpNode.h
178        $(CXX) $(CFLAGS) -c -o RpMeshRect3D.o RpMeshRect3D.cc
179
180RpFieldRect3D.o: RpFieldRect3D.cc RpFieldRect3D.h RpNode.h
181        $(CXX) $(CFLAGS) -c -o RpFieldRect3D.o RpFieldRect3D.cc
182
183RpMeshPrism3D.o: RpMeshPrism3D.cc RpMeshPrism3D.h RpNode.h
184        $(CXX) $(CFLAGS) -c -o RpMeshPrism3D.o RpMeshPrism3D.cc
185
186RpFieldPrism3D.o: RpFieldPrism3D.cc RpFieldPrism3D.h RpNode.h
187        $(CXX) $(CFLAGS) -c -o RpFieldPrism3D.o RpFieldPrism3D.cc
188
189RpSerialBuffer.o: RpSerialBuffer.cc RpSerialBuffer.h
190        $(CXX) $(CFLAGS) -c -o RpSerialBuffer.o RpSerialBuffer.cc
191
192RpSerializer.o: RpSerializer.cc RpSerializer.h
193        $(CXX) $(CFLAGS) -c -o RpSerializer.o RpSerializer.cc
194
195RpSerializable.o: RpSerializable.cc RpSerializable.h
196        $(CXX) $(CFLAGS) -c -o RpSerializable.o RpSerializable.cc
197
198RpEncode.o: RpEncode.cc RpEncode.h
199        $(CXX) $(CFLAGS) -c -o RpEncode.o RpEncode.cc
200
201RpBuffer.o: RpBuffer.cc RpBuffer.h
202        $(CXX) $(CFLAGS) -c -o $@ -I ${includedir} RpBuffer.cc
203
204RpBuffer_test.o: RpBuffer_test.cc
205        $(CXX) $(CFLAGS) -c -o $@ -I ${includedir} RpBuffer_test.cc
206
207RpSimpleBuffer.o: RpSimpleBuffer.cc RpSimpleBuffer.h
208        $(CXX) $(CFLAGS) -c -o $@ -I ${includedir} RpSimpleBuffer.cc
Note: See TracBrowser for help on using the repository browser.