socat/Makefile.in

199 lines
6.4 KiB
Makefile
Raw Normal View History

2008-01-28 21:37:16 +00:00
# source: Makefile.in
# Copyright Gerhard Rieger and contributors (see file CHANGES)
2008-01-27 12:00:08 +00:00
# Published under the GNU General Public License V.2, see file COPYING
# note: @...@ forms are filled in by configure script
SHELL = /bin/sh
AR = @AR@
RANLIB = @RANLIB@
.SUFFIXES: .c .o
prefix = @prefix@
exec_prefix = @exec_prefix@
BINDEST = @bindir@
2008-09-21 16:05:53 +00:00
datarootdir = @datarootdir@
2008-01-27 12:00:08 +00:00
MANDEST = @mandir@
srcdir = @srcdir@
VPATH = @srcdir@
CC = @CC@
#CCOPT1=-no-pie -fstack-protector
#CCOPT=$(CCOPT1) -fcf-protection=none # for gdb on Ubuntu-20.04
2010-01-09 12:29:28 +00:00
CCOPTS = $(CCOPT)
2008-01-27 12:00:08 +00:00
SYSDEFS = @SYSDEFS@
CPPFLAGS = -I. @CPPFLAGS@
#0 INCLS = -I. @V_INCL@
DEFS = @DEFS@
LIBS = @LIBS@
LDFLAGS = @LDFLAGS@
INSTALL = @INSTALL@
#OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) @LIBOBJS@
#0 CFLAGS = @CFLAGS@ $(CCOPTS) $(DEFS) $(INCLS)
CFLAGS = @CFLAGS@ $(CCOPTS) $(DEFS) $(CPPFLAGS)
CLIBS = $(LIBS)
#CLIBS = $(LIBS) -lm -lefence
XIOSRCS = xioinitialize.c xiohelp.c xioparam.c xiodiag.c xioopen.c xioopts.c \
xiosignal.c xiosigchld.c xioread.c xiowrite.c \
xiolayer.c xioshutdown.c xioclose.c xioexit.c \
xio-process.c xio-fd.c xio-fdnum.c xio-stdio.c xio-pipe.c \
xio-socketpair.c xio-gopen.c xio-creat.c xio-file.c xio-named.c \
2020-12-26 21:46:36 +00:00
xio-socket.c xio-interface.c xio-listen.c xio-unix.c xio-vsock.c \
xio-ip.c xio-ip4.c xio-ip6.c xio-ipapp.c xio-tcp.c \
xio-sctp.c xio-dccp.c xio-rawip.c xio-posixmq.c \
2023-11-11 16:18:06 +00:00
xio-socks.c xio-socks5.c xio-proxy.c xio-udp.c xio-udplite.c \
2023-10-01 19:24:46 +00:00
xio-progcall.c xio-exec.c xio-system.c xio-shell.c \
xio-termios.c xio-readline.c \
xio-pty.c xio-openssl.c xio-streams.c xio-namespaces.c \
2020-12-28 11:37:49 +00:00
xio-ascii.c xiolockfile.c xio-tcpwrap.c xio-fs.c xio-tun.c
2008-01-27 12:00:08 +00:00
XIOOBJS = $(XIOSRCS:.c=.o)
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@
2008-01-27 12:00:08 +00:00
UTLOBJS = $(UTLSRCS:.c=.o)
CFILES = $(XIOSRCS) $(UTLSRCS) socat.c procan_main.c filan_main.c
OFILES = $(CFILES:.c=.o)
PROGS = socat procan filan
2015-01-12 20:46:16 +00:00
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 \
2008-01-27 12:00:08 +00:00
xioconfig.h mytypes.h xioopts.h xiodiag.h xiohelp.h xiosysincludes.h \
xiomodes.h xiolayer.h xio-process.h xio-fd.h xio-fdnum.h xio-stdio.h \
xio-named.h xio-file.h xio-creat.h xio-gopen.h xio-pipe.h \
xio-socketpair.h xio-socket.h xio-interface.h xio-listen.h xio-unix.h xio-vsock.h \
2023-09-30 17:32:14 +00:00
xio-ip.h xio-ip4.h xio-ip6.h xio-rawip.h xio-posixmq.h \
2023-11-11 16:18:06 +00:00
xio-ipapp.h xio-tcp.h xio-udp.h xio-sctp.h xio-dccp.h xio-udplite.h \
xio-socks.h xio-socks5.h xio-proxy.h xio-progcall.h xio-exec.h \
2023-10-01 19:24:46 +00:00
xio-system.h xio-shell.h xio-termios.h xio-readline.h \
xio-pty.h xio-openssl.h xio-streams.h xio-namespaces.h \
2020-12-28 11:37:49 +00:00
xio-ascii.h xiolockfile.h xio-tcpwrap.h xio-fs.h xio-tun.h
2008-01-27 12:00:08 +00:00
DOCFILES = README README.FIPS CHANGES FILES EXAMPLES PORTING SECURITY DEVELOPMENT doc/socat.yo doc/socat.1 doc/socat.html 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
2011-12-05 21:28:49 +00:00
SHFILES = daemon.sh mail.sh ftp.sh readline.sh \
socat_buildscript_for_android.sh
TESTFILES = test.sh socks4echo.sh proxyecho.sh readline-test.sh \
proxy.sh socks4a-echo.sh
2008-01-27 12:00:08 +00:00
2008-01-28 19:33:15 +00:00
all: progs doc
2008-01-28 21:04:20 +00:00
scmclean: gitclean
gitclean: distclean docclean
rm -f Makefile.bak configure
2008-01-28 19:33:15 +00:00
doc: doc/socat.1 doc/socat.html
docclean:
rm -f doc/socat.1 doc/socat.html
doc/socat.1: doc/socat.yo
-mkdir -p $(@D); yodl2man -o $@ $+
2008-01-28 19:33:15 +00:00
doc/socat.html: doc/socat.yo
2022-01-08 20:27:56 +00:00
# care for refs in html
-mkdir -p $(@D); cd $(@D); yodl2html -o socat.html ../$+; cd ..
2008-01-27 12:00:08 +00:00
progs: $(PROGS)
depend: $(CFILES) $(HFILES)
makedepend $(SYSDEFS) $(CFILES)
socat: socat.o libxio.a
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ socat.o libxio.a $(CLIBS)
2015-01-12 20:46:16 +00:00
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
2008-01-27 12:00:08 +00:00
procan: $(PROCAN_OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(PROCAN_OBJS) $(CLIBS)
FILAN_OBJS=filan_main.o filan.o fdname.o error.o sycls.o sysutils.o utils.o vsnprintf_r.o snprinterr.o
filan: $(FILAN_OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(FILAN_OBJS) $(CLIBS)
2008-01-27 12:00:08 +00:00
libxio.a: $(XIOOBJS) $(UTLOBJS)
$(AR) r $@ $(XIOOBJS) $(UTLOBJS)
$(RANLIB) $@
strip: progs
strip $(PROGS)
2008-09-21 16:05:53 +00:00
install: progs $(srcdir)/doc/socat.1
2008-01-27 12:00:08 +00:00
mkdir -p $(DESTDIR)$(BINDEST)
$(INSTALL) -m 755 socat $(DESTDIR)$(BINDEST)/socat1
ln -s socat1 $(DESTDIR)$(BINDEST)/socat
2008-01-27 12:00:08 +00:00
$(INSTALL) -m 755 procan $(DESTDIR)$(BINDEST)
$(INSTALL) -m 755 filan $(DESTDIR)$(BINDEST)
mkdir -p $(DESTDIR)$(MANDEST)/man1
$(INSTALL) -m 644 $(srcdir)/doc/socat.1 $(DESTDIR)$(MANDEST)/man1/socat1.1
ln -s socat1.1 $(DESTDIR)$(MANDEST)/man1/socat.1
2008-01-27 12:00:08 +00:00
uninstall:
rm -f $(DESTDIR)$(BINDEST)/socat
rm -f $(DESTDIR)$(BINDEST)/socat1
rm -f $(DESTDIR)$(BINDEST)/procan
2008-01-27 12:00:08 +00:00
rm -f $(DESTDIR)$(BINDEST)/filan
rm -f $(DESTDIR)$(MANDEST)/man1/socat.1
rm -f $(DESTDIR)$(MANDEST)/man1/socat1.1
2008-01-27 12:00:08 +00:00
# make a GNU-zipped tar ball of the source files
dist: socat.tar.gz socat.tar.bz2
socat.tar.gz: socat.tar
gzip -9 <socat.tar >socat.tar.gz
socat.tar.bz2: socat.tar
bzip2 -9 <socat.tar >socat.tar.bz2
VERSION = `sed 's/"//g' VERSION`
TARDIR = socat-$(VERSION)
socat.tar: configure.in configure Makefile.in config.h.in install-sh VERSION $(CFILES) $(HFILES) $(DOCFILES) $(SHFILES) $(TESTFILES) socat.spec \
configure.ac
2008-01-27 12:00:08 +00:00
if [ ! -d $(TARDIR) ]; then mkdir $(TARDIR); fi
tar cf - $+ |(cd $(TARDIR); tar xf -)
tar cvf socat.tar $(TARDIR)
rm -f $(TARDIR)/COPYING # write protected
rm -r $(TARDIR)
clean:
rm -f *.o libxio.a socat procan filan \
socat.tar socat.tar.Z socat.tar.gz socat.tar.bz2 \
socat.out compile.log test.log
# remove all files that are generated from the original socat distribution
# note that Makefile is also removed, so you have to start with ./configure
# again
distclean: clean
rm -f config.status config.cache config.log config.h Makefile
rm -rf autom4te.cache
info: socat
uname -a >socat.out
./socat -V >>socat.out
./socat -hh >>socat.out
# perform some tests on socat
test: progs
./test.sh
cert:
# prepare critical files with correct permissions to avoid race cond
>cert.key
>cert.pem
chmod 600 cert.key cert.pem
# generate a private key
openssl genrsa -out cert.key 1024
# generate a self signed cert
openssl req -new -key cert.key -x509 -days 3653 -out cert.crt
# ...enter fields
# generate the pem file
cat cert.key cert.crt >cert.pem
#echo use cert.pem on requestors side, i.e. with option cert=cert.pem
#echo use cert.crt on checkers side, i.e. with option cafile=cert.crt