mirror of
https://github.com/moparisthebest/sslh
synced 2024-11-13 12:45:05 -05:00
a9c9941988
WARNING: Options changed, you'll need to update your start-up scripts! Log format changed, you'll need to update log processing scripts! Now supports IPv6 throughout (both on listening and forwarding) Logs now contain IPv6 addresses, local forwarding address, and resolves names (unless --numeric is specified). Introduced long options. Options -l, -s and -o replaced by their long counterparts. Defaults for SSL and SSH options suppressed (it's legitimate to want to use sslh to mux OpenVPN and tinc while not caring about SSH nor SSL). Bind to multiple addresses with multiple -p options. Support for tinc VPN (experimental). Numeric logging option.
69 lines
1.5 KiB
Makefile
69 lines
1.5 KiB
Makefile
# Configuration
|
|
|
|
VERSION="v1.9"
|
|
USELIBWRAP= # Use libwrap?
|
|
PREFIX=/usr/local
|
|
|
|
MAN=sslh.8.gz # man page name
|
|
|
|
# End of configuration -- the rest should take care of
|
|
# itself
|
|
|
|
CC = gcc
|
|
CFLAGS=-Wall -g
|
|
|
|
#LIBS=-lnet
|
|
LIBS=
|
|
OBJS=common.o
|
|
|
|
ifneq ($(strip $(USELIBWRAP)),)
|
|
LIBS:=$(LIBS) -lwrap
|
|
CFLAGS:=$(CFLAGS) -DLIBWRAP
|
|
endif
|
|
|
|
all: sslh $(MAN)
|
|
|
|
.c.o: *.h
|
|
$(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -c $<
|
|
|
|
|
|
sslh: $(OBJS) sslh-fork sslh-select
|
|
|
|
sslh-fork: $(OBJS) sslh-fork.o Makefile common.h
|
|
$(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -o sslh-fork sslh-fork.o $(OBJS) $(LIBS)
|
|
strip sslh-fork
|
|
|
|
sslh-select: $(OBJS) sslh-select.o Makefile common.h
|
|
$(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -o sslh-select sslh-select.o $(OBJS) $(LIBS)
|
|
strip sslh-select
|
|
|
|
|
|
$(MAN): sslh.pod Makefile
|
|
pod2man --section=8 --release=$(VERSION) --center=" " sslh.pod | gzip -9 - > $(MAN)
|
|
|
|
# generic install: install binary and man page
|
|
install: sslh $(MAN)
|
|
install -D sslh-fork $(PREFIX)/sbin/sslh
|
|
install -D -m 0644 $(MAN) $(PREFIX)/share/man/man8/$(MAN)
|
|
|
|
# "extended" install for Debian: install startup script
|
|
install-debian: install sslh $(MAN)
|
|
sed -e "s+^PREFIX=+PREFIX=$(PREFIX)+" scripts/etc.init.d.sslh > /etc/init.d/sslh
|
|
chmod 755 /etc/init.d/sslh
|
|
cp scripts/etc.default.sslh /etc/default/sslh
|
|
update-rc.d sslh defaults
|
|
|
|
uninstall:
|
|
rm -f $(PREFIX)/sbin/sslh $(PREFIX)/share/man/man8/$(MAN) /etc/init.d/sslh /etc/default/sslh
|
|
update-rc.d sslh remove
|
|
|
|
clean:
|
|
rm -f sslh-fork sslh-select $(MAN) *.o
|
|
|
|
tags:
|
|
ctags -T *.[ch]
|
|
|
|
test:
|
|
./t
|
|
|