# source: Makefile.AIX-5-1 # Copyright Gerhard Rieger 2001-2006 # 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 = /usr/local exec_prefix = ${prefix} BINDEST = ${exec_prefix}/bin MANDEST = ${prefix}/man srcdir = . CC = gcc CCOPTS = $(CCOPT) -Wall -Wno-parentheses SYSDEFS = -D__GNUC__=2 -D__GNUC_MINOR__=9 -D_IBMR2 -D_POWER -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_LONG_LONG -D_IBMR2 -D_POWER -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_LONG_LONG -D__CHAR_UNSIGNED__ -D_ARCH_COM CPPFLAGS = -I. -I/usr/local/include #0 INCLS = -I. @V_INCL@ DEFS = -DHAVE_CONFIG_H LIBS = -L/usr/local/lib -lwrap -lbsd -L/opt/freeware/lib -lreadline -lssl -lcrypto LDFLAGS = INSTALL = ./install-sh -c #OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) #0 CFLAGS = -O -D_GNU_SOURCE $(CCOPTS) $(DEFS) $(INCLS) CFLAGS = -O -D_GNU_SOURCE $(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-gopen.c xio-creat.c xio-file.c xio-named.c \ xio-socket.c xio-listen.c xio-unix.c xio-ip.c xio-ip4.c xio-ip6.c xio-ipapp.c xio-tcp.c xio-socks.c xio-proxy.c xio-udp.c \ xio-rawip.c \ xio-progcall.c xio-exec.c xio-system.c xio-termios.c xio-readline.c \ xio-pty.c xio-openssl.c \ xio-ascii.c xiolockfile.c xio-tcpwrap.c xio-ext2.c XIOOBJS = $(XIOSRCS:.c=.o) UTLSRCS = error.c dalan.c procan.c sysutils.c utils.c nestlex.c filan.c sycls.c sslcls.c UTLOBJS = $(UTLSRCS:.c=.o) CFILES = $(XIOSRCS) $(UTLSRCS) socat.c procan_main.c filan_main.c fdname.c OFILES = $(CFILES:.c=.o) PROGS = socat procan filan HFILES = sycls.h sslcls.h error.h dalan.h procan.h filan.h sysincludes.h xio.h xioopen.h sysutils.h utils.h nestlex.h compat.h \ 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-socket.h \ xio-listen.h xio-unix.h xio-rawip.h xio-ip.h xio-ip4.h xio-ip6.h \ xio-ipapp.h xio-tcp.h xio-udp.h xio-socks.h xio-proxy.h xio-progcall.h xio-exec.h \ xio-system.h xio-termios.h xio-readline.h \ xio-pty.h xio-openssl.h \ xio-ascii.h xiolockfile.h xio-tcpwrap.h xio-ext2.h DOCFILES = README README.FIPS CHANGES FILES EXAMPLES PORTING SECURITY DEVELOPMENT socat.1 socat.html xio.help FAQ BUGREPORTS COPYING COPYING.OpenSSL SHFILES = daemon.sh mail.sh ftp.sh readline.sh TESTFILES = test.sh socks4echo.sh proxyecho.sh gatherinfo.sh readline-test.sh \ proxy.sh socks4a-echo.sh testcert.conf OSFILES = Config/Makefile.Linux-2-4-20 Config/config.Linux-2-4-20.h \ Config/Makefile.AIX-5-1 Config/config.AIX-5-1.h \ Config/Makefile.MacOS-10-2 Config/config.MacOS-10-2.h \ Config/Makefile.SunOS-5-9 Config/config.SunOS-5-9.h \ Config/Makefile.HP-UX-B-11-11 Config/config.HP-UX-B-11-11.h \ Config/Makefile.FreeBSD-4-10 Config/config.FreeBSD-4-10.h \ Config/Makefile.FreeBSD-5-4 Config/config.FreeBSD-5-4.h \ Config/Makefile.OpenBSD-3-4 Config/config.OpenBSD-3-4.h \ Config/Makefile.Tru64-5-1B Config/config.Tru64-5-1B.h all: progs progs: $(PROGS) depend: $(CFILES) $(HFILES) makedepend $(SYSDEFS) $(CFILES) socat: socat.o libxio.a $(CC) $(CFLAGS) $(LDFLAGS) -o $@ socat.o libxio.a $(CLIBS) procan: procan_main.o procan.o error.o sycls.o sysutils.o utils.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ procan_main.o procan.o error.o sycls.o sysutils.o utils.o $(CLIBS) filan: filan_main.o filan.o fdname.o error.o sycls.o sysutils.o utils.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ filan_main.o filan.o fdname.o error.o sycls.o sysutils.o utils.o $(CLIBS) libxio.a: $(XIOOBJS) $(UTLOBJS) $(AR) r $@ $(XIOOBJS) $(UTLOBJS) $(RANLIB) $@ doc: xio.help # strip: progs strip $(PROGS) install: progs socat.1 mkdir -p $(DESTDIR)$(BINDEST) $(INSTALL) -m 755 socat $(DESTDIR)$(BINDEST) $(INSTALL) -m 755 procan $(DESTDIR)$(BINDEST) $(INSTALL) -m 755 filan $(DESTDIR)$(BINDEST) mkdir -p $(DESTDIR)$(MANDEST)/man1 $(INSTALL) -m 644 socat.1 $(DESTDIR)$(MANDEST)/man1/ # 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.gz socat.tar.bz2: socat.tar bzip2 -9 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) $(OSFILES) $(TESTFILES) socat.spec 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