blob: 569d99901919fbb74254dc076a927ba588de0673 (
plain)
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
|
NSOCK_VERSION = 0.02
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
mandir = @mandir@
srcdir = @srcdir@
datarootdir = @datarootdir@
CC = @CC@
AR = ar
RANLIB = @RANLIB@
CCOPT =
DEFS = @DEFS@ -DNSOCK_VERSION=\"$(NSOCK_VERSION)\"
# With GCC, add extra security checks to source code.
DEFS += -D_FORTIFY_SOURCE=2
INCLS = -I../include
CFLAGS = @CFLAGS@ $(CCOPT)
# CFLAGS = -g -Wall $(DEFS) $(INCLS)
CPPFLAGS = @CPPFLAGS@ $(DEFS) $(INCLS)
STATIC =
SHTOOL = ./shtool
INSTALL = $(SHTOOL) install
MAKEDEPEND = @MAKEDEPEND@
RPMTDIR=$(HOME)/rpmdir
NBASEDIR=@NBASEDIR@
NSOCKTESTDIR=@NSOCKTESTDIR@
TARGET = libnsock.a
SRCS = error.c filespace.c gh_heap.c nsock_connect.c nsock_core.c \
nsock_iod.c nsock_read.c nsock_timers.c nsock_write.c \
nsock_ssl.c nsock_event.c nsock_pool.c netutils.c nsock_pcap.c \
nsock_engines.c engine_select.c engine_epoll.c engine_kqueue.c \
engine_poll.c nsock_proxy.c nsock_log.c proxy_http.c proxy_socks4.c
OBJS = error.o filespace.o gh_heap.o nsock_connect.o nsock_core.o \
nsock_iod.o nsock_read.o nsock_timers.o nsock_write.o \
nsock_ssl.o nsock_event.o nsock_pool.o netutils.o nsock_pcap.o \
nsock_engines.o engine_select.o engine_epoll.o engine_kqueue.o \
engine_poll.o nsock_proxy.o nsock_log.o proxy_http.o proxy_socks4.o
DEPS = error.h filespace.h gh_list.h nsock_internal.h netutils.h nsock_pcap.h \
nsock_log.h nsock_proxy.h gh_heap.h ../include/nsock.h \
$(NBASEDIR)/libnbase.a
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
all: $(TARGET)
$(TARGET): $(DEPS) $(OBJS)
rm -f $@
$(AR) cr $@ $(OBJS)
$(RANLIB) $@
$(NBASEDIR)/libnbase.a: $(NBASEDIR)/Makefile
cd $(NBASEDIR) && $(MAKE)
clean-test:
cd $(NSOCKTESTDIR) && $(MAKE) clean
clean: clean-test
rm -f $(OBJS) $(TARGET)
distclean: clean
rm -f Makefile makefile.dep config.log config.status ../include/nsock_config.h $(NSOCKTESTDIR)/Makefile
depend:
$(MAKEDEPEND) $(INCLS) -s "# DO NOT DELETE" -- $(DEFS) -- $(SRCS)
check:
cd $(NSOCKTESTDIR) && $(MAKE) && ./run_tests.sh
${srcdir}/configure: configure.ac
cd ${srcdir} && autoconf
# autoheader might not change config.h.in, so touch a stamp file.
${srcdir}/config.h.in: stamp-h.in
${srcdir}/stamp-h.in: configure.ac acconfig.h \
config.h.top config.h.bot
cd ${srcdir} && autoheader
echo timestamp > ${srcdir}/stamp-h.in
config.h: stamp-h
stamp-h: config.h.in config.status
./config.status
Makefile: Makefile.in config.status
./config.status
config.status: configure
./config.status --recheck
makefile.dep:
$(CC) -MM $(CPPFLAGS) $(SRCS) > $@
-include makefile.dep
|