-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
69 lines (54 loc) · 1.35 KB
/
Copy pathMakefile
File metadata and controls
69 lines (54 loc) · 1.35 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/make -f
### Makefile
###
### Create: 2009-12-17
### Updated: 2012-06-21
###
PACKAGE?=ssh-proxy
#URL=http://www.meadowy.org/~gotoh/projects/connect/browser/trunk/connect.c?format=raw
#URL=http://www.meadowy.org/~gotoh/ssh/connect.c
URL=https://bitbucket.org/gotoh/connect/raw/default/connect.c
INSTALL_DIR?=${DESTDIR}/usr
OBJS?=connect.o
UNAME := $(shell uname -s)
WINVER := $(shell ver)
CC=gcc
CFLAGS=
LDLIBS=
## for Mac OS X environment, use one of options
ifeq ($(UNAME), Darwin)
CFLAGS=-DBIND_8_COMPAT=1
LDLIBS=-lresolv
endif
## for Solaris
ifeq ($(UNAME), SunOS)
LDLIBS=-lresolv -lsocket -lnsl
endif
## for Microsoft Windows native
ifeq ($(findstring Windows, ${WINVER}), Windows)
ifeq (${CC}, clang)
CFLAGS=-ccc-gcc-name llvm-gcc.exe
LDLIBS=-ccc-gcc-name llvm-gcc.exe
endif
LDLIBS := ${LDLIBS} -lws2_32 -liphlpapi
endif
all default: ${PACKAGE}
install: ${PACKAGE}
-mkdir -p ${INSTALL_DIR}/bin/
install ${PACKAGE} ${INSTALL_DIR}/bin/
# ln -fs ${PACKAGE} ${INSTALL_DIR}/bin/connect
${PACKAGE}: ${OBJS}
${CC} -o $@ $^ ${LDFLAGS}
# connect.c:
# wget -O $@ "${URL}"
update:
wget -O connect.c "${URL}"
LICENCE: /usr/share/apps/LICENSES/GPL_V2
ln -fs $^ $@
##
clean:
${RM} ${PACKAGE}.o *~ ${OBJS} || echo "# $@: $^"
veryclean: clean
${RM} ${PACKAGE} ${PACKAGE}.exe || echo "# $@: $^"
rebuild: veryclean all
### End of Makefile