forked from DataSoft/Honeyd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
240 lines (207 loc) · 9.09 KB
/
Makefile.am
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# required Python modules
if COND_PYPCAP
MAYBE_PYPCAP = pypcap
endif
if COND_PYDPKT
MAYBE_PYDPKT = dpkt
endif
if COND_REGRESS
MAYBE_REGRESS = regress
endif
SUBDIRS = . $(MAYBE_PYPCAP) $(MAYBE_PYDPKT) $(MAYBE_REGRESS)
AUTOMAKE_OPTIONS = foreign no-dependencies
########################################################################
##
## libhoneyd, the honeyd preload library. Wrapped around
## server applications to make them communicate through
## honeyd.
##
########################################################################
## Preload library
## This is how it should work but libtool is so broken
#pkglib_LTLIBRARIES = libhoneyd.la
#libhoneyd_la_SOURCES = honeyd_overload.c atomicio.c fdpass.c fdpass.h
#libhoneyd_la_LDFLAGS = -module -export-dynamic -avoid-version
## Bad hack with help from [email protected] to actually get this
## working on Linux
LIBHONEYDFILES= honeyd_overload.lo atomicio.lo fdpass.lo
libhoneyd.so: $(LIBHONEYDFILES)
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o [email protected] \
-rpath $(libdir)/honeyd $(LIBHONEYDFILES) $(LIBS) $(LDFLAGS) \
-module -avoid-version -nostdlib @LIBDL@
rm -f [email protected] [email protected]* $@
cp .libs/[email protected] $@ || cp .libs/libtmp$@ $@
rm -f .libs/libtmp$@.*
libhoneyddir = $(libdir)/honeyd
libhoneyd_DATA = libhoneyd.so
# Configuration files for Honeyd
honeyddatadir = $(datadir)/honeyd
honeydlibdir = $(libdir)/honeyd
honeydincludedir = $(includedir)/honeyd
honeyddata_DATA = README nmap.assoc xprobe2.conf nmap-os-db config.sample \
config.ethernet pf.os nmap-mac-prefixes
honeydplugins = @PLUGINS@
honeydpluginsdeclare = @PLUGINSDECLARE@
########################################################################
##
## Honeyd itself. It uses plugins, so we need to install a few header
## files that plugins can pick up when being built so that they know
## how to register etc.
##
########################################################################
bin_PROGRAMS = honeyd honeydctl honeydstats hsniff
honeyddata_PROGRAMS = $(SMTP_BIN) $(PROXY_BIN)
EXTRA_PROGRAMS = smtp proxy
# Install the header files in a separate subdirectory. Note that
# honeydincludedir is the directory reported to the user, who has to
# use that directory as an -I include directive with #include <honeyd/foo.h>.
# pkgincludedir includes the additional honeyd directory since that's
# where the headers are actually installed.
pkgincludedir = $(honeydincludedir)
pkginclude_HEADERS = hooks.h plugins.h plugins_config.h debug.h
honeyd_SOURCES = honeyd.c command.c parse.y lex.l config.c personality.c \
util.c ipfrag.c router.c tcp.c udp.c xprobe_assoc.c log.c \
fdpass.c atomicio.c subsystem.c hooks.c plugins.c \
plugins_config.c pool.c interface.c arp.c gre.c \
honeyd.h personality.h ipfrag.h router.h network.c network.h \
tcp.h udp.h parse.h \
xprobe_assoc.h subsystem.h fdpass.h hooks.h plugins.h \
plugins_config.h template.h pool.h interface.h arp.h gre.h \
log.h pfctl_osfp.c pf_osfp.c pfvar.h condition.c condition.h \
osfp.c osfp.h ui.c ui.h ethernet.c ethernet.h \
parser.h tagging.c tagging.h stats.c stats.h \
dhcpclient.c dhcpclient.h rrdtool.c rrdtool.h \
histogram.c histogram.h untagging.c untagging.h
honeyd_DEPENDENCIES = @PYEXTEND@ @LIBOBJS@
honeyd_LDADD = @PYEXTEND@ @LIBOBJS@ @PYTHONLIB@ @EVENTLIB@ @PCAPLIB@ \
@DNETLIB@ @ZLIB@ @PLUGINLIB@ -lm
# Allow plugins to use honeyd's functions:
honeyd_LDFLAGS = -export-dynamic
# Honeyd stats collector
#
honeydstats_SOURCES = honeydstats.c honeydstats.h \
honeydstats_main.c tagging.c tagging.h \
stats.c stats.h util.c histogram.c histogram.h analyze.c analyze.h \
untagging.c untagging.h filter.c filter.h keycount.c keycount.h
honeydstats_LDADD = @LIBOBJS@ @DNETLIB@ @EVENTLIB@ @ZLIB@
honeydstats_CPPFLAGS = -I$(top_srcdir)/@DNETCOMPAT@ -I$(top_srcdir)/compat \
@EVENTINC@ @DNETINC@ @ZINC@
honeydstats_CFLAGS = -O0 -Wall
#
# Honeyd stats sniffer
#
hsniff_SOURCES = hsniff.c hsniff.h tagging.c tagging.h \
stats.c stats.h util.c util.h hooks.c hooks.h interface.c interface.h \
pfctl_osfp.c pf_osfp.c pfvar.h osfp.c osfp.h network.c network.h
hsniff_LDADD = @LIBOBJS@ @PCAPLIB@ @DNETLIB@ @EVENTLIB@ @ZLIB@
hsniff_CPPFLAGS = -I$(top_srcdir)/@DNETCOMPAT@ -I$(top_srcdir)/compat \
@EVENTINC@ @PCAPINC@ @DNETINC@ @ZINC@
hsniff_CFLAGS = -O2 -Wall -DPATH_HONEYDDATA="\"$(honeyddatadir)\""
#
# Honeyd control application
#
honeydctl_SOURCES = honeydctl.c
honeydctl_LDADD = @LIBOBJS@ @EDITLIB@ @LIBCURSES@
honeydctl_CPPFLAGS = @EDITINC@
honeydctl_CFLAGS = -O2 -Wall
CFLAGS = -O2 -Wall -g \
-DPATH_HONEYDINCLUDE="\"$(honeydincludedir)\"" \
-DPATH_HONEYDDATA="\"$(honeyddatadir)\"" \
-DPATH_HONEYDLIB="\"$(honeydlibdir)\"" \
-DHONEYD_PLUGINS_DECLARE="$(honeydpluginsdeclare)" \
-DHONEYD_PLUGINS="$(honeydplugins)" \
-DPATH_RRDTOOL="\"$(PATH_RRDTOOL)\"" \
-D_GNU_SOURCE
INCLUDES = -I$(top_srcdir)/@DNETCOMPAT@ -I$(top_srcdir)/compat \
@PYTHONINC@ @EVENTINC@ @PCAPINC@ @DNETINC@ @ZINC@
########################################################################
## Simple subsystems to be used with Honeyd
########################################################################
smtp_SOURCES = subsystems/smtp.c subsystems/smtp.h subsystems/smtp_main.c \
subsystems/smtp_messages.h atomicio.c \
util.c util.h honeyd_overload.h
smtp_LDADD = @LIBOBJS@ @EVENTLIB@ @DNETLIB@ @PCAPLIB@ @PCRELIB@
smtp_CPPFLAGS = -I$(top_srcdir)/@DNETCOMPAT@ -I$(top_srcdir)/compat \
@EVENTINC@ @DNETINC@ @PCREINC@
smtp_CFLAGS = -O2 -Wall
proxy_SOURCES = subsystems/proxy.c subsystems/proxy.h subsystems/proxy_main.c \
subsystems/proxy_messages.h subsystems/smtp.c subsystems/smtp.h \
subsystems/smtp_messages.h atomicio.c \
util.c util.h honeyd_overload.h
proxy_LDADD = @LIBOBJS@ @EVENTLIB@ @DNETLIB@ @PCAPLIB@ @PCRELIB@
proxy_CPPFLAGS = -I$(top_srcdir)/@DNETCOMPAT@ -I$(top_srcdir)/compat \
@EVENTINC@ @DNETINC@ @PCREINC@
proxy_CFLAGS = -O2 -Wall
########################################################################
##
## Miscellaneous stuff -- files we need to include in the package,
## manpage, yacc/lex stuff etc.
##
########################################################################
man_MANS = honeyd.8 honeydctl.1
WEBDIR_FILES = webserver/htmltmpl.py \
webserver/htdocs/images/logo.gif webserver/htdocs/images/edit.gif \
webserver/htdocs/images/delete.gif webserver/htdocs/images/add.gif \
webserver/htdocs/images/arrow_down.gif \
webserver/htdocs/images/arrow_right.gif \
webserver/htdocs/images/google_logo.gif \
webserver/htdocs/templates/inc/header.tmpl \
webserver/htdocs/templates/inc/footer.tmpl \
webserver/htdocs/templates/inc/main.tmpl \
webserver/htdocs/templates/inc/nav.tmpl \
webserver/htdocs/templates/config_ip.tmpl \
webserver/htdocs/templates/index.tmpl \
webserver/htdocs/templates/status_connections.tmpl \
webserver/htdocs/templates/status_stats.tmpl \
webserver/htdocs/graphs/traffic_daily.gif \
webserver/htdocs/graphs/traffic_hourly.gif \
webserver/htdocs/index.py \
webserver/htdocs/styles/layout.css \
webserver/htdocs/config.py \
webserver/support.py \
webserver/server.py
# Automake sucks - but that's ok
PYTHON_FILES = pypcap/CHANGES pypcap/pcap_ex.c \
pypcap/test.py pypcap/LICENSE pypcap/pcap_ex.h \
pypcap/testsniff.py pypcap/Makefile.am pypcap/Makefile.in \
pypcap/pcap.c pypcap/setup.py \
pypcap/README pypcap/pcap.pyx pypcap/test.pcap \
dpkt/AUTHORS dpkt/dpkt/gre.py dpkt/dpkt/ppp.py \
dpkt/CHANGES dpkt/HACKING dpkt/dpkt/hsrp.py dpkt/dpkt/rpc.py \
dpkt/LICENSE dpkt/Makefile dpkt/dpkt/http.py dpkt/dpkt/smb.py \
dpkt/README dpkt/dpkt/__init__.py dpkt/dpkt/icmp.py dpkt/dpkt/stp.py \
dpkt/dpkt/ah.py dpkt/dpkt/icmp6.py dpkt/dpkt/stun.py \
dpkt/dpkt/aim.py dpkt/dpkt/igmp.py dpkt/dpkt/tcp.py \
dpkt/dpkt/arp.py dpkt/dpkt/ip.py dpkt/dpkt/telnet.py \
dpkt/dpkt/asn1.py dpkt/dpkt/ip6.py dpkt/dpkt/tftp.py \
dpkt/dpkt/cdp.py dpkt/dpkt/ipx.py dpkt/dpkt/tns.py \
dpkt/dpkt/dhcp.py dpkt/dpkt/loopback.py dpkt/dpkt/udp.py \
dpkt/dpkt/dns.py dpkt/dpkt/netbios.py dpkt/dpkt/vrrp.py \
dpkt/dpkt/dpkt.py dpkt/dpkt/netflow.py dpkt/dpkt/yahoo.py \
dpkt/dpkt/dtp.py dpkt/dpkt/ospf.py dpkt/examples/dnsping.py \
dpkt/dpkt/esp.py dpkt/dpkt/pcap.py dpkt/examples/ping.py \
dpkt/setup.py \
dpkt/dpkt/ethernet.py dpkt/dpkt/pim.py dpkt/tests/test-perf.py \
dpkt/tests/test-perf2.py
# TODO: Fix this, half the scripts are missing and this will probably break gzipping
EXTRA_DIST = $(man_MANS) $(WEBDIR_FILES) $(PYTHON_FILES) \
acconfig.h $(honeyddata_DATA) LICENSE sha1.c \
compat/sys/tree.h compat/sys/queue.h compat/err.h compat/sha1.h \
compat/libdnet/dnet.h compat/getopt.h \
honeyd_overload.c pyextend.c pyextend.h \
pydataprocessing.c pydataprocessing.h \
pydatahoneyd.c pydatahoneyd.h scripts
install-data-local:
$(mkdir_p) "$(DESTDIR)$(honeyddatadir)"
(cd $(top_srcdir) && tar -cf - $(top_srcdir)/webserver) | \
(cd $(DESTDIR)$(honeyddatadir) && tar -xf -)
find $(DESTDIR)$(honeyddatadir)/webserver -type f | xargs chmod a+r
find $(DESTDIR)$(honeyddatadir)/webserver -type d | xargs chmod a+xr
(cd $(top_srcdir) && tar -cf - $(top_srcdir)/scripts) | \
(cd $(DESTDIR)$(honeyddatadir) && tar -xf -)
python $(DESTDIR)$(honeyddatadir)/scripts/lib/init.py
CLEANFILES = *.so
DISTCLEANFILES = *~
LEX_OUTPUT_ROOT = lex.hyd
LFLAGS = -Phyd
YFLAGS = -d