IP-SENDTO:*:6 now passes getaddrinfo() without "ai_socktype not supported"
[socat.git] / Makefile.in
blob11a5824d01a728e4e5e2d34e2df75aa49cd4a167
1 # source: Makefile.in
2 # Copyright Gerhard Rieger and contributors (see file CHANGES)
3 # Published under the GNU General Public License V.2, see file COPYING
5 # note: @...@ forms are filled in by configure script
7 SHELL = /bin/sh
8 AR = @AR@
9 RANLIB = @RANLIB@
11 .SUFFIXES: .c .o
13 prefix = @prefix@
14 exec_prefix = @exec_prefix@
16 BINDEST = @bindir@
18 datarootdir = @datarootdir@
19 MANDEST = @mandir@
21 srcdir = @srcdir@
22 VPATH = @srcdir@
24 CC = @CC@
25 CCOPTS = $(CCOPT)
27 SYSDEFS = @SYSDEFS@
28 CPPFLAGS = -I. @CPPFLAGS@
29 #0 INCLS = -I. @V_INCL@
30 DEFS = @DEFS@
31 LIBS = @LIBS@
32 LDFLAGS = @LDFLAGS@
34 INSTALL = @INSTALL@
36 #OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) @LIBOBJS@
39 #0 CFLAGS = @CFLAGS@ $(CCOPTS) $(DEFS) $(INCLS)
40 CFLAGS = @CFLAGS@ $(CCOPTS) $(DEFS) $(CPPFLAGS)
41 CLIBS = $(LIBS)
42 #CLIBS = $(LIBS) -lm -lefence
43 XIOSRCS = xioinitialize.c xiohelp.c xioparam.c xiodiag.c xioopen.c xioopts.c \
44 xiosignal.c xiosigchld.c xioread.c xiowrite.c \
45 xiolayer.c xioshutdown.c xioclose.c xioexit.c \
46 xio-process.c xio-fd.c xio-fdnum.c xio-stdio.c xio-pipe.c \
47 xio-gopen.c xio-creat.c xio-file.c xio-named.c \
48 xio-socket.c xio-interface.c xio-listen.c xio-unix.c \
49 xio-ip.c xio-ip4.c xio-ip6.c xio-ipapp.c xio-tcp.c \
50 xio-sctp.c xio-rawip.c \
51 xio-socks.c xio-proxy.c xio-udp.c \
52 xio-rawip.c \
53 xio-progcall.c xio-exec.c xio-system.c xio-termios.c xio-readline.c \
54 xio-pty.c xio-openssl.c xio-streams.c\
55 xio-ascii.c xiolockfile.c xio-tcpwrap.c xio-ext2.c xio-tun.c
56 XIOOBJS = $(XIOSRCS:.c=.o)
57 UTLSRCS = error.c dalan.c procan.c procan-cdefs.c hostan.c fdname.c sysutils.c utils.c nestlex.c vsnprintf_r.c snprinterr.c @FILAN@ sycls.c @SSLCLS@
58 UTLOBJS = $(UTLSRCS:.c=.o)
59 CFILES = $(XIOSRCS) $(UTLSRCS) socat.c procan_main.c filan_main.c
60 OFILES = $(CFILES:.c=.o)
61 PROGS = socat procan filan
63 HFILES = sycls.h sslcls.h error.h dalan.h procan.h filan.h hostan.h sysincludes.h xio.h xioopen.h sysutils.h utils.h nestlex.h vsnprintf_r.h snprinterr.h compat.h \
64 xioconfig.h mytypes.h xioopts.h xiodiag.h xiohelp.h xiosysincludes.h \
65 xiomodes.h xiolayer.h xio-process.h xio-fd.h xio-fdnum.h xio-stdio.h \
66 xio-named.h xio-file.h xio-creat.h xio-gopen.h xio-pipe.h \
67 xio-socket.h xio-interface.h xio-listen.h xio-unix.h \
68 xio-ip.h xio-ip4.h xio-ip6.h xio-rawip.h \
69 xio-ipapp.h xio-tcp.h xio-udp.h xio-sctp.h \
70 xio-socks.h xio-proxy.h xio-progcall.h xio-exec.h \
71 xio-system.h xio-termios.h xio-readline.h \
72 xio-pty.h xio-openssl.h xio-streams.h \
73 xio-ascii.h xiolockfile.h xio-tcpwrap.h xio-ext2.h xio-tun.h
76 DOCFILES = README README.FIPS CHANGES FILES EXAMPLES PORTING SECURITY DEVELOPMENT doc/socat.yo doc/socat.1 doc/socat.html doc/xio.help FAQ BUGREPORTS COPYING COPYING.OpenSSL doc/dest-unreach.css doc/socat-openssltunnel.html doc/socat-multicast.html doc/socat-tun.html doc/socat-genericsocket.html
77 SHFILES = daemon.sh mail.sh ftp.sh readline.sh \
78 socat_buildscript_for_android.sh
79 TESTFILES = test.sh socks4echo.sh proxyecho.sh gatherinfo.sh readline-test.sh \
80 proxy.sh socks4a-echo.sh
81 OSFILES = Config/Makefile.Linux-2-6-24 Config/config.Linux-2-6-24.h \
82 Config/Makefile.SunOS-5-10 Config/config.SunOS-5-10.h \
83 Config/Makefile.FreeBSD-6-1 Config/config.FreeBSD-6-1.h \
84 Config/Makefile.NetBSD-5-1 Config/config.NetBSD-5-1.h \
85 Config/Makefile.OpenBSD-4-3 Config/config.OpenBSD-4-3.h \
86 Config/Makefile.AIX-5-3 Config/config.AIX-5-3.h \
87 Config/Makefile.Cygwin-1-5-25 Config/config.Cygwin-1-5-25.h \
88 Config/Makefile.MacOSX-10-5 Config/config.MacOSX-10-5.h \
89 Config/Makefile.DragonFly-2-8-2 Config/config.DragonFly-2-8-2.h
91 all: progs doc
93 scmclean: gitclean
95 gitclean: distclean docclean
96 rm -f Makefile.bak configure
98 doc: doc/socat.1 doc/socat.html
100 docclean:
101 rm -f doc/socat.1 doc/socat.html
103 doc/socat.1: doc/socat.yo
104 yodl2man -o $@ $+
106 doc/socat.html: doc/socat.yo
107 cd doc; yodl2html -o socat.html socat.yo; cd ..
109 progs: $(PROGS)
111 depend: $(CFILES) $(HFILES)
112 makedepend $(SYSDEFS) $(CFILES)
114 socat: socat.o libxio.a
115 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ socat.o libxio.a $(CLIBS)
117 PROCAN_OBJS=procan_main.o procan.o procan-cdefs.o hostan.o error.o sycls.o sysutils.o utils.o vsnprintf_r.o snprinterr.o
118 procan: $(PROCAN_OBJS)
119 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(PROCAN_OBJS) $(CLIBS)
121 FILAN_OBJS=filan_main.o filan.o fdname.o error.o sycls.o sysutils.o utils.o vsnprintf_r.o snprinterr.o
122 filan: $(FILAN_OBJS)
123 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(FILAN_OBJS) $(CLIBS)
125 libxio.a: $(XIOOBJS) $(UTLOBJS)
126 $(AR) r $@ $(XIOOBJS) $(UTLOBJS)
127 $(RANLIB) $@
129 doc: doc/xio.help
132 strip: progs
133 strip $(PROGS)
135 install: progs $(srcdir)/doc/socat.1
136 mkdir -p $(DESTDIR)$(BINDEST)
137 $(INSTALL) -m 755 socat $(DESTDIR)$(BINDEST)
138 $(INSTALL) -m 755 procan $(DESTDIR)$(BINDEST)
139 $(INSTALL) -m 755 filan $(DESTDIR)$(BINDEST)
140 mkdir -p $(DESTDIR)$(MANDEST)/man1
141 $(INSTALL) -m 644 $(srcdir)/doc/socat.1 $(DESTDIR)$(MANDEST)/man1/
143 uninstall:
144 rm -f $(DESTDIR)$(BINDEST)/socat
145 rm -f $(DESTDIR)$(BINDEST)/procan
146 rm -f $(DESTDIR)$(BINDEST)/filan
147 rm -f $(DESTDIR)$(MANDEST)/man1/socat.1
149 # make a GNU-zipped tar ball of the source files
150 dist: socat.tar.gz socat.tar.bz2
152 socat.tar.gz: socat.tar
153 gzip -9 <socat.tar >socat.tar.gz
155 socat.tar.bz2: socat.tar
156 bzip2 -9 <socat.tar >socat.tar.bz2
158 VERSION = `sed 's/"//g' VERSION`
159 TARDIR = socat-$(VERSION)
160 socat.tar: configure.in configure Makefile.in config.h.in install-sh VERSION $(CFILES) $(HFILES) $(DOCFILES) $(SHFILES) $(OSFILES) $(TESTFILES) socat.spec \
161 configure.ac
162 if [ ! -d $(TARDIR) ]; then mkdir $(TARDIR); fi
163 tar cf - $+ |(cd $(TARDIR); tar xf -)
164 tar cvf socat.tar $(TARDIR)
165 rm -f $(TARDIR)/COPYING # write protected
166 rm -r $(TARDIR)
168 clean:
169 rm -f *.o libxio.a socat procan filan \
170 socat.tar socat.tar.Z socat.tar.gz socat.tar.bz2 \
171 socat.out compile.log test.log
173 # remove all files that are generated from the original socat distribution
174 # note that Makefile is also removed, so you have to start with ./configure
175 # again
176 distclean: clean
177 rm -f config.status config.cache config.log config.h Makefile
178 rm -rf autom4te.cache
180 info: socat
181 uname -a >socat.out
182 ./socat -V >>socat.out
183 ./socat -hh >>socat.out
185 # perform some tests on socat
186 test: progs
187 ./test.sh
189 cert:
190 # prepare critical files with correct permissions to avoid race cond
191 >cert.key
192 >cert.pem
193 chmod 600 cert.key cert.pem
194 # generate a private key
195 openssl genrsa -out cert.key 1024
196 # generate a self signed cert
197 openssl req -new -key cert.key -x509 -days 3653 -out cert.crt
198 # ...enter fields
199 # generate the pem file
200 cat cert.key cert.crt >cert.pem
201 #echo use cert.pem on requestors side, i.e. with option cert=cert.pem
202 #echo use cert.crt on checkers side, i.e. with option cafile=cert.crt