git ssb

0+

cel / sslh



Tree: 2781c75ff99cd5da7b25f6b883d78ff3de987308

Files: 2781c75ff99cd5da7b25f6b883d78ff3de987308 / Makefile

2273 bytesRaw
1# Configuration
2
3VERSION="1.14"
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 svn export . /tmp/sslh-$(VERSION)
60 ( cd /tmp; tar zcvf /tmp/sslh-$(VERSION).tar.gz sslh-$(VERSION) )
61 ( cd .. ; svn copy trunk tags/sslh-$(VERSION) ; cd tags/sslh-$(VERSION) ; make clean )
62
63# generic install: install binary and man page
64install: sslh $(MAN)
65 install -D sslh-fork $(PREFIX)/sbin/sslh
66 install -D -m 0644 $(MAN) $(PREFIX)/share/man/man8/$(MAN)
67
68# "extended" install for Debian: install startup script
69install-debian: install sslh $(MAN)
70 sed -e "s+^PREFIX=+PREFIX=$(PREFIX)+" scripts/etc.init.d.sslh > /etc/init.d/sslh
71 chmod 755 /etc/init.d/sslh
72 cp scripts/etc.default.sslh /etc/default/sslh
73 update-rc.d sslh defaults
74
75uninstall:
76 rm -f $(PREFIX)/sbin/sslh $(PREFIX)/share/man/man8/$(MAN) /etc/init.d/sslh /etc/default/sslh
77 update-rc.d sslh remove
78
79clean:
80 rm -f sslh-fork sslh-select echosrv $(MAN) *.o *.gcov *.gcno *.gcda *.png *.html *.css *.info
81
82tags:
83 ctags --globals -T *.[ch]
84
85test:
86 ./t
87
88

Built with git-ssb-web