-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
137 lines (124 loc) · 5.74 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# Makefile for Putty Mobile Proxy
# For gcc
CC= gcc
# For ANSI compilers
#CC= cc
#For Optimization
# CFLAGS= -O2 -Wall -fno-strict-aliasing -fPIC
#For debugging
CFLAGS= -g -Wall -fPIC
#LIBS=
#INSTALLDIR=/usr/local
INSTALLDIR=$(DESTDIR)/usr
# lorder *.o | tsort
PROGS=tester
RM= /bin/rm -f
all: $(PROGS)
install: all
install -D --mode=0644 libeasyv6.so.1.0 \
$(INSTALLDIR)/lib/libeasyv6.so.1.0
install -D --mode=0644 libeasyv6.a $(INSTALLDIR)/lib/libeasyv6.a
install -D --mode=0644 easyv6.h $(INSTALLDIR)/include/easyv6.h
install -D --mode=0644 libeasyv6.pc \
$(INSTALLDIR)/lib/pkgconfig/libeasyv6.pc
rm -f $(INSTALLDIR)/lib/libeasyv6.so.1
rm -f $(INSTALLDIR)/lib/libeasyv6.so
ln -s libeasyv6.so.1.0 $(INSTALLDIR)/lib/libeasyv6.so.1
ln -s libeasyv6.so.1.0 $(INSTALLDIR)/lib/libeasyv6.so
install -D --mode=0644 addrinfototext.3 \
$(INSTALLDIR)/share/man/man3/addrinfototext.3
gzip $(INSTALLDIR)/share/man/man3/addrinfototext.3
install -D --mode=0644 connectbyaddrinfo.3 \
$(INSTALLDIR)/share/man/man3/connectbyaddrinfo.3
gzip $(INSTALLDIR)/share/man/man3/connectbyaddrinfo.3
install -D --mode=0644 connectbyname.3 \
$(INSTALLDIR)/share/man/man3/connectbyname.3
gzip $(INSTALLDIR)/share/man/man3/connectbyname.3
install -D --mode=0644 getpeernametext.3 \
$(INSTALLDIR)/share/man/man3/getpeernametext.3
gzip $(INSTALLDIR)/share/man/man3/getpeernametext.3
install -D --mode=0644 listenbyname.3 \
$(INSTALLDIR)/share/man/man3/listenbyname.3
gzip $(INSTALLDIR)/share/man/man3/listenbyname.3
install -D --mode=0644 timeoutgetaddrinfo.3 \
$(INSTALLDIR)/share/man/man3/timeoutgetaddrinfo.3
gzip $(INSTALLDIR)/share/man/man3/timeoutgetaddrinfo.3
.c.o:
$(CC) -c $(CFLAGS) $<
libeasyv6.a: easyv6.o
ar -cvq libeasyv6.a easyv6.o
gcc -shared -Wl,-soname,libeasyv6.so.1 -lrt -lanl \
-o libeasyv6.so.1.0 easyv6.o
ln -sf libeasyv6.so.1.0 libeasyv6.so.1
# ln -sf libeasyv6.so.1.0 libeasyv6.so
depend:
# makedepend -I/usr/include/linux *.c
gccmakedep *.c
tester: libeasyv6.a tester.o
$(CC) tester.o -L. -leasyv6 -lrt -lanl -o $@
clean:
rm -f *.a *.so *.so.* *.o $(PROGS)
# DO NOT DELETE
easyv6.o: easyv6.c /usr/include/netdb.h /usr/include/features.h \
/usr/include/bits/predefs.h /usr/include/sys/cdefs.h \
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
/usr/include/gnu/stubs-32.h /usr/include/netinet/in.h \
/usr/include/stdint.h /usr/include/bits/wchar.h \
/usr/include/sys/socket.h /usr/include/sys/uio.h \
/usr/include/sys/types.h /usr/include/bits/types.h \
/usr/include/bits/typesizes.h /usr/include/time.h \
/usr/lib/gcc/i486-linux-gnu/4.4.5/include/stddef.h /usr/include/endian.h \
/usr/include/bits/endian.h /usr/include/bits/byteswap.h \
/usr/include/sys/select.h /usr/include/bits/select.h \
/usr/include/bits/sigset.h /usr/include/bits/time.h \
/usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
/usr/include/bits/uio.h /usr/include/bits/socket.h \
/usr/include/bits/sockaddr.h /usr/include/asm/socket.h \
/usr/include/asm-generic/socket.h /usr/include/asm/sockios.h \
/usr/include/asm-generic/sockios.h /usr/include/bits/in.h \
/usr/include/rpc/netdb.h /usr/include/bits/siginfo.h \
/usr/include/bits/netdb.h easyv6.h /usr/include/errno.h \
/usr/include/bits/errno.h /usr/include/linux/errno.h \
/usr/include/asm/errno.h /usr/include/asm-generic/errno.h \
/usr/include/asm-generic/errno-base.h /usr/include/xlocale.h \
/usr/include/stdlib.h /usr/include/bits/waitflags.h \
/usr/include/bits/waitstatus.h /usr/include/alloca.h \
/usr/include/string.h /usr/include/unistd.h \
/usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
/usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
/usr/include/bits/fcntl.h /usr/include/sys/stat.h \
/usr/include/bits/stat.h /usr/include/sys/time.h /usr/include/stdio.h \
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
/usr/lib/gcc/i486-linux-gnu/4.4.5/include/stdarg.h \
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
/usr/include/arpa/inet.h /usr/include/pthread.h /usr/include/sched.h \
/usr/include/bits/sched.h /usr/include/signal.h \
/usr/include/bits/setjmp.h
tester.o: tester.c easyv6.h /usr/include/sys/types.h \
/usr/include/features.h /usr/include/bits/predefs.h \
/usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \
/usr/include/gnu/stubs.h /usr/include/gnu/stubs-32.h \
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
/usr/include/time.h /usr/lib/gcc/i486-linux-gnu/4.4.5/include/stddef.h \
/usr/include/endian.h /usr/include/bits/endian.h \
/usr/include/bits/byteswap.h /usr/include/sys/select.h \
/usr/include/bits/select.h /usr/include/bits/sigset.h \
/usr/include/bits/time.h /usr/include/sys/sysmacros.h \
/usr/include/bits/pthreadtypes.h /usr/include/sys/socket.h \
/usr/include/sys/uio.h /usr/include/bits/uio.h \
/usr/include/bits/socket.h /usr/include/bits/sockaddr.h \
/usr/include/asm/socket.h /usr/include/asm-generic/socket.h \
/usr/include/asm/sockios.h /usr/include/asm-generic/sockios.h \
/usr/include/netdb.h /usr/include/netinet/in.h /usr/include/stdint.h \
/usr/include/bits/wchar.h /usr/include/bits/in.h \
/usr/include/rpc/netdb.h /usr/include/bits/netdb.h /usr/include/stdio.h \
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
/usr/lib/gcc/i486-linux-gnu/4.4.5/include/stdarg.h \
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
/usr/include/errno.h /usr/include/bits/errno.h \
/usr/include/linux/errno.h /usr/include/asm/errno.h \
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
/usr/include/stdlib.h /usr/include/alloca.h /usr/include/unistd.h \
/usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
/usr/include/getopt.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
/usr/include/string.h /usr/include/xlocale.h