1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
# Edited for Debian GNU/Linux.
DESTDIR =
# Linux RedHat 5.0 has header files that generates warnings when compiling
# with -pedantic, so we leave that out per default.
CC = gcc -Wall #-pedantic
INCLUDE-FLAGS =
COPT = -g -O2
LDFLAGS = ${COPT}
CFLAGS = ${COPT} ${INCLUDE-FLAGS}
RANLIB = ranlib
INSTALL = install -c
MKDIR_P = mkdir -p
# Solaris 2 needs to link with "-lsocket -lnsl". For other unices you might
# need to comment out those libraries.
#NETLIBS = -lsocket -lnsl
# Where to install things.
prefix = ${DESTDIR}/usr
bindir = ${prefix}/bin
mandir = ${prefix}/share/man
man1dir = ${mandir}/man1
# ------------------------------------------------------------------
# Things below shouldn't be needed to be changed in order to compile
SUBMAKE = ${MAKE} prefix="${prefix}" CC="${CC}" CFLAGS="${CFLAGS}" AR="${AR}" \
RANLIB="${RANLIB}" INSTALL="${INSTALL}" VPATH="${VPATH}" ${MFLAGS}
IPLIB = ip/libiphelp.a
PROGRAMS = tcpconnect tcplisten tcpbug mini-inetd getpeername
MANUALS1 = tcpconnect.1 tcplisten.1 tcpbug.1 mini-inetd.1 getpeername.1
all: ${IPLIB} ${PROGRAMS}
tcpconnect: tcpconnect.o relay.o
${CC} ${LDFLAGS} $^ ${IPLIB} ${NETLIBS} -o $@
tcplisten: tcplisten.o relay.o
${CC} ${LDFLAGS} $^ ${IPLIB} ${NETLIBS} -o $@
tcpbug: tcpbug.o relay.o
${CC} ${LDFLAGS} $^ ${IPLIB} ${NETLIBS} -o $@
mini-inetd: mini-inetd.o
${CC} ${LDFLAGS} $^ ${IPLIB} ${NETLIBS} -o $@
getpeername: getpeername.o
${CC} ${LDFLAGS} $^ ${NETLIBS} -o $@
${IPLIB}:
cd ip; ${SUBMAKE} all
clean:
${RM} ${PROGRAMS} *.o *~ core
cd ip; ${SUBMAKE} clean
install: install-bin #install-man
install-bin: ${bindir} #${PROGRAMS}
${INSTALL} ${PROGRAMS} ${bindir}
install-man: ${man1dir} #${MANUALS1}
${INSTALL} ${MANUALS1} ${man1dir}
install-lib:
cd ip; ${SUBMAKE} install
${bindir}:; ${MKDIR_P} $@
${man1dir}:; ${MKDIR_P} $@
${PROGRAMS}: ${IPLIB}
tcpconnect.o: ip/ip_misc.h relay.h
tcplisten.o: ip/ip_misc.h relay.h
tcpbug.o: ip/ip_misc.h relay.h
mini-inetd.o: ip/ip_misc.h
relay.o: relay.h
getpeername.o:
|