mirror of
https://github.com/moparisthebest/sslh
synced 2024-11-13 12:45:05 -05:00
26b4bcd089
WARNING: defaults have been removed for --user and --pidfile options, update your start-up scripts! No longer stop sslh when reverse DNS requests fail for logging. Added HTTP probe. No longer create new session if running in foreground. No longer default to changing user to 'nobody'. If --user isn't specified, just run as current user. No longer create PID file by default, it should be explicitely set with --pidfile. No longer log to syslog if in foreground. Logs are instead output to stderr. The four changes above make it straightforward to integrate sslh with systemd, and should help with launchd.
76 lines
1.8 KiB
Makefile
76 lines
1.8 KiB
Makefile
# Configuration
|
|
|
|
VERSION="v1.11"
|
|
USELIBWRAP= # Use libwrap?
|
|
COV_TEST= # Perform test coverage?
|
|
PREFIX=/usr/local
|
|
|
|
MAN=sslh.8.gz # man page name
|
|
|
|
# End of configuration -- the rest should take care of
|
|
# itself
|
|
|
|
ifneq ($(strip $(COV_TEST)),)
|
|
CFLAGS_COV=-fprofile-arcs -ftest-coverage
|
|
endif
|
|
|
|
CC = gcc
|
|
CFLAGS=-Wall -g $(CFLAGS_COV)
|
|
|
|
#LIBS=-lnet
|
|
LIBS=
|
|
OBJS=common.o sslh-main.o
|
|
|
|
ifneq ($(strip $(USELIBWRAP)),)
|
|
LIBS:=$(LIBS) -lwrap
|
|
CFLAGS:=$(CFLAGS) -DLIBWRAP
|
|
endif
|
|
|
|
all: sslh $(MAN) echosrv
|
|
|
|
.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
|
|
|
|
echosrv: $(OBJS) echosrv.o
|
|
$(CC) $(CFLAGS) -o echosrv echosrv.o common.o $(LIBS)
|
|
|
|
$(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 echosrv $(MAN) *.o *.gcov *.gcno *.gcda *.png *.html *.css *.info
|
|
|
|
tags:
|
|
ctags -T *.[ch]
|
|
|
|
test:
|
|
./t
|
|
|