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