Debian Codegraph @

Makefile

raw ◀ ▶
Source reconstructed at patch state 2 of 3 — not the installed (fully patched) source.
3 Debian patches touch this file
1 # ============================================================================
2 # gzstream, C++ iostream classes wrapping the zlib compression library.
3 # Copyright (C) 2001 Deepak Bandyopadhyay, Lutz Kettner
4 #
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License, or (at your option) any later version.
9 #
10 # This library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
14 #
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 # ============================================================================
19 #
20 # File : Makefile
21 # Revision : $Revision: 1.3 $
22 # Revision_date : $Date: 2001/10/04 15:09:28 $
23 # Author(s) : Deepak Bandyopadhyay, Lutz Kettner
24 #
25 # ============================================================================
26
27 SOVERSION=0
28
29 # ----------------------------------------------------------------------------
30 # adapt these settings to your need:
31 # add '-DGZSTREAM_NAMESPACE=name' to CPPFLAGS to place the classes
32 # in its own namespace. Note, this macro needs to be set while creating
33 # the library as well while compiling applications based on it.
34 # As an alternative, gzstream.C and gzstream.h can be edited.
35 # ----------------------------------------------------------------------------
36
37 # CXX = CC -n32 -LANG:std # for SGI Irix 6.5, MIPSpro CC version 7.30
38 CXX = g++ # for Linux RedHat 6.1, g++ version 2.95.2
39
40 CPPFLAGS = -I. -O
41 LDFLAGS = -L. -lgzstream -lz
42 AR = ar cr
43
44 # ----------------------------------------------------------------------------
45 # plain simple rules to make and cleanup the library:
46 # make default; compiles the library
47 # make test; compiles and executes test. O.K. message marks success.
48 # make clean; removes temporary files
49 # make cleanall; removes temporary files, the library, and programs
50 # ----------------------------------------------------------------------------
51
52 default: libgzstream.a libgzstream.so
53
54 test: test_gzip test_gunzip
55 LD_LIBRARY_PATH=".:$$LD_LIBRARY_PATH" ./test_gzip COPYING.LIB gz.tmp.gz
56 gunzip gz.tmp.gz
57 diff COPYING.LIB gz.tmp
58 gzip gz.tmp
59 LD_LIBRARY_PATH=".:$$LD_LIBRARY_PATH" ./test_gunzip gz.tmp.gz gz.tmp
60 diff COPYING.LIB gz.tmp
61 rm gz.tmp.gz gz.tmp
62 # *** O.K. Test finished successfully. ***
63
64 install: libgzstream.a test
65 cp libgzstream.a /usr/lib
66 cp gzstream.h /usr/include
67 chmod o+r /usr/include/gzstream.h
68 # *** O.K. Installation finished successfully. ***
69
70 gzstream.o : gzstream.C gzstream.h
71 ${CXX} ${CPPFLAGS} -c -o gzstream.o gzstream.C
72
73 test_gzip.o : test_gzip.C gzstream.h
74 ${CXX} ${CPPFLAGS} -c -o test_gzip.o test_gzip.C
75
76 test_gunzip.o : test_gunzip.C gzstream.h
77 ${CXX} ${CPPFLAGS} -c -o test_gunzip.o test_gunzip.C
78
79 libgzstream.a : gzstream.o
80 ${AR} libgzstream.a gzstream.o
81
82 libgzstream.so : gzstream.C gzstream.h
83 ${CXX} ${CPPFLAGS} -fPIC -c -o gzstream.o gzstream.C
84 ${CXX} ${LDFLAGS} -shared -Wl,-soname,$@.$(SOVERSION) -o $@.$(SOVERSION) gzstream.o
85 ln -s $@.$(SOVERSION) $@
86
87 test_gzip : test_gzip.o libgzstream.a
88 ${CXX} -o test_gzip test_gzip.o ${LDFLAGS}
89
90 test_gunzip : test_gunzip.o libgzstream.a
91 ${CXX} -o test_gunzip test_gunzip.o ${LDFLAGS}
92
93 clean :
94 rm -f *.o
95
96 cleanall :
97 rm -f *.o libgzstream.a test_gzip test_gunzip
98
99 uninstall:
100 rm /usr/include/gzstream.h /usr/lib/libgzstream.a
101
102 # ============================================================================
103 # EOF
104