forked from stealth/sshttp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (34 loc) · 1.01 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# sshttp Makefile
CFLAGS=-c -O2 -Wall -ansi -pedantic
# On BSD systems you either use gmake or you delete
# the ifeq's and the Linux def part.
#
# These defs have only relevance if you use sshttp as a
# SMTP/SSH multiplexer. The SSH_BANNER _must match exactly_
# what your real ssh server tells you, otherwise the ssh client
# will detect the handshake as tempered, and will abort the
# connection. Newlines will be added by sshttpd itself.
SMTP_DOMAIN=-DSMTP_DOMAIN=\"example.com\"
SSH_BANNER=-DSSH_BANNER=\"SSH-2.0-OpenSSH_5.8\"
ifeq ($(shell uname -o), GNU/Linux)
CFLAGS+=-DUSE_CAPS
CFLAGS+=-DLINUX26
LIBS=-lcap
else
CFLAGS+=-DFREEBSD
LIBS=
endif
CXX=c++
LD=ld
all: socket.o main.o sshttp.o multicore.o
$(CXX) *.o -o sshttpd $(LIBS)
clean:
rm -rf *.o sshttpd
multicore.o: multicore.cc multicore.h
$(CXX) $(CFLAGS) multicore.cc
sshttp.o: sshttp.cc sshttp.h
$(CXX) $(CFLAGS) $(SMTP_DOMAIN) $(SSH_BANNER) sshttp.cc
main.o: main.cc
$(CXX) $(CFLAGS) main.cc
socket.o: socket.cc socket.h
$(CXX) $(CFLAGS) socket.cc