git ssb

0+

cel / sslh



Tree: 5cd1fa18753c479f7eaef26b893016a37646364f

Files: 5cd1fa18753c479f7eaef26b893016a37646364f / Makefile

1986 bytesRaw
1# Configuration
2
3VERSION="v1.13b"
4USELIBCONFIG=1 # Use libconfig? (necessary to use configuration files)
5USELIBWRAP= # Use libwrap?
6COV_TEST= # Perform test coverage?
7PREFIX=/usr/local
8
9MAN=sslh.8.gz # man page name
10
11# End of configuration -- the rest should take care of
12# itself
13
14ifneq ($(strip $(COV_TEST)),)
15 CFLAGS_COV=-fprofile-arcs -ftest-coverage
16endif
17
18CC = gcc
19CFLAGS=-Wall -g $(CFLAGS_COV)
20
21LIBS=
22OBJS=common.o sslh-main.o probe.o
23
24ifneq ($(strip $(USELIBWRAP)),)
25 LIBS:=$(LIBS) -lwrap
26 CFLAGS:=$(CFLAGS) -DLIBWRAP
27endif
28
29ifneq ($(strip $(USELIBCONFIG)),)
30 LIBS:=$(LIBS) -lconfig
31 CFLAGS:=$(CFLAGS) -DLIBCONFIG
32endif
33
34all: sslh $(MAN) echosrv
35
36.c.o: *.h
37 $(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -c $<
38
39
40sslh: $(OBJS) sslh-fork sslh-select
41
42sslh-fork: $(OBJS) sslh-fork.o Makefile common.h
43 $(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -o sslh-fork sslh-fork.o $(OBJS) $(LIBS)
44 #strip sslh-fork
45
46sslh-select: $(OBJS) sslh-select.o Makefile common.h
47 $(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -o sslh-select sslh-select.o $(OBJS) $(LIBS)
48 #strip sslh-select
49
50echosrv: $(OBJS) echosrv.o
51 $(CC) $(CFLAGS) -o echosrv echosrv.o common.o $(LIBS)
52
53$(MAN): sslh.pod Makefile
54 pod2man --section=8 --release=$(VERSION) --center=" " sslh.pod | gzip -9 - > $(MAN)
55
56# generic install: install binary and man page
57install: sslh $(MAN)
58 install -D sslh-fork $(PREFIX)/sbin/sslh
59 install -D -m 0644 $(MAN) $(PREFIX)/share/man/man8/$(MAN)
60
61# "extended" install for Debian: install startup script
62install-debian: install sslh $(MAN)
63 sed -e "s+^PREFIX=+PREFIX=$(PREFIX)+" scripts/etc.init.d.sslh > /etc/init.d/sslh
64 chmod 755 /etc/init.d/sslh
65 cp scripts/etc.default.sslh /etc/default/sslh
66 update-rc.d sslh defaults
67
68uninstall:
69 rm -f $(PREFIX)/sbin/sslh $(PREFIX)/share/man/man8/$(MAN) /etc/init.d/sslh /etc/default/sslh
70 update-rc.d sslh remove
71
72clean:
73 rm -f sslh-fork sslh-select echosrv $(MAN) *.o *.gcov *.gcno *.gcda *.png *.html *.css *.info
74
75tags:
76 ctags --globals -T *.[ch]
77
78test:
79 ./t
80
81

Built with git-ssb-web