git ssb

0+

cel / sslh



Tree: ae008179f033c8409c69b13787a539351bace626

Files: ae008179f033c8409c69b13787a539351bace626 / Makefile

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

Built with git-ssb-web