"Fossies" - the Fresh Open Source Software Archive 
Member "zebedee-2.5.3/Makefile" (6 Sep 2005, 7517 Bytes) of package /linux/privat/old/zebedee-2.5.3.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
See also the latest
Fossies "Diffs" side-by-side code changes report for "Makefile":
2.4.1A_vs_2.5.3.
1 #
2 # Makefile for Zebedee
3 #
4 # $Id: Makefile,v 1.25 2005/09/06 05:59:53 ndwinton Exp $
5
6 ZBD_VERSION = 2.5.3
7
8 OS =
9
10 ###
11 ### Locations of tools, libraries and installation directories.
12 ### You may well need to change these.
13 ###
14
15 # Choose your C compiler
16
17 CC_$(OS) = gcc
18
19 CC_win32 = gcc -mno-cygwin
20 CC_linux = gcc -pthread
21 CC_linux64 = $(CC_linux) -m64
22 CC_solaris = gcc
23 CC_freebsd = gcc -pthread
24 CC_tru64 = cc
25 CC_irix = cc -n32 -woff 1110
26 CC_hpux = cc -Ae +DAportable
27 CC_macosx = cc
28 CC_bsdi = gcc -DINADDR_LOOPBACK=127
29 CC = $(CC_$(OS))
30
31 # Optimise/debug compilation
32
33 #OPTIM = -Wall -g
34 OPTIM = -Wall -O3
35
36 # Location of gmp include and library
37 #
38 # NOTE: These are no longer used unless you define USE_GMP_LIBRARY (which is
39 # undefined by default). Uncomment them as necessary.
40
41 # GMPINC = -I../gmp-2.0.2
42 # GMPLIB = ../gmp-2.0.2/libgmp.a
43
44 # Location of Blowfish include and library
45 # You can use the versions from OpenSSL if you have it installed, as follows:
46 # BFINC = /usr/include/openssl
47 # BFLIB = -lcrypto
48
49 BFINC = -I../blowfish-0.9.5a
50 BFLIB = ../blowfish-0.9.5a/libblowfish.a
51
52 # Location of zlib include and library
53
54 ZINC = -I../zlib-1.2.3
55 ZLIB = ../zlib-1.2.3/libz.a
56
57 # Location of bzlib include and library
58 # Set these empty if you don't want bzib2 support
59
60 BZINC = -I../bzip2-1.0.3
61 BZLIB = ../bzip2-1.0.3/libbz2.a
62
63 #
64 # Tools needed for Perl "POD"-format documentation conversion.
65 #
66 PERL_$(OS) = perl
67 PERL_win32 = c:/perl/bin/perl # Avoid Cygwin port
68 PERL = $(PERL_$(OS))
69
70 BAT_win32 = .bat
71
72 POD2HTML = $(PERL) -S pod2html$(BAT_$(OS))
73 POD2MAN = $(PERL) -S pod2man$(BAT_$(OS))
74
75 # Installation directories for the Linux/Solaris/*NIX World
76
77 ROOTDIR = /usr
78 BINDIR = $(ROOTDIR)/bin
79 ZBDDIR = $(ROOTDIR)/lib/zebedee
80 MANDIR = $(ROOTDIR)/man/man1
81
82 # This is a BSD-style install
83
84 INSTALL_$(OS) = install -c
85
86 INSTALL_linux = install -c
87 INSTALL_linux64 = $(INSTALL_linux)
88 INSTALL_solaris = /usr/ucb/install -c
89 INSTALL_freebsd = install -c
90 INSTALL_tru64 = installbsd -c
91 INSTALL_irix = install -c
92 INSTALL_hpux = install -c
93 INSTALL_macosx = install
94 INSTALL_bsdi = install -c
95 INSTALL = $(INSTALL_$(OS))
96
97 # InnoSetup compiler for Win32 (see http://www.jordanr.dhs.org/)
98
99 ISCOMP = "c:/Program Files/Inno Setup 4/compil32.exe"
100
101 ###
102 ### OS-specific definitions
103 ###
104 ### You should probably not have to change these. If you port Zebedee to
105 ### a new platform add definitions of the form XXXX_osname
106 ###
107
108 # Define one or more of the following ...
109 #
110 # Multi-threading:
111 # Use -DHAVE_PTHREADS if you have (and wish to use) POSIX threads
112 #
113 # If you have a system (such as FreeBSD) where fork and pthreads don't
114 # mix well define BUGGY_FORK_WITH_THREADS as well.
115 #
116 # Use of bzip2 compression:
117 # Use -DDONT_HAVE_BZIP2 if you do not have or do not want to support
118 # the use of bzip2 compression
119 #
120 # Lack of "inline" support in compiler (Irix, HPUX):
121 # Use -Dinline=
122 #
123 # Lack of <sys/select.h> (HPUX):
124 # Use -DDONT_HAVE_SELECT_H
125 #
126 # UDP source address spoofing:
127 # To spoof UDP source addresses (when using "transparent" mode) you will
128 # need "libnet" from http://www.packetfactory.net/Projects/Libnet. Then
129 # you should add -DUSE_UDP_SPOOFING (and -DLIBNET_LIL/BIG_ENDIAN as required
130 # by libnet). You must also add -lnet (or -pwrite) to the OSLIBS link
131 # libraries below. If you use this code please be aware of the security
132 # and practical implications of doing this kind of thing. Use it at your
133 # own risk!
134 #
135 # Thread stack size:
136 # The default is 32k but this can be overridded with the THREAD_STACK_SIZE
137 # definition. Currently this has only been found to be necessary on MacOSX.
138 #
139 # Windows FD_SETSIZE:
140 # Windows suffers from a fixed (at compile time) limit on the number of
141 # sockets that can be handled by a select() call. The default is set to
142 # 512, which should enable a server to handle about 250 simultaneous
143 # connections. If you need more then change the definition.
144 #
145
146 DEFINES_win32 = -DFD_SETSIZE=512
147 DEFINES_linux = -DHAVE_PTHREADS
148 DEFINES_linux64 = $(DEFINES_linux)
149 DEFINES_solaris = -D_REENTRANT -DHAVE_PTHREADS
150 DEFINES_freebsd = -DHAVE_PTHREADS -DBUGGY_FORK_WITH_THREADS
151 DEFINES_tru64 = -D_REENTRANT -DHAVE_PTHREADS
152 DEFINES_irix = -D_REENTRANT -DHAVE_PTHREADS -Dinline=
153 DEFINES_hpux = -D_REENTRANT -DHAVE_PTHREADS -DDONT_HAVE_SELECT_H -Dinline=
154 DEFINES_macosx = -D_REENTRANT -DHAVE_PTHREADS -DTHREAD_STACK_SIZE=49152
155 DEFINES_bsdi =
156 DEFINES = $(DEFINES_$(OS))
157
158 # Suffix for executables
159
160 EXE_win32 = .exe # Win32
161 EXE = $(EXE_$(OS))
162
163 # Extra OS-specific libraries
164
165 OSLIBS_win32 = -lwsock32 -lwinmm
166 OSLIBS_linux = -lpthread
167 OSLIBS_linux64 = $(OSLIBS_linux)
168 OSLIBS_solaris = -lsocket -lnsl -lthread
169 OSLIBS_freebsd =
170 OSLIBS_tru64 = -lpthread
171 OSLIBS_irix = -lpthread
172 OSLIBS_hpux = -lpthread -lnsl
173 OSLIBS_macosx = -lpthread
174 OSLIBS_bsdi =
175 OSLIBS = $(OSLIBS_$(OS))
176
177 # Supplementary object files (Win32 ONLY)
178
179 GETOPTOBJ_win32 = getopt.o
180 GETOPTOBJ = $(GETOPTOBJ_$(OS))
181
182 SERVICEOBJ_win32 = service.o
183 SERVICEOBJ = $(SERVICEOBJ_$(OS))
184
185 ####
186 #### You REALLY shouldn't have to modify anything beyond here ...
187 ####
188
189 CFLAGS = $(OPTIM) $(DEFINES) -I. $(GMPINC) $(BFINC) $(ZINC) $(BZINC)
190
191 LIBS = $(GMPLIB) $(BFLIB) $(ZLIB) $(BZLIB) $(OSLIBS)
192
193 OBJS = zebedee.o sha_func.o huge.o $(GETOPTOBJ) $(SERVICEOBJ)
194
195 ZBDFILES = server.zbd vncviewer.zbd vncserver.zbd server.key server.id \
196 client1.key client2.key clients.id
197
198 TXTFILES = README.txt LICENCE.txt GPL2.txt CHANGES.txt NOTICE.txt \
199 zebedee.html ftpgw.tcl.html zebedee.ja_JP.html zebedee.iss
200
201 EXTRAFILES = $(ZBDFILES) $(TXTFILES)
202
203 all : precheck zebedee$(EXE) zebedee.1 zebedee.html ftpgw.tcl.1 ftpgw.tcl.html zebedee.ja_JP.html
204
205 precheck :
206 @ if test -z "$(OS)"; then echo "Use '$(MAKE) OS=xxx' where xxx is win32, linux, linux64, solaris, freebsd, tru64, irix, hpux, macosx or bsdi"; exit 1; fi
207
208 zebedee$(EXE) : $(OBJS)
209 $(CC) $(CFLAGS) -o zebedee$(EXE) $(OBJS) $(LIBS)
210
211 huge.o : huge.h
212
213 zebedee.1 : zebedee.pod
214 rm -f ./tmp/zebedee.pod
215 mkdir -p tmp
216 $(PERL) -pe 's/^\=head3/\=head2/;' zebedee.pod > ./tmp/zebedee.pod
217 $(POD2MAN) --release="Zebedee $(ZBD_VERSION)" --center=Zebedee ./tmp/zebedee.pod > zebedee.1
218 rm -f ./tmp/zebedee.pod
219
220 zebedee.html : zebedee.pod
221 $(POD2HTML) --title="Zebedee: A simple, secure IP tunnel" --noindex zebedee.pod > zebedee.tmp
222 $(PERL) fixhtml.pl < zebedee.tmp > zebedee.html
223 rm -f zebedee.tmp
224
225 zebedee.ja_JP.html :
226 ( cd doc_jp; \
227 $(MAKE) PERL="$(PERL)" POD2HTML="$(POD2HTML)" POD2MAN="$(POD2MAN)" INSTALL="$(INSTALL)" ROOTDIR="$(ROOTDIR)" )
228
229 ftpgw.tcl.1 : ftpgw.tcl.pod
230 $(POD2MAN) --release="1.0" --center=ftpgw.tcl ftpgw.tcl.pod > ftpgw.tcl.1
231
232 ftpgw.tcl.html : ftpgw.tcl.pod
233 $(POD2HTML) --title="ftpgw.tcl: A simple FTP tunnelling gateway" --noindex ftpgw.tcl.pod > ftpgw.tcl.tmp
234 $(PERL) fixhtml.pl < ftpgw.tcl.tmp > ftpgw.tcl.html
235 rm -f ftpgw.tcl.tmp
236
237 install : precheck zebedee$(EXE) zebedee.1 ftpgw.tcl.1 $(ZBDFILES) $(TXTFILES)
238 -mkdir -p $(BINDIR) $(MANDIR) $(ZBDDIR)
239 $(INSTALL) zebedee$(EXE) $(BINDIR)
240 $(INSTALL) -m 0755 ftpgw.tcl $(BINDIR)
241 $(INSTALL) zebedee.1 $(MANDIR)
242 $(INSTALL) ftpgw.tcl.1 $(MANDIR)
243 $(INSTALL) $(ZBDFILES) $(ZBDDIR)
244 $(INSTALL) $(TXTFILES) $(ZBDDIR)
245
246 clean :
247 rm -f zebedee zebedee.exe *.o core *.1 *.html *.tmp *.bak
248
249 # This makes the Win32 setup.exe using InnoSetup. The perl command in
250 # this sequence "dosifies" the text files ... sigh ...
251
252 zbdsetup.exe : zebedee$(EXE) zebedee.html zebedee.ico vncloopback.reg \
253 $(ZBDFILES) $(TXTFILES)
254 $(PERL_win32) -ni.bak -e print $(ZBDFILES) $(TXTFILES) vncloopback.reg
255 $(ISCOMP) /cc zebedee.iss
256 mv -f Output/setup.exe zbdsetup.exe