Files: ae008179f033c8409c69b13787a539351bace626 / Makefile
1812 bytesRaw
1 | # Configuration |
2 | |
3 | VERSION="v1.10" |
4 | USELIBWRAP= # Use libwrap? |
5 | COV_TEST= # Perform test coverage? |
6 | PREFIX=/usr/local |
7 | |
8 | MAN=sslh.8.gz # man page name |
9 | |
10 | # End of configuration -- the rest should take care of |
11 | # itself |
12 | |
13 | ifneq ($(strip $(COV_TEST)),) |
14 | CFLAGS_COV=-fprofile-arcs -ftest-coverage |
15 | endif |
16 | |
17 | CC = gcc |
18 | CFLAGS=-Wall -g $(CFLAGS_COV) |
19 | |
20 | #LIBS=-lnet |
21 | LIBS= |
22 | OBJS=common.o sslh-main.o |
23 | |
24 | ifneq ($(strip $(USELIBWRAP)),) |
25 | LIBS:=$(LIBS) -lwrap |
26 | CFLAGS:=$(CFLAGS) -DLIBWRAP |
27 | endif |
28 | |
29 | all: sslh $(MAN) echosrv |
30 | |
31 | .c.o: *.h |
32 | $(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -c $< |
33 | |
34 | |
35 | sslh: $(OBJS) sslh-fork sslh-select |
36 | |
37 | sslh-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 | |
41 | sslh-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 | |
45 | echosrv: $(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 |
52 | install: 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 |
57 | install-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 | |
63 | uninstall: |
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 | |
67 | clean: |
68 | rm -f sslh-fork sslh-select echosrv $(MAN) *.o *.gcov *.gcno *.gcda *.png *.html *.css *.info |
69 | |
70 | tags: |
71 | ctags -T *.[ch] |
72 | |
73 | test: |
74 | ./t |
75 | |
76 |
Built with git-ssb-web