git ssb

0+

cel / sslh



Tree: c02e2d7aeeba25cb53d8a81acad55318ce63a4c4

Files: c02e2d7aeeba25cb53d8a81acad55318ce63a4c4 / Makefile

2168 bytesRaw
1# Configuration
2
3VERSION="1.15"
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=$(LDFLAGS)
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 probe.o common.o $(LIBS)
52
53$(MAN): sslh.pod Makefile
54 pod2man --section=8 --release=$(VERSION) --center=" " sslh.pod | gzip -9 - > $(MAN)
55
56# Create release: export clean tree and tag current
57# configuration
58release:
59 git archive master --prefix="sslh-$(VERSION)/" | gzip > /tmp/sslh-$(VERSION).tar.gz
60
61# generic install: install binary and man page
62install: sslh $(MAN)
63 install -D sslh-fork $(PREFIX)/sbin/sslh
64 install -D -m 0644 $(MAN) $(PREFIX)/share/man/man8/$(MAN)
65
66# "extended" install for Debian: install startup script
67install-debian: install sslh $(MAN)
68 sed -e "s+^PREFIX=+PREFIX=$(PREFIX)+" scripts/etc.init.d.sslh > /etc/init.d/sslh
69 chmod 755 /etc/init.d/sslh
70 cp scripts/etc.default.sslh /etc/default/sslh
71 update-rc.d sslh defaults
72
73uninstall:
74 rm -f $(PREFIX)/sbin/sslh $(PREFIX)/share/man/man8/$(MAN) /etc/init.d/sslh /etc/default/sslh
75 update-rc.d sslh remove
76
77clean:
78 rm -f sslh-fork sslh-select echosrv $(MAN) *.o *.gcov *.gcno *.gcda *.png *.html *.css *.info
79
80tags:
81 ctags --globals -T *.[ch]
82
83test:
84 ./t
85
86

Built with git-ssb-web