source: trunk/Makefile.in@ 437

Last change on this file since 437 was 425, checked in by katerina, 12 years ago

Fix for tickets #329, #330, #331, #332

File size: 78.9 KB
RevLine 
[60]1#
2# Copyright Rainer Wichmann (2006)
3#
4# License Information:
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
[1]10# This program is distributed in the hope that it will be useful,
[60]11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
[1]18
[60]19
[1]20# --- boiler-plate stuff ---
21#
22SHELL = /bin/sh
23
24srcdir = @srcdir@
25srcsrc = @srcdir@/src
26srcinc = @srcdir@/include
27top_srcdir = @top_srcdir@
28
29# Don't use VPATH - it's a portability mess
30#
31# VPATH = $(top_srcdir)/src
32
33prefix = @prefix@
34exec_prefix = @exec_prefix@
35
36sbindir = @sbindir@
37sysconfdir = @sysconfdir@
38localstatedir = @localstatedir@
39mandir = @mandir@
[170]40datarootdir = @datarootdir@
[302]41mytmpdir = @mytmpdir@
[1]42
43configfile = @myconffile@
44mydatafile = @mydatafile@
45mylockfile = @mylockfile@
46mylogfile = @mylogfile@
47
48mydatadir = @mydataroot@
49mylogdir = @mylogdir@
50mylockdir = @mylockdir@
51
52selectconfig = @selectconfig@
53
54top_builddir = .
55
56INSTALL = @INSTALL@
57INSTALL_PROGRAM = @INSTALL@ -s -m 700
58INSTALL_SHELL = @INSTALL@ -m 700
59INSTALL_DATA = @INSTALL@ -m 600
60INSTALL_MAN = @INSTALL@ -m 644
61INSTALL_SCRIPT = @INSTALL_SCRIPT@
62INSTALL_NAME = @install_name@
63INSTALL_DSYS = @INSTALL@ -m 755
64
65PACKAGE = @PACKAGE@
66VERSION = @VERSION@
[245]67BUILD_NUM = 1
[1]68
[245]69DEFAULT_MAINTAINER = Nobody Nowhere <nobody@example.com>
70
[1]71VFLAG = @mytclient@
72SETPWD = @setpwd_prg@
73STEGIN = @stegin_prg@
74SAMHAIN = @sh_main_prg@
75YULECTL = @yulectl_prg@
76XOR_CODE = @xor_code@
77SH_LKM = @sh_lkm@
[18]78TIGER_SRC = @tiger_src@
[1]79
80ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
81mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
82
83
84CC = @CC@
[98]85BUILD_CC = @BUILD_CC@
[18]86# DBGDEF = -pg -DSH_PROFILE=1
[1]87DBGDEF = @mydebugdef@
88DEFS = $(DBGDEF) @DEFS@ -I. -I$(top_srcdir)/include
89CPPFLAGS = @CPPFLAGS@
90LDFLAGS = @LDFLAGS@
91LIBS_TRY = @LIBS@
92LIBS_SOCK = @sh_libsocket@
93LIBS_KVM = @sh_libkvm@
94CFLAGS = @CFLAGS@
[68]95CUTEST =
96COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(CUTEST)
[1]97LINK = $(CC) $(DBGDEF) -O $(LDFLAGS) -o $@
98
99DESTDIR =
100
101TAR = tar
102GZIP = --best
103
104# For creating a packed client
105#
106CLIENTPASSWD =
107
108.SUFFIXES: # Delete the default suffixes
109
110#
111# --- Files -------
112#
113
114
115HEADERS = samhain.h sh_unix.h sh_utils.h sh_error.h sh_error_min.h sh_files.h \
[214]116 sh_getopt.h sh_readconf.h sh_tiger.h sh_hash.h \
[215]117 sh_mail.h sh_mail_int.h sh_nmail.h sh_filter.h \
[1]118 sh_mem.h sh_entropy.h sh_forward.h sh_modules.h sh_utmp.h \
119 sh_kern.h sh_suidchk.h sh_srp.h sh_fifo.h sh_html.h sh_tools.h \
120 sh_gpg.h sh_cat.h sh_calls.h sh_extern.h sh_database.h sh_trace.h \
121 sh_schedule.h bignum.h trustfile.h slib.h zAVLTree.h \
122 lzoconf.h minilzo.h rijndael-alg-fst.h rijndael-api-fst.h \
123 rijndael-boxes-fst.h sh_socket.h sh_ignore.h sh_prelude.h \
[68]124 sh_mounts.h sh_userfiles.h sh_static.h sh_prelink.h \
[183]125 sh_processcheck.h sh_portcheck.h sh_pthread.h sh_string.h \
[265]126 sh_log_check.h sh_log_evalrule.h sh_log_correlate.h \
[310]127 sh_log_mark.h sh_log_repeat.h sh_inotify.h sh_registry.h sh_ipvx.h \
[367]128 sh_restrict.h sh_sub.h sh_fInotify.h
[1]129
130
131SOURCES = $(srcsrc)/samhain.c $(srcsrc)/sh_unix.c \
132 $(srcsrc)/sh_utils.c $(srcsrc)/sh_error.c \
133 $(srcsrc)/sh_files.c $(srcsrc)/sh_getopt.c \
134 $(srcsrc)/sh_readconf.c $(srcsrc)/sh_tiger0.c \
135 $(srcsrc)/sh_tiger1.c $(srcsrc)/sh_tiger2.c \
136 $(srcsrc)/sh_tiger1_64.c $(srcsrc)/sh_tiger2_64.c \
[214]137 $(srcsrc)/sh_hash.c $(srcsrc)/sh_mail.c $(srcsrc)/sh_nmail.c \
[1]138 $(srcsrc)/sh_mem.c $(srcsrc)/sh_entropy.c \
139 $(srcsrc)/sh_forward.c $(srcsrc)/sh_modules.c \
[279]140 $(srcsrc)/sh_utmp.c $(srcsrc)/sh_login_track.c $(srcsrc)/sh_kern.c \
[1]141 $(srcsrc)/sh_suidchk.c $(srcsrc)/sh_srp.c \
142 $(srcsrc)/sh_fifo.c $(srcsrc)/sh_tools.c \
143 $(srcsrc)/sh_html.c $(srcsrc)/sh_gpg.c \
144 $(srcsrc)/sh_cat.c $(srcsrc)/sh_calls.c \
145 $(srcsrc)/sh_extern.c $(srcsrc)/sh_database.c \
146 $(srcsrc)/sh_err_log.c $(srcsrc)/sh_err_console.c \
147 $(srcsrc)/sh_err_syslog.c $(srcsrc)/sh_schedule.c \
148 $(srcsrc)/bignum.c $(srcsrc)/mkhdr.c \
149 $(srcsrc)/samhain_setpwd.c $(srcsrc)/samhain_stealth.c \
150 $(srcsrc)/encode.c $(srcsrc)/sstrip.c \
151 $(srcsrc)/trustfile.c $(srcsrc)/exepack.c \
152 $(srcsrc)/exepack_fill.c $(srcsrc)/exepack_mkdata.c \
153 $(srcsrc)/minilzo.c $(srcsrc)/slib.c \
154 $(srcsrc)/rijndael-alg-fst.c $(srcsrc)/rijndael-api-fst.c \
155 $(srcsrc)/zAVLTree.c $(srcsrc)/bignum.c \
156 $(srcsrc)/sh_socket.c $(srcsrc)/sh_ignore.c \
157 $(srcsrc)/yulectl.c $(srcsrc)/sh_mounts.c \
158 $(srcsrc)/sh_userfiles.c $(srcsrc)/sh_prelude.c \
159 $(srcsrc)/sh_prelink.c $(srcsrc)/sh_static.c \
[180]160 $(srcsrc)/sh_portcheck.c $(srcsrc)/sh_port2proc.c\
[215]161 $(srcsrc)/sh_processcheck.c $(srcsrc)/sh_filter.c \
[171]162 $(srcsrc)/sh_pthread.c $(srcsrc)/sh_string.c \
[183]163 $(srcsrc)/sh_log_parse_syslog.c $(srcsrc)/sh_log_parse_pacct.c \
[275]164 $(srcsrc)/sh_log_parse_samba.c $(srcsrc)/sh_log_parse_generic.c \
[183]165 $(srcsrc)/sh_log_parse_apache.c $(srcsrc)/sh_log_evalrule.c \
[265]166 $(srcsrc)/sh_log_correlate.c $(srcsrc)/sh_log_mark.c \
[183]167 $(srcsrc)/sh_log_check.c $(srcsrc)/dnmalloc.c \
[265]168 $(srcsrc)/sh_inotify.c $(srcsrc)/sh_log_repeat.c \
[294]169 $(srcsrc)/sh_audit.c $(srcsrc)/sh_registry.c \
[315]170 $(srcsrc)/sh_ipvx.c $(srcsrc)/sh_restrict.c \
[367]171 $(srcsrc)/sh_filetype.c $(srcsrc)/sh_sub.c $(srcsrc)/sh_fInotify.c\
172 $(srcsrc)/t-test1.c
[1]173
[18]174OBJECTS = sh_files.o sh_tiger0.o sh_tiger2.o sh_tiger2_64.o \
175 samhain.o sh_unix.o sh_utils.o sh_error.o \
[215]176 sh_getopt.o sh_readconf.o sh_filter.o \
[279]177 sh_hash.o sh_mail.o sh_nmail.o sh_mem.o sh_login_track.o \
[1]178 sh_entropy.o sh_forward.o sh_modules.o sh_utmp.o sh_kern.o \
179 sh_suidchk.o sh_srp.o sh_fifo.o sh_tools.o sh_html.o sh_gpg.o \
180 sh_cat.o sh_calls.o sh_extern.o sh_database.o sh_err_log.o \
181 sh_err_console.o sh_err_syslog.o sh_schedule.o bignum.o \
182 trustfile.o rijndael-alg-fst.o rijndael-api-fst.o slib.o \
183 zAVLTree.o sh_socket.o sh_ignore.o sh_prelude.o \
[18]184 sh_mounts.o sh_userfiles.o sh_prelink.o sh_static.o \
[181]185 sh_processcheck.o sh_portcheck.o sh_port2proc.o \
[183]186 sh_log_parse_syslog.o sh_log_parse_pacct.o sh_log_parse_apache.o \
[185]187 sh_log_parse_samba.o sh_log_evalrule.o sh_log_check.o \
[275]188 sh_log_parse_generic.o \
[265]189 sh_log_correlate.o sh_log_mark.o sh_log_repeat.o \
[294]190 sh_pthread.o sh_string.o sh_inotify.o dnmalloc.o \
[315]191 sh_audit.o sh_registry.o sh_ipvx.o sh_restrict.o \
[367]192 sh_filetype.o sh_sub.o sh_fInotify.o
[1]193
194KERN = kern_head.h kern_head.c
195
196TESTSUITE = test.sh testcompile.sh testhash.sh testtiger.txt \
197 testtimesrv.sh \
[68]198 testext.sh testrc_1ext.in test_ext.c.in testrun_1d.sh \
[23]199 testrun_1.sh testrun_1a.sh testrun_1b.sh testrun_1c.sh testrc_1 \
[1]200 testrun_2.sh testrun_2a.sh testrun_2b.sh testrc_2.in \
201 testrun_2c.sh testrun_2d.sh
202
203DIST_COMMON = README COPYING LICENSE samhain.jpg \
204samhainrc.linux samhainrc.solaris samhainrc.freebsd samhainrc.aix5.2.0 \
[57]205samhainrc.netbsd yulerc.template \
[1]206Install.sh
207
208DIST_NEEDED = Makefile.in deploy.sh.in samhain-install.sh.in \
209samhain.spec.in rules.deb.in rules.deb-light.in samhain.spec hp_ux.psf.in \
210stealth_template.jpg \
211config.guess config.h.in stamp-h.in config.sub configure \
212configure.ac acconfig.h aclocal.m4 install-sh missing mkinstalldirs \
213c_random.sh c_bits.sh depend.sum depend.dep stamp-hdep
214
215DISTFILES = $(DIST_COMMON) $(DIST_NEEDED) \
216 src include man scripts init docs sql_init test dsys
217
218PROGRAMS = $(SETPWD) $(STEGIN) $(SAMHAIN) $(YULECTL)
219
220#----------------------------------------------------------
221#
222# the first target is the default one
223#
224#----------------------------------------------------------
225
226all: $(top_srcdir)/depend.sum $(SETPWD) $(STEGIN) $(SAMHAIN) $(YULECTL) @sh_lkm@ sstrip
227
228
229#----------------------------------------------------------
230#
231# rules for automatic updating of configuration information
232# after changing the configuration files
233#
234#----------------------------------------------------------
235
236$(top_srcdir)/configure: $(top_srcdir)/configure.ac $(top_srcdir)/aclocal.m4
237 cd $(srcdir) && autoconf
238
239# autoheader might not change config.h.in, so touch a stamp file.
240$(top_srcdir)/config.h.in: $(top_srcdir)/stamp-h.in
241 touch $(top_srcdir)/config.h.in
242
243$(top_srcdir)/stamp-h.in: $(top_srcdir)/configure.ac $(top_srcdir)/aclocal.m4
244 cd $(top_srcdir) && autoheader
245 echo timestamp > $(top_srcdir)/stamp-h.in
246
247config.h: stamp-h
248 @sleep 1; \
249 touch config.h
250
251stamp-h: $(top_srcdir)/config.h.in config.status
252 ./config.status
253
254Makefile: $(top_srcdir)/Makefile.in config.status
255 ./config.status
256
257samhain-install.sh: $(top_srcdir)/samhain-install.sh.in config.status
258 ./config.status
259
260config.status: $(top_srcdir)/configure
261 ./config.status --recheck
262
263#----------------------------------------------------------
264#
265# rules for automatic dependency tracking
266#
267#----------------------------------------------------------
268
269
270depend-gen: $(srcsrc)/depend-gen.c
[98]271 @echo "$(BUILD_CC) -I. -o depend-gen $(srcsrc)/depend-gen.c"; \
272 $(BUILD_CC) -I. -o depend-gen $(srcsrc)/depend-gen.c 2>/dev/null || \
[1]273 echo "failed to compile ... hope depend.dep is ok"
274
275# redo if sources change
276#
277$(top_srcdir)/depend.dep: depend-gen $(SOURCES)
278 @echo "update depend.dep ..."; \
279 test -f $(srcdir)/depend.dep || echo > $(srcdir)/depend.dep; \
280 if test -f depend-gen; then \
281 failfiles=""; \
282 for ff in $(SOURCES) $(srcsrc)/kern_head.c; do \
283 ./depend-gen -i '$$(srcinc)/' -o $(top_srcdir)/depend.dep $$ff || \
284 failfiles="$${failfiles} $$ff"; \
285 done; \
286 if test x"$${failfiles}" != x; then \
287 echo "--------------------------------------------------------";\
288 echo " depend-gen failed to update depend.dep. You can safely"; \
289 echo " ignore this error, unless you have modified the source"; \
290 echo " files and changed their dependencies."; \
291 echo "--------------------------------------------------------";\
292 else \
293 echo $(srcsrc) > $(top_srcdir)/stamp-dep; \
294 fi; \
295 else \
296 echo "depend-gen not found ... depend.dep not modified"; \
297 fi
298
299# only updated if depencies change
300#
301$(top_srcdir)/depend.sum: $(top_srcdir)/depend.dep
302 @if test -f depend-gen; then \
303 nsum=`./depend-gen -c $(top_srcdir)/depend.dep|awk '{print $$1}'`; \
304 osum=`cat $(top_srcdir)/depend.sum 2>/dev/null`; \
305 if test "x$$osum" != "x$$nsum"; then \
306 echo "update $(top_srcdir)/depend.sum ..."; \
307 echo $$nsum > $(top_srcdir)/depend.sum; \
308 echo timestamp > $(top_srcdir)/stamp-hdep; \
309 fi; \
310 fi;
311
[95]312$(top_srcdir)/stamp-hdep:
313 touch $(top_srcdir)/stamp-hdep && touch $(top_srcdir)/Makefile.in
314
[1]315$(top_srcdir)/Makefile.in: $(top_srcdir)/stamp-hdep
316 @echo "update Makefile.in ..."; \
317 echo "cp Makefile.in Makefile.in.bak"; \
318 cp $(top_srcdir)/Makefile.in $(top_srcdir)/Makefile.in.bak; \
319 if test -f depend-gen; then \
320 failfiles=""; \
321 for ff in $(SOURCES) $(srcsrc)/kern_head.c; do \
322 ./depend-gen -i '$$(srcinc)/' -o $(top_srcdir)/Makefile.in $$ff || \
323 failfiles="$${failfiles} $$ff"; \
324 done; \
325 if test x"$${failfiles}" != x; then \
326 echo "--------------------------------------------------------";\
327 echo " depend-gen failed to update Makefile.in. You can safely"; \
328 echo " ignore this error, unless you have modified the source"; \
329 echo " files and changed their dependencies."; \
330 echo "--------------------------------------------------------";\
331 else \
332 echo $(srcsrc) > $(top_srcdir)/stamp-dep; \
333 fi; \
334 fi
335
336# do it manually
337#
338depend: depend-gen
339 @echo "update Makefile.in ..."; \
340 for ff in $(SOURCES) $(srcsrc)/kern_head.c; do \
341 ./depend-gen -i '$$(srcinc)/' -o $(top_srcdir)/Makefile.in $$ff; \
342 echo $(srcsrc) > $(top_srcdir)/stamp-dep; \
343 done
344
345
346#----------------------------------------------------------
347#
348# CLEAN rules
349#
350#----------------------------------------------------------
351
352
353# everything created by make
354#
355
356CLEANFILES = encode config_xor.h depend-gen sh_ks.h sh_ks_xor.h kern_head \
[19]357 internal.h sh_MK.h trustfile sstrip samhain mkhdr encode cutest \
[425]358 yule samhain_setpwd samhain_stealth samhainrc yulectl \
359 samhain_hide.ko samhain_kmem.ko
[1]360
361clean:
362 -rm -f core *.o
363 @-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
364
365
366# everything created by (./configure && make)
367#
368
369DISTCLEANFILES = Makefile samhain.spec sh_gpg_checksum.h sh_gpg_fp.h \
370 init/samhain.startLinux init/samhain.startGentoo \
371 init/samhain.startLSB init/samhain.startFreeBSD \
372 init/samhain.startSolaris init/samhain.startHPUX \
[71]373 init/samhain.startIRIX init/samhain.startMACOSX \
[1]374 deploy.sh sh_MK.h samhain-install.sh sh_gpg_chksum.h sh_gpg_fp.h \
375 rules.deb rules.deb-light \
376 scripts/samhainadmin.pl scripts/check_samhain.pl \
377 scripts/samhain.ebuild scripts/samhain.ebuild-light
378
379TESTCLEANFILES = samhain.build samhain.new yule.html \
[170]380 test_ext test_ext.c test_ext.res testhash.tmp \
[171]381 testrc1.signed testrc_1ext testrc_2 testrc_2.signed \
382 test_dnmalloc
[1]383
384distclean: clean
385 -rm -f config.status config.log configure.lineno config.h config.cache
386 @-test -z "$(TESTCLEANFILES)" || rm -f $(TESTCLEANFILES)
387 @-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
388
389
390#----------------------------------------------------------
391#
392# TEST rules
393#
394#----------------------------------------------------------
395
396test14: test
397 @cd test && TOP_SRCDIR=$(top_srcdir) && \
398 export TOP_SRCDIR && ./test.sh 14 `hostname -f`
399
400test13: test
401 @cd test && TOP_SRCDIR=$(top_srcdir) && \
402 export TOP_SRCDIR && ./test.sh 13 `hostname -f`
403
404test12: test
405 @cd test && TOP_SRCDIR=$(top_srcdir) && \
406 export TOP_SRCDIR && ./test.sh 12 `hostname -f`
407
408test11: test
409 @cd test && TOP_SRCDIR=$(top_srcdir) && \
410 export TOP_SRCDIR && ./test.sh 11 `hostname -f`
411
412test10: test
413 @cd test && TOP_SRCDIR=$(top_srcdir) && \
414 export TOP_SRCDIR && ./test.sh 10 `hostname -f`
415
416test7: test
417 @cd test && TOP_SRCDIR=$(top_srcdir) && \
418 export TOP_SRCDIR && ./test.sh 7
419
420test6: test
421 @cd test && TOP_SRCDIR=$(top_srcdir) && \
422 export TOP_SRCDIR && ./test.sh 6
423
424test5: test
425 @cd test && TOP_SRCDIR=$(top_srcdir) && \
426 export TOP_SRCDIR && ./test.sh 5
427
428test4: test
429 @cd test && TOP_SRCDIR=$(top_srcdir) && \
430 export TOP_SRCDIR && ./test.sh 4
431
432test3: test
433 @cd test && TOP_SRCDIR=$(top_srcdir) && \
434 export TOP_SRCDIR && ./test.sh 3
435
436test2: test
437 @cd test && TOP_SRCDIR=$(top_srcdir) && \
438 export TOP_SRCDIR && ./test.sh 2
439
440test1: test
441 @cd test && TOP_SRCDIR=$(top_srcdir) && \
442 export TOP_SRCDIR && ./test.sh 1
443
444test:
445 @if test -f test; then \
446 :; \
447 else \
448 cp -pr $(top_srcdir)/test .; \
449 cat $(top_srcdir)/test/test.sh | \
450 sed 's%XXXSRCXXX%$(top_srcdir)%' > test/test.sh; \
451 chmod +x test/test.sh; \
452 fi
453
[171]454test_dnmalloc: $(srcsrc)/t-test1.c dnmalloc.o
455 $(COMPILE) $(VFLAG) -o t-test1.o -c $(srcsrc)/t-test1.c; \
456 $(LINK) t-test1.o dnmalloc.o $(LIBS_TRY)
457
458
[1]459#----------------------------------------------------------
460#
461# INSTALL rules
462#
463#----------------------------------------------------------
464
465install: install-lkm install-program install-man install-data
466 @echo; \
467 echo " You can use 'samhain-install.sh uninstall' for uninstalling"; \
468 echo " i.e. you might consider saving that script for future use";\
469 echo; \
470 echo " Use 'make install-boot' if you want @install_name@ to start on system boot"; \
471 echo
472
473install-light: install-lkm install-program install-data
474 @echo; \
475 echo " You can use 'samhain-install.sh uninstall' for uninstalling"; \
476 echo " i.e. you might consider saving that script for future use";\
477 echo; \
478 echo " Use 'make install-boot' if you want @install_name@ to start on system boot"; \
479 echo
480
481purge: uninstall-lkm uninstall-program uninstall-man
482 @echo "./samhain-install.sh --destdir=$(DESTDIR) --force --verbose uninstall-data"; \
483 ./samhain-install.sh --destdir=$(DESTDIR) --force --verbose uninstall-data
484
485remove: uninstall
486
487uninstall: uninstall-lkm uninstall-program uninstall-man uninstall-data
488 @echo; \
489 echo " Use 'make purge' if you also want to uninstall the configuration file"; \
490 echo " Use 'make uninstall-boot' to uninstall the runlevel scripts"; \
491 echo
492
493#
494# --- boot ---
495#
496install-boot: samhain-install.sh
497 ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose install-boot
498
499
500uninstall-boot: samhain-install.sh
501 ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-boot
502
503#
504# --- program ---
505#
506
507# -- NEW --
508install-lkm: @sh_lkm@
509 @RVER=`uname -r`; \
510 if test "x@sh_lkm@" != "x"; then \
511 if test -d /lib/modules/$$RVER; then \
512 MODDIR="/lib/modules/$$RVER"; \
513 elif test -d /lib/modules/misc; then \
514 MODDIR="/lib/modules/misc"; \
515 elif test -d /lib/modules; then \
516 MODDIR="/lib/modules/misc"; \
517 fi; \
518 $(mkinstalldirs) $(DESTDIR)$${MODDIR}; \
519 list='@sh_lkm@'; for p in $$list; do \
520 echo " cp $$p $(DESTDIR)$${MODDIR}/`echo $$p|sed 's%samhain%@install_name@%'`"; \
521 cp $$p $(DESTDIR)$${MODDIR}/`echo $$p|sed 's%samhain%@install_name@%'` ; \
522 chown root $(DESTDIR)$${MODDIR}/`echo $$p|sed 's%samhain%@install_name@%'`; \
523 done; \
524 if test "x$(DESTDIR)" = x; then \
525 echo " depmod -a || /sbin/depmod -a"; \
526 depmod -a || /sbin/depmod -a; \
527 fi; \
528 fi
529
530uninstall-lkm:
531 @echo "./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-lkm";\
532 ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-lkm
533
534
535install-program: $(PROGRAMS) sstrip
536 @$(mkinstalldirs) $(DESTDIR)$(sbindir)
[302]537 @if test x$(mytmpdir) != x; then \
538 $(mkinstalldirs) $(DESTDIR)$(mytmpdir); \
539 fi
[1]540 @list='$(PROGRAMS)'; for p in $$list; do \
541 if test -f $$p; then \
542 echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's%samhain%@install_name@%'|sed 's%yule%@install_name@%'`"; \
543 $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's%samhain%@install_name@%'|sed 's%yule%@install_name@%'`; \
[40]544 chmod 0700 $(DESTDIR)$(sbindir)/`echo $$p|sed 's%samhain%@install_name@%'|sed 's%yule%@install_name@%'`; \
[1]545 echo " ./sstrip $(DESTDIR)$(sbindir)/`echo $$p|sed 's%samhain%@install_name@%'|sed 's%yule%@install_name@%'`"; \
546 ./sstrip $(DESTDIR)$(sbindir)/`echo $$p|sed 's%samhain%@install_name@%'|sed 's%yule%@install_name@%'`; \
547 else :; fi; \
548 done
549
550uninstall-program:
551 @echo "./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-program";\
552 ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-program
553
554
555#
556# -- data files
557#
558
559install-user:
560 @if test "x@need_user_install@" = x1; then \
561 echo "./samhain-install.sh --destdir=$(DESTDIR) --express --verbose install-user @myident@"; \
562 ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose install-user @myident@; \
563 fi
564 @if test x"$(VFLAG)" = "x-DSH_WITH_SERVER"; then \
565 echo " chown root $(DESTDIR)$(mydatadir)"; \
566 chown root $(DESTDIR)$(mydatadir); \
567 echo " chmod 755 $(DESTDIR)$(mydatadir)"; \
568 chmod 755 $(DESTDIR)$(mydatadir); \
569 echo " chown @myident@ $(DESTDIR)$(configfile)"; \
570 chown @myident@ $(DESTDIR)$(configfile); \
571 if test x"$(mylogdir)" = "x/var/log"; then \
572 if test x"@myident@" = xroot; then \
573 :; \
574 else \
575 echo; \
576 echo " ----------------------------------------------------------------"; \
577 echo " Directory $(mylogdir) (log file) looks like a system directory."; \
578 echo " You may run into problems (need write access for user @myident@)."; \
579 echo " ----------------------------------------------------------------"; \
580 echo; \
581 fi; \
582 else \
583 echo " chown @myident@ $(DESTDIR)$(mylogdir)"; \
584 chown @myident@ $(DESTDIR)$(mylogdir); \
585 fi; \
586 fi
587
588install-data: trustfile
589 @$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
590 @$(mkinstalldirs) $(DESTDIR)$(mylockdir)
591 @$(mkinstalldirs) $(DESTDIR)$(mylogdir)
592 @$(mkinstalldirs) $(DESTDIR)$(mydatadir); \
593 chmod 700 $(DESTDIR)$(mydatadir)
594 @if test -f samhainrc.$(selectconfig); then \
595 :; \
596 else \
597 if test -f $(srcdir)/samhainrc.$(selectconfig); then \
598 cp $(srcdir)/samhainrc.$(selectconfig) . ; \
599 fi; \
600 fi; \
601 if test -f yulerc; then \
602 :; \
603 else \
604 if test -f $(srcdir)/yulerc.template; then \
605 cp $(srcdir)/yulerc.template yulerc; \
606 fi; \
607 fi; \
608 if test -f stealth_template.jpg; then \
609 :; \
610 else \
611 if test -f $(srcdir)/stealth_template.jpg; then \
612 cp $(srcdir)/stealth_template.jpg . ; \
613 fi; \
614 fi
[412]615 @if test -d /etc/logrotate.d; then \
[414]616 if test ! -d $(DESTDIR)/etc/logrotate.d; then \
617 $(mkinstalldirs) $(DESTDIR)/etc/logrotate.d; \
618 fi; \
619 if test ! -f $(DESTDIR)/etc/logrotate.d/@install_name@; then \
620 if test -w $(DESTDIR)/etc/logrotate.d; then \
621 cp $(srcdir)/scripts/logrotate $(DESTDIR)/etc/logrotate.d/@install_name@; \
622 else \
623 echo "$(DESTDIR)/etc/logrotate.d not writable"; \
624 fi; \
[412]625 else \
[414]626 echo "$(DESTDIR)/etc/logrotate.d/@install_name@ exists, not overwriting"; \
[412]627 fi; \
628 fi
[1]629 @echo "./samhain-install.sh --destdir=$(DESTDIR) --express --verbose install-data"; \
630 ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose install-data || \
631 echo " ERROR: Failed to install the configuration file to $(DESTDIR)$(configfile). You need to install the configuration file manually."
632 @if test x"$(VFLAG)" = "x-DSH_WITH_SERVER"; then \
633 echo;\
634 echo " -----------------------------------------------------";\
635 echo " The server will run as user @myident@ if started with";\
636 echo " root privileges, otherwise as the user of the parent ";\
637 echo " process (use --enable-identity=USER to change).";\
638 echo;\
639 echo " You may want to use: make install-user";\
640 echo;\
641 echo " - to add the user @myident@ (if not existing already)";\
642 echo " - to chown the data directory $(mydatadir)";\
643 echo " - to chown the log file directory $(mylogdir)";\
644 echo " - to chown the configuration file $(configfile)";\
645 echo " -----------------------------------------------------";\
646 else \
647 if test "x@need_user_install@" = x1; then \
648 echo;\
649 echo " -----------------------------------------------------";\
650 echo " You may want to use: make install-user";\
651 echo;\
652 echo " - to add the user @myident@ (if not existing already)";\
653 echo " -----------------------------------------------------";\
654 fi; \
655 fi
656
657uninstall-data:
658 @echo "./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-data"; \
659 ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-data
660
661#
662# -- man files
663#
664
665install-man:
666 $(mkinstalldirs) $(DESTDIR)$(mandir)/man8
667 $(mkinstalldirs) $(DESTDIR)$(mandir)/man5
668 @if test -f $(top_srcdir)/man/samhain.8 ; then \
669 echo " $(INSTALL_MAN) $(top_srcdir)/man/samhain.8 $(DESTDIR)$(mandir)/man8/@install_name@.8"; \
670 $(INSTALL_MAN) $(top_srcdir)/man/samhain.8 $(DESTDIR)$(mandir)/man8/@install_name@.8; \
671 fi
672 @if test -f $(top_srcdir)/man/samhainrc.5 ; then \
673 echo " $(INSTALL_MAN) $(top_srcdir)/man/samhainrc.5 $(DESTDIR)$(mandir)/man5/@install_name@rc.5"; \
674 $(INSTALL_MAN) $(top_srcdir)/man/samhainrc.5 $(DESTDIR)$(mandir)/man5/@install_name@rc.5; \
675 fi
676
677uninstall-man:
678 @echo "./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-man";\
679 ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-man
680
681
682#----------------------------------------------------------
683#
684# BUILD rules
685#
686#----------------------------------------------------------
687
688run: run-light
689
690run-light: all
691 @echo "Building $(PACKAGE)-$(VERSION).run"; \
692 STAGE=$(PACKAGE)-$(VERSION); \
693 mkdir $$STAGE; \
694 if test x"$$?" != x0; then \
695 echo "ERROR ... mkdir $$STAGE failed"; \
696 exit 1; \
697 fi; \
[40]698 $(MAKE) DESTDIR=$$STAGE install-light; \
[1]699 rm -f $$STAGE/@sbindir@/@install_name@_stealth; \
700 echo "#! /bin/sh" > $$STAGE/setup.sh; \
[302]701 if test x$(mytmpdir) != x; then \
702 echo "./mkinstalldirs @mytmpdir@ || exit 1" >> $$STAGE/setup.sh; \
703 fi; \
[1]704 echo "./mkinstalldirs @sbindir@ || exit 1" >> $$STAGE/setup.sh; \
705 echo "./mkinstalldirs @sysconfdir@ || exit 1" >> $$STAGE/setup.sh; \
706 echo "./mkinstalldirs @mylockdir@ || exit 1" >> $$STAGE/setup.sh; \
707 echo "./mkinstalldirs @mylogdir@ || exit 1" >> $$STAGE/setup.sh; \
708 echo "./mkinstalldirs @mydataroot@ || exit 1" >> $$STAGE/setup.sh; \
709 echo "chmod 700 @mydataroot@ || exit 1" >> $$STAGE/setup.sh; \
710 if test -f $$STAGE/lib/modules; then \
711 RVER=`uname -r`; \
712 echo "chown root:root lib/modules/$$RVER/*" >> $$STAGE/setup.sh; \
713 if test -d /lib/modules/$$RVER; then \
714 echo "./mkinstalldirs /lib/modules/$$RVER" >> $$STAGE/setup.sh; \
715 echo "cp -p lib/modules/$$RVER/* /lib/modules/$$RVER/" >> $$STAGE/setup.sh; \
716 elif test -d /lib/modules/misc; then \
717 echo "./mkinstalldirs /lib/modules/misc" >> $$STAGE/setup.sh; \
718 echo "cp -p lib/modules/misc/* /lib/modules/misc/" >> $$STAGE/setup.sh; \
719 elif test -d /lib/modules; then \
720 echo "./mkinstalldirs /lib/modules/misc" >> $$STAGE/setup.sh; \
721 echo "cp -p lib/modules/misc/* /lib/modules/misc/" >> $$STAGE/setup.sh; \
722 fi; \
723 echo "/sbin/depmod -a" >> $$STAGE/setup.sh; \
724 fi; \
725 temp=`echo $(sbindir) | sed s,^/,,`; \
726 echo "chown root $$temp/*" >> $$STAGE/setup.sh; \
727 echo "cp -p $$temp/* $(sbindir) || exit 1" >> $$STAGE/setup.sh; \
728 temp=`echo $(sysconfdir) | sed s,^/,,`; \
729 echo "chown root $$temp/*" >> $$STAGE/setup.sh; \
730 configfile=`echo @myconffile@ | sed 's%^REQ_FROM_SERVER%%'`; \
731 echo "test -f $$configfile || cp -p $$temp/* $$configfile" >> $$STAGE/setup.sh; \
[71]732 echo "./samhain-install.sh --express --verbose install-boot || echo 'Cannot install init script'" >> $$STAGE/setup.sh; \
[1]733 cp $(top_srcdir)/mkinstalldirs $$STAGE/; \
734 cp $(top_srcdir)/install-sh $$STAGE/; \
735 cp ./samhain-install.sh $$STAGE/; \
736 cp -r init/ $$STAGE/; \
737 chmod +x $$STAGE/setup.sh; \
738 chmod +x $$STAGE/samhain-install.sh; \
739 chmod +x $$STAGE/mkinstalldirs; \
740 chmod +x $$STAGE/install-sh; \
741 $(top_srcdir)/scripts/makeself/makeself.sh --header $(top_srcdir)/scripts/makeself/makeself-header.sh --nocomp --nomd5 --notemp $$STAGE $(PACKAGE)-$(VERSION).run "$(PACKAGE)_$(VERSION)_self_extracting_installer" ./setup.sh && \
742 rm -r $(PACKAGE)-$(VERSION)
743
744emerge-prepare: dist
745 @echo "Building $(PACKAGE)-$(VERSION)"; \
746 test -f /etc/make.globals && . /etc/make.globals; \
747 test -f /etc/make.conf && . /etc/make.conf; \
748 echo "$(INSTALL_MAN) $(PACKAGE)-$(VERSION).tar.gz $${DISTDIR}/@install_name@-$(VERSION).tar.gz"; \
749 $(INSTALL_MAN) $(PACKAGE)-$(VERSION).tar.gz $${DISTDIR}/@install_name@-$(VERSION).tar.gz; \
750 if test "x$${PORTDIR_OVERLAY}" = "x"; then \
751 COPY_TO="$${PORTDIR}"; \
752 else \
753 COPY_TO="$${PORTDIR_OVERLAY}"; \
754 fi; \
755 $(mkinstalldirs) $${COPY_TO}/app-admin/@install_name@; \
756 echo "$(INSTALL_MAN) scripts/samhain.ebuild $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild";\
757 $(INSTALL_MAN) scripts/samhain.ebuild $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild; \
758 test -f $${COPY_TO}/app-admin/@install_name@/files/digest-@install_name@-$(VERSION) && rm $${COPY_TO}/app-admin/@install_name@/files/digest-@install_name@-$(VERSION);\
759 ebuild $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild digest;
760
761emerge-prepare-light: dist
762 @echo "Building $(PACKAGE)-$(VERSION)"; \
763 test -f /etc/make.globals && . /etc/make.globals; \
764 test -f /etc/make.conf && . /etc/make.conf; \
765 echo "$(INSTALL_MAN) $(PACKAGE)-$(VERSION).tar.gz $${DISTDIR}/@install_name@-$(VERSION).tar.gz"; \
766 $(INSTALL_MAN) $(PACKAGE)-$(VERSION).tar.gz $${DISTDIR}/@install_name@-$(VERSION).tar.gz; \
767 if test "x$${PORTDIR_OVERLAY}" = "x"; then \
768 COPY_TO="$${PORTDIR}"; \
769 else \
770 COPY_TO="$${PORTDIR_OVERLAY}"; \
771 fi; \
772 $(mkinstalldirs) $${COPY_TO}/app-admin/@install_name@; \
773 echo "$(INSTALL_MAN) scripts/samhain.ebuild-light $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild";\
774 $(INSTALL_MAN) scripts/samhain.ebuild-light $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild; \
775 test -f $${COPY_TO}/app-admin/@install_name@/files/digest-@install_name@-$(VERSION) && rm $${COPY_TO}/app-admin/@install_name@/files/digest-@install_name@-$(VERSION);\
776 ebuild $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild digest;
777
778
779tbz2: emerge-prepare
780 @emerge --buildpkgonly @install_name@; \
781 test -f /etc/make.globals && . /etc/make.globals; \
782 test -f /etc/make.conf && . /etc/make.conf; \
783 echo; \
784 echo "@install_name@-$(VERSION).tbz2 should be in $${PKGDIR}/All"; \
785 if test -f $${PKGDIR}/All/@install_name@-$(VERSION).tbz2; then \
786 echo "Package $${PKGDIR}/All/@install_name@-$(VERSION).tbz2 built."; \
787 mv $${PKGDIR}/All/@install_name@-$(VERSION).tbz2 $(PACKAGE)-$(VERSION).tbz2; \
788 rm -f $${PKGDIR}/app-admin/@install_name@-$(VERSION).tbz2; \
789 rm -rf $${PORTAGE_TMPDIR}/portage/@install_name@-$(VERSION); \
790 else \
791 echo "Error ... cannot find package."; \
792 exit 1; \
793 fi; \
794 echo
795
796tbz2-light: emerge-prepare-light
797 @emerge --buildpkgonly @install_name@; \
798 test -f /etc/make.globals && . /etc/make.globals; \
799 test -f /etc/make.conf && . /etc/make.conf; \
800 echo; \
801 if test -f $${PKGDIR}/All/@install_name@-$(VERSION).tbz2; then \
802 echo "Package $${PKGDIR}/All/@install_name@-$(VERSION).tbz2 built."; \
803 mv $${PKGDIR}/All/@install_name@-$(VERSION).tbz2 $(PACKAGE)-$(VERSION).tbz2; \
804 rm -f $${PKGDIR}/app-admin/@install_name@-$(VERSION).tbz2; \
805 rm -rf $${PORTAGE_TMPDIR}/portage/@install_name@-$(VERSION); \
806 else \
807 echo "Error ... cannot find package."; \
808 exit 1; \
809 fi; \
810 echo
811
812emerge:
813 emerge $(PACKAGE);
814
815deb-light:
816 @echo "creating subdirectory debian"; \
817 mkdir -p debian; \
818 cp rules.deb-light debian/rules; \
819 chmod +x debian/rules; \
820 echo $(sbindir) | sed s,^/,, > debian/dirs; \
[302]821 if test x$(mytmpdir) != x; then \
822 echo $(mytmpdir) | sed s,^/,, >> debian/dirs; \
823 fi; \
[1]824 echo $(sysconfdir) | sed s,^/,, >> debian/dirs; \
825 echo etc/init.d >> debian/dirs; \
826 echo $(mydatadir) | sed s,^/,, >> debian/dirs; \
827 echo $(mylogdir) | sed s,^/,, >> debian/dirs; \
828 echo $(mylockdir) | sed s,^/,, >> debian/dirs; \
829 if test "x@sh_lkm@" != x; then \
830 RVER=`uname -r`; \
831 if test -d /lib/modules/$$RVER; then \
832 echo "lib/modules/$$RVER" >> debian/dirs; \
833 elif test -d /lib/modules/misc; then \
834 echo "lib/modules/misc" >> debian/dirs; \
835 elif test -d /lib/modules; then \
836 echo "lib/modules/misc" >> debian/dirs; \
837 fi; \
838 fi; \
839 $(MAKE) deb-run
840
841deb:
842 @echo "creating subdirectory debian"; \
843 mkdir -p debian; \
844 cp rules.deb debian/rules; \
845 chmod +x debian/rules; \
846 echo $(sbindir) | sed s,^/,, > debian/dirs; \
[302]847 if test x$(mytmpdir) != x; then \
848 echo $(mytmpdir) | sed s,^/,, >> debian/dirs; \
849 fi; \
[1]850 echo $(sysconfdir) | sed s,^/,, >> debian/dirs; \
851 echo etc/init.d >> debian/dirs; \
852 echo $(mydatadir) | sed s,^/,, >> debian/dirs; \
853 echo $(mylogdir) | sed s,^/,, >> debian/dirs; \
854 echo $(mylockdir) | sed s,^/,, >> debian/dirs; \
855 echo $(mandir)/man5 | sed s,^/,, >> debian/dirs; \
856 echo $(mandir)/man8 | sed s,^/,, >> debian/dirs; \
857 echo usr/share/doc/$(PACKAGE) >> debian/dirs; \
858 if test "x@sh_lkm@" != x; then \
859 RVER=`uname -r`; \
860 if test -d /lib/modules/$$RVER; then \
861 echo "lib/modules/$$RVER" >> debian/dirs; \
862 elif test -d /lib/modules/misc; then \
863 echo "lib/modules/misc" >> debian/dirs; \
864 elif test -d /lib/modules; then \
865 echo "lib/modules/misc" >> debian/dirs; \
866 fi; \
867 fi; \
868 echo $(top_srcdir)/README > debian/docs; \
869 echo $(top_srcdir)/test/testtiger.txt >> debian/docs; \
870 echo $(srcsrc)/simple-bignum.tar.bz2 >> debian/docs; \
871 echo $(top_srcdir)/scripts/head.html >> debian/docs; \
872 echo $(top_srcdir)/scripts/foot.html >> debian/docs; \
873 echo $(top_srcdir)/samhain.jpg >> debian/docs; \
874 echo $(top_srcdir)/docs/BUGS >> debian/docs; \
875 echo $(top_srcdir)/docs/HOWTO-client+server.html >> debian/docs; \
876 echo $(top_srcdir)/docs/HOWTO-samhain+GnuPG.html >> debian/docs; \
[68]877 echo $(top_srcdir)/docs/MANUAL-2_3.html.tar >> debian/docs; \
878 echo $(top_srcdir)/docs/MANUAL-2_3.pdf >> debian/docs; \
[1]879 echo $(top_srcdir)/docs/README.gcc_bug >> debian/docs; \
880 echo $(top_srcdir)/docs/README.LZO >> debian/docs; \
881 echo $(top_srcdir)/docs/README.sstrip >> debian/docs; \
882 echo $(top_srcdir)/docs/README.UPGRADE >> debian/docs; \
883 echo $(top_srcdir)/docs/README.win2K >> debian/docs; \
884 echo $(top_srcdir)/docs/TODO >> debian/docs; \
885 $(MAKE) deb-run
886
887deb-run:
[68]888 @maintainer=`gpg --list-secret-keys | grep 'uid ' | cut -d" " -f 5- | sed 's/^ *//' | sed q1`;\
[1]889 if test "x$$maintainer" = x; then \
[245]890 maintainer="$(DEFAULT_MAINTAINER)"; \
[1]891 fi; \
[245]892 echo "$(PACKAGE) ($(VERSION)-$(BUILD_NUM)) stable; urgency=low" > debian/changelog; \
[1]893 echo >> debian/changelog; \
894 echo " * Initial release." >> debian/changelog; \
895 echo >> debian/changelog; \
896 echo " -- $$maintainer `date -R`" >> debian/changelog; \
897 echo >> debian/changelog; \
898 echo "Local variables:" >> debian/changelog; \
899 echo "mode: debian-changelog" >> debian/changelog; \
900 echo "End:" >> debian/changelog; \
901 cp $(top_srcdir)/COPYING debian/copyright; \
902 touch debian/README.debian; \
903 echo "Document: @install_name@-manual" > debian/@install_name@.doc-base; \
904 echo "Title: @install_name@ Manual" >> debian/@install_name@.doc-base; \
905 echo "Author: Rainer Wichmann" >> debian/@install_name@.doc-base; \
906 echo "Abstract: This manual describes what @install_name@ is" >> debian/@install_name@.doc-base; \
907 echo " and how it can be used to check the file integrity of your" >> debian/@install_name@.doc-base; \
908 echo " server." >> debian/@install_name@.doc-base; \
[209]909 echo "Section: System/Security" >> debian/@install_name@.doc-base; \
[1]910 echo >> debian/@install_name@.doc-base; \
911 echo >> debian/@install_name@.doc-base; \
912 echo "Format: Postscript" >> debian/@install_name@.doc-base; \
[209]913 echo "Files: /usr/share/doc/@install_name@/manual.pdf.gz" >> debian/@install_name@.doc-base; \
[1]914 echo >> debian/@install_name@.doc-base; \
915 echo "Format: HTML" >> debian/@install_name@.doc-base; \
916 echo "Index: /usr/share/doc/@install_name@/manual.html/index.html" >> debian/@install_name@.doc-base; \
917 echo "Files: /usr/share/doc/@install_name@/manual.html/*.html" >> debian/@install_name@.doc-base; \
[65]918 if test -f /usr/lib/lsb/install_initd; then \
919 cp init/samhain.startLSB debian/@install_name@.init; \
920 else \
921 cp init/samhain.startLinux debian/@install_name@.init; \
922 fi; \
[1]923 echo "Source: samhain" > debian/control; \
924 echo "Section: admin" >> debian/control; \
925 echo "Priority: optional" >> debian/control; \
926 echo "Maintainer: $$maintainer" >> debian/control; \
927 echo "Standards-Version: 3.2.1" >> debian/control; \
928 echo >> debian/control; \
929 echo "Package: @install_name@" >> debian/control; \
930 echo "Architecture: any" >> debian/control; \
[209]931 echo "Depends: libc6" >> debian/control; \
[1]932 echo "Description: File integrity checker" >> debian/control; \
933 echo " A file integrity checker" >> debian/control; \
934 echo "running debuild -us -uc"; \
[425]935 debuild --preserve-envvar=PASSWORD -us -uc -b; \
[1]936 DEBFILE=`find ../ -follow -maxdepth 1 -cnewer ./debian/control 2>/dev/null | grep '@install_name@_$(VERSION)' | grep '\.deb'`; \
937 if test x"$$DEBFILE" = x; then \
938 echo "Error ... cannot find package file"; \
939 exit 1; \
940 else \
941 echo "Package $$DEBFILE built."; \
[245]942 cp $$DEBFILE ./$(PACKAGE)-$(VERSION)-$(BUILD_NUM).deb; \
[272]943 ln -s ./$(PACKAGE)-$(VERSION)-$(BUILD_NUM).deb ./$(PACKAGE)-$(VERSION).deb; \
[1]944 fi; \
945 echo
946
947#
948# Check samhain.spec
949#
950rpmspec-full:
951 @grep 'install-light' samhain.spec >/dev/null 2>&1; \
952 if test x"$$?" = "x0"; then \
953 echo "Your samhain.spec is from rpm-light. Please run"; \
954 echo " .config.status to re-create the original samhain.spec"; \
955 exit 1; \
956 fi
957
958# when editing the spec file, make an additional blank after 'make'
959# to avoid that it matches on a second processing
960#
961rpmspec-light: samhain.spec
962 @echo "Stripping docs from samhain.spec"; \
[415]963 cat samhain.spec | sed 's,make DESTDIR=$${RPM_BUILD_ROOT} install,make DESTDIR=$${RPM_BUILD_ROOT} install-light,' | sed s,shkeep=yes,shkeep=no, | sed s,%doc.*,, | sed '/logrotate/! { s,%attr.*,, }' > samhain.spec-light; \
[1]964 mv samhain.spec-light samhain.spec
965
966rpm-light: rpmspec-light distrpm
967 rpmbuild -ta ./$(PACKAGE)-$(VERSION).tar.gz;
[58]968 @RPMTOP=`cat ~/.rpmmacros 2>/dev/null | grep '%_topdir' | awk '{ print $$2}'`; \
969 if test x"$$RPMTOP" = x; then RPMTOP=/usr/src; fi; \
970 echo "Searching the RPM package below $$RPMTOP ..."; \
971 RPMFILE=`find $$RPMTOP -follow -maxdepth 4 -cnewer ./samhain.spec 2>/dev/null | grep '@install_name@-$(VERSION)' | grep '\.rpm' | grep -v '\.src\.'`; \
[1]972 echo; \
973 if test x"$$RPMFILE" = x; then \
974 echo "Error ... cannot find package file"; \
975 exit 1; \
976 else \
977 echo "Package $$RPMFILE built."; \
[58]978 echo "Copying it to ./$(PACKAGE)-$(VERSION).rpm"; \
[1]979 cp $$RPMFILE ./$(PACKAGE)-$(VERSION).rpm; \
980 fi; \
981 echo
982
983rpm: rpmspec-full distrpm
984 rpmbuild -ta ./$(PACKAGE)-$(VERSION).tar.gz;
[58]985 @RPMTOP=`cat ~/.rpmmacros 2>/dev/null | grep '%_topdir' | awk '{ print $$2}'`; \
986 if test x"$$RPMTOP" = x; then RPMTOP=/usr/src; fi; \
987 echo "Searching the RPM package below $$RPMTOP ..."; \
988 RPMFILE=`find $$RPMTOP -follow -maxdepth 4 -cnewer ./samhain.spec 2>/dev/null | grep '@install_name@-$(VERSION)' | grep '\.rpm' | grep -v '\.src\.'`; \
[1]989 echo; \
990 if test x"$$RPMFILE" = x; then \
991 echo "Error ... cannot find package file"; \
992 exit 1; \
993 else \
994 echo "Package $$RPMFILE built."; \
[58]995 echo "Copying it to ./$(PACKAGE)-$(VERSION).rpm"; \
[1]996 cp $$RPMFILE ./$(PACKAGE)-$(VERSION).rpm; \
997 fi; \
998 echo
999
1000srpm-dist: rpmspec-full samhain.spec
1001 @cat samhain.spec | \
1002 sed s%\-\-with\-base=.*\,[0123456789]*%% | \
1003 sed s%\'\'%% > samhain.spec.m; \
1004 mv samhain.spec.m samhain.spec
1005 $(MAKE) distrpm
1006 rpmbuild -ts ./$(PACKAGE)-$(VERSION).tar.gz
1007
1008
1009srpm: rpmspec-full distrpm
1010 rpmbuild -ts ./$(PACKAGE)-$(VERSION).tar.gz
1011
1012solaris-pkg-light: all
1013 @STAGE=/tmp/samhain-pkg-staging; \
1014 mkdir $$STAGE; \
1015 if test x"$$?" != x0; then \
1016 echo "ERROR ... mkdir $$STAGE failed"; \
1017 exit 1; \
1018 fi; \
[40]1019 $(MAKE) DESTDIR=$$STAGE install-light;
[1]1020 $(MAKE) solaris-pkg-finish
1021
1022solaris-pkg: all
1023 @STAGE=/tmp/samhain-pkg-staging; \
1024 mkdir $$STAGE; \
1025 if test x"$$?" != x0; then \
1026 echo "ERROR ... mkdir $$STAGE failed"; \
1027 exit 1; \
1028 fi; \
[40]1029 $(MAKE) DESTDIR=$$STAGE install;
[1]1030 $(MAKE) solaris-pkg-finish
1031
1032solaris-pkg-finish:
1033 @STAGE=/tmp/samhain-pkg-staging; \
1034 $(mkinstalldirs) $$STAGE/etc/init.d; \
1035 $(INSTALL_SHELL) init/samhain.startSolaris $$STAGE/etc/init.d/@install_name@; \
1036 (echo 'i pkginfo'; pkgproto $$STAGE=/ ) >prototype; \
1037 user=`id | sed s,uid=[0123456789]*\(,, | sed s,\).*,,`; \
1038 group=`id | sed s,.*gid=[0123456789]*\(,, | sed s,\).*,,`; \
[40]1039 cat prototype | grep -v 'none / ' | \
[1]1040 sed s,$$user\ $$group,root\ sys,g > prototype.1; \
[44]1041 rm -f prototype.2; \
1042 while read line; do \
1043 echo "$${line}" | egrep '^d none' >/dev/null 2>&1; \
1044 if [ $$? = 0 ]; then \
1045 dir=`echo "$${line}" | awk '{ print $$3 }'`; \
1046 if [ -d "$$dir" ]; then \
1047 echo "d none $${dir} ? ? ?" >> prototype.2; \
1048 else \
1049 echo "$${line}" >> prototype.2; \
1050 fi; \
1051 else \
1052 echo "$${line}" >> prototype.2; \
1053 fi; \
1054 done < prototype.1; \
1055 rm -f prototype && rm prototype.1 && mv prototype.2 prototype; \
[1]1056 echo "d none /etc/rc0.d ? ? ?" >> prototype; \
1057 echo "d none /etc/rc1.d ? ? ?" >> prototype; \
1058 echo "d none /etc/rc3.d ? ? ?" >> prototype; \
1059 echo "l none /etc/rc3.d/S99@install_name@=/etc/init.d/@install_name@" >> prototype; \
1060 echo "l none /etc/rc0.d/K10@install_name@=/etc/init.d/@install_name@" >> prototype; \
1061 echo "l none /etc/rc1.d/K10@install_name@=/etc/init.d/@install_name@" >> prototype; \
1062 ARCH=`uname -p`; \
[101]1063 PSTAMP=`date '+%c%y%m%d%H%M%S'`; \
[1]1064 echo "PKG=@install_name@" > pkginfo; \
1065 echo "NAME=file integrity check" >> pkginfo; \
1066 echo "VERSION=$(VERSION)" >> pkginfo; \
1067 echo "CATEGORY=system" >> pkginfo; \
1068 echo "CLASSES=none" >> pkginfo; \
1069 echo "VENDOR=http://la-samhna.de/samhain" >> pkginfo; \
1070 echo "EMAIL=support@la-samhna.de" >> pkginfo; \
1071 echo "ARCH=$$ARCH" >> pkginfo; \
1072 echo "PSTAMP=$$PSTAMP" >> pkginfo; \
1073 pkgmk -o; \
1074 pkgtrans -s /var/spool/pkg /tmp/samhain-pkg-staging/@install_name@.pkg @install_name@; \
1075 if test -f /tmp/samhain-pkg-staging/@install_name@.pkg; then \
1076 echo; \
1077 cp /tmp/samhain-pkg-staging/@install_name@.pkg $(PACKAGE)-$(VERSION).pkg; \
[40]1078 echo "Package $(PACKAGE)-$(VERSION).pkg is ready for installation"; \
[44]1079 echo "to install, use: pkgadd -n -d $(PACKAGE)-$(VERSION).pkg all"; \
[1]1080 echo; \
[40]1081 rm -rf /var/spool/pkg/@install_name@ /tmp/samhain-pkg-staging; \
[1]1082 else \
1083 echo; \
[126]1084 echo "**************************************************************"; \
[1]1085 echo "Error ... cannot find /tmp/samhain-pkg-staging/@install_name@.pkg."; \
1086 echo "Keeping /var/spool/pkg/@install_name@ /tmp/samhain-pkg-staging"; \
[126]1087 if test -d /var/spool/pkg; then \
1088 echo "**************************************************************"; \
1089 else \
1090 echo "************** /var/spool/pkg is missing *********************"; \
1091 fi; \
[1]1092 echo; \
1093 exit 1; \
1094 fi
1095
1096depot-prep: all
1097 STAGE=/tmp/samhain-pkg-staging; \
1098 mkdir $$STAGE; \
1099 if test x"$$?" != x0; then \
1100 echo "ERROR ... mkdir $$STAGE failed"; \
1101 exit 1; \
1102 fi; \
[40]1103 $(MAKE) DESTDIR=$$STAGE install; \
1104 $(MAKE) DESTDIR=$$STAGE install-boot; \
[1]1105 cp hp_ux.psf $$STAGE; \
1106 mkdir $$STAGE/sc; \
1107 echo "#!/sbin/sh" > $$STAGE/sc/configure; \
1108 echo "PATH=\$$SW_PATH; export PATH" >> $$STAGE/sc/configure; \
1109 echo "chmod 555 /sbin/init.d/samhain; chown bin:bin /sbin/init.d/@install_name@; (cd /sbin; ln -f -s /sbin/init.d/@install_name@ rc2.d/S900@install_name@; ln -f -s /sbin/init.d/@install_name@ rc1.d/K100@install_name@; )" >> $$STAGE/sc/configure; \
1110 chmod +x $$STAGE/sc/configure; \
1111 echo "#!/sbin/sh" > $$STAGE/sc/unconfigure; \
1112 echo "PATH=\$$SW_PATH; export PATH" >> $$STAGE/sc/unconfigure; \
1113 echo "rm -f /sbin/rc2.d/S900@install_name@; rm -f /sbin/rc1.d/K100@install_name@" >> $$STAGE/sc/unconfigure; \
1114 chmod +x $$STAGE/sc/unconfigure; \
1115 echo "#!/sbin/sh" > $$STAGE/sc/preremove; \
1116 echo "PATH=\$$SW_PATH; export PATH" >> $$STAGE/sc/preremove; \
1117 echo "/sbin/init.d/@install_name@ stop" >> $$STAGE/sc/preremove; \
1118 echo "exit 0" >> $$STAGE/sc/preremove; \
1119 chmod +x $$STAGE/sc/preremove;
1120
1121depot: depot-prep
1122 (cd /tmp/samhain-pkg-staging && /usr/sbin/swpackage -v -s ./hp_ux.psf -x media_type=tape @ $(PACKAGE)-$(VERSION).depot)
1123 cp /tmp/samhain-pkg-staging/$(PACKAGE)-$(VERSION).depot .
1124 rm -rf /tmp/samhain-pkg-staging
1125
1126depot-light: depot
1127
1128#---------------------------------------------------------------
1129
1130
1131trustfile: $(srcsrc)/trustfile.c config.h
1132 $(COMPILE) $(VFLAG) -DSH_IDENT=\"@myident@\" -DTRUST_MAIN -DSL_ALWAYS_TRUSTED=@mytrust@ -o trustfile $(srcsrc)/trustfile.c
1133
1134sh_MK.h: config.h
1135 @echo "creating sh_MK.h"; \
1136 echo "#ifndef SH_MK_H" > sh_MK.h; \
1137 echo "#define SH_MK_H" >> sh_MK.h; \
1138 $(top_srcdir)/c_bits.sh @my_key_1@ MKB >> sh_MK.h; \
1139 $(top_srcdir)/c_bits.sh @my_key_2@ MKA >> sh_MK.h; \
1140 $(top_srcdir)/c_bits.sh @my_key_3@ MKC >> sh_MK.h; \
1141 $(top_srcdir)/c_bits.sh @my_key_4@ MKD >> sh_MK.h; \
1142 echo "#endif" >> sh_MK.h
1143
1144
1145sstrip: $(srcsrc)/sstrip.c Makefile
[98]1146 $(BUILD_CC) -I. -o sstrip $(srcsrc)/sstrip.c
[1]1147
1148encode: $(srcsrc)/encode.c Makefile
[98]1149 $(BUILD_CC) -I. -o encode $(srcsrc)/encode.c
[1]1150
1151config_xor.h: config.h encode
1152 @echo 'encode $(XOR_CODE) config.h'; \
1153 sleep 1; \
1154 ./encode $(XOR_CODE) config.h; \
1155 mv x_config.h config_xor.h
1156
1157#.c.o:
1158# @echo "./encode $(XOR_CODE) $< --> x_`echo $< |sed 's%.*/%%'`"; \
1159# ./encode $(XOR_CODE) $<; \
1160# echo "$(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $< |sed 's%.*/%%'`"; \
1161# $(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $< |sed 's%.*/%%'`; \
1162# rm x_`echo $< |sed 's%.*/%%'`
1163
[170]1164$(OBJECTS): encode internal.h
[1]1165 @echo "./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c --> x_`echo $@ |sed 's%\.o$$%%'`.c"; \
1166 ./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c; \
1167 echo "$(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c"; \
[378]1168 $(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c && \
[1]1169 rm x_`echo $@ |sed 's%\.o$$%%'`.c
1170
[18]1171sh_tiger_i.o: $(srcsrc)/$(TIGER_SRC) Makefile config_xor.h
1172 @echo "$(COMPILE) $(VFLAG) -o sh_tiger_i.o -c $(srcsrc)/$(TIGER_SRC)";\
1173 $(COMPILE) $(VFLAG) -o sh_tiger_i.o -c $(srcsrc)/$(TIGER_SRC);
1174
[1]1175samhain_setpwd: encode config_xor.h $(srcsrc)/samhain_setpwd.c
1176 @echo '$(COMPILE) -o samhain_setpwd $(srcsrc)/samhain_setpwd.c'; \
1177 ./encode $(XOR_CODE) $(srcsrc)/samhain_setpwd.c; \
1178 $(COMPILE) -o samhain_setpwd x_samhain_setpwd.c; \
1179 rm x_samhain_setpwd.c
1180
1181samhain_stealth: encode config_xor.h $(srcsrc)/samhain_stealth.c
1182 @echo '$(COMPILE) -o samhain_stealth $(srcsrc)/samhain_stealth.c'; \
1183 ./encode $(XOR_CODE) $(srcsrc)/samhain_stealth.c; \
1184 $(COMPILE) -o samhain_stealth x_samhain_stealth.c; \
1185 rm x_samhain_stealth.c
1186
1187yulectl: encode config_xor.h $(srcsrc)/yulectl.c
1188 @echo '$(COMPILE) -o yulectl $(srcsrc)/yulectl.c $(LIBS_SOCK)'; \
1189 ./encode $(XOR_CODE) $(srcsrc)/yulectl.c; \
1190 $(COMPILE) -o yulectl x_yulectl.c $(LIBS_SOCK); \
1191 rm x_yulectl.c
1192
[18]1193$(SAMHAIN): internal.h $(OBJECTS) sh_tiger_i.o
[1]1194 @-rm -f $(SAMHAIN)
[18]1195 @echo "$(LINK) sh_tiger_i.o $(OBJECTS) $(LIBS_TRY)"; \
1196 $(LINK) sh_tiger_i.o $(OBJECTS) $(LIBS_TRY)
[1]1197
1198
[18]1199CUTEST_SOURCES = $(srcsrc)/cutest_sh_tools.c \
[23]1200 $(srcsrc)/cutest_sh_utils.c \
[25]1201 $(srcsrc)/cutest_sh_unix.c \
[23]1202 $(srcsrc)/cutest_slib.c \
[18]1203 $(srcsrc)/cutest_zAVLTree.c \
[34]1204 $(srcsrc)/cutest_sh_hash.c \
[18]1205 $(srcsrc)/cutest_sh_tiger0.c
[1]1206
[23]1207CUTEST_OBJECTS = cutest_sh_tools.o \
1208 cutest_sh_utils.o \
[25]1209 cutest_sh_unix.o \
[23]1210 cutest_slib.o \
1211 cutest_zAVLTree.o \
[34]1212 cutest_sh_hash.o \
[23]1213 cutest_sh_tiger0.o
[18]1214
[170]1215$(CUTEST_OBJECTS): $(CUTEST_SOURCES) config_xor.h internal.h
[18]1216 @echo "./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c --> x_`echo $@ |sed 's%\.o$$%%'`.c"; \
1217 ./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c; \
1218 echo "$(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c"; \
1219 $(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c; \
1220 rm x_`echo $@ |sed 's%\.o$$%%'`.c
1221
[68]1222
1223cutest: $(SOURCES) $(CUTEST_SOURCES)
1224 @$(MAKE) CUTEST='-DSH_CUTEST=1' intcutest
1225
[257]1226$(srcsrc)/CuTestMain.c: $(SOURCES) $(CUTEST_SOURCES) $(srcsrc)/make-tests.sh
1227 cd $(srcsrc)/ && ./make-tests.sh >CuTestMain.c;
1228
1229intcutest: internal.h $(OBJECTS) $(CUTEST_OBJECTS) sh_tiger_i.o $(srcsrc)/CuTestMain.c
[18]1230 @$(COMPILE) -o CuTestMain.o -c $(srcsrc)/CuTestMain.c; \
1231 $(COMPILE) -o CuTest.o -c $(srcsrc)/CuTest.c; \
1232 rm -f samhain.o; \
1233 ./encode $(XOR_CODE) $(srcsrc)/samhain.c; \
[68]1234 $(COMPILE) $(VFLAG) -o samhain.o -c x_samhain.c; \
[18]1235 rm x_samhain.c; \
1236 $(LINK) sh_tiger_i.o $(CUTEST_OBJECTS) CuTestMain.o CuTest.o $(OBJECTS) $(LIBS_TRY); \
[68]1237 test -f ./intcutest && mv ./intcutest ./cutest; \
[18]1238 ./cutest
1239
[171]1240runcutest:
1241 gdb ./cutest
1242
[1]1243samhain_hide.o: $(srcsrc)/samhain_hide.c samhain_erase.o
1244 gcc @lkm_inc@ -I. -Wall -O2 -c $(srcsrc)/samhain_hide.c
1245
1246samhain_erase.o: $(srcsrc)/samhain_erase.c
1247 gcc @lkm_inc@ -I. -Wall -O2 -c $(srcsrc)/samhain_erase.c
1248
1249# -- NEW --
1250samhain_hide.ko: $(srcsrc)/samhain_hide.c
1251 @test -d m_comp || mkdir m_comp; \
1252 echo "KVERSION := \$$(shell uname -r)" > m_comp/Makefile;\
1253 echo "KSOURCE ?= /lib/modules/\$$(KVERSION)/build" >> m_comp/Makefile;\
1254 echo "obj-m := samhain_hide.o" >> m_comp/Makefile;\
1255 echo ".PHONY: modules install clean modules_add" >> m_comp/Makefile;\
1256 echo "install : modules_add" >> m_comp/Makefile;\
1257 echo "modules modules_install clean:" >> m_comp/Makefile;\
1258 echo "T\$$(MAKE) -C \$$(KSOURCE) \$$@ SUBDIRS=\$$(CURDIR) KBUILD_VERBOSE=2" | tr T '\t' >> m_comp/Makefile;\
1259 cp config.h m_comp/; \
1260 cp $(srcsrc)/samhain_hide.c m_comp/; \
[40]1261 cd m_comp && $(MAKE) modules
[1]1262 @if test -f m_comp/samhain_hide.ko; then \
1263 cp -p m_comp/samhain_hide.ko samhain_hide.ko; \
1264 rm -rf m_comp/; \
1265 else \
1266 echo "Kernel module samhain_hide.ko not build"; \
1267 exit 1; \
1268 fi
1269
1270# -- NEW --
[279]1271samhain_kmem.ko: $(srcsrc)/samhain_kmem.c
1272 @test -d m_comp || mkdir m_comp; \
1273 echo "KVERSION := \$$(shell uname -r)" > m_comp/Makefile;\
1274 echo "KSOURCE ?= /lib/modules/\$$(KVERSION)/build" >> m_comp/Makefile;\
[353]1275 echo "obj-m := @install_name@_kmem.o" >> m_comp/Makefile;\
[279]1276 echo ".PHONY: modules install clean modules_add" >> m_comp/Makefile;\
1277 echo "install : modules_add" >> m_comp/Makefile;\
1278 echo "modules modules_install clean:" >> m_comp/Makefile;\
1279 echo "T\$$(MAKE) -C \$$(KSOURCE) \$$@ SUBDIRS=\$$(CURDIR) KBUILD_VERBOSE=2" | tr T '\t' >> m_comp/Makefile;\
1280 cp config.h m_comp/; \
[353]1281 cp $(srcsrc)/samhain_kmem.c m_comp/@install_name@_kmem.c; \
[279]1282 cd m_comp && $(MAKE) modules
[353]1283 @if test -f m_comp/@install_name@_kmem.ko; then \
1284 cp -p m_comp/@install_name@_kmem.ko samhain_kmem.ko; \
[279]1285 rm -rf m_comp/; \
1286 else \
1287 echo "Kernel module samhain_kmem.ko not build"; \
1288 exit 1; \
1289 fi
1290
1291
1292# -- NEW --
[1]1293lkm: @sh_lkm@
1294
1295
1296
1297# For kernel syscall monitoring
1298kern_head: Makefile $(top_srcdir)/include/kern_head.h $(srcsrc)/kern_head.c
[101]1299 @echo "$(BUILD_CC) -I. -I./include -DSYSTEMMAP=\"@systemmap@\" -o kern_head $(srcsrc)/kern_head.c $(LIBS_KVM)"; \
1300 $(BUILD_CC) -I. -I./include -DSYSTEMMAP=\"@systemmap@\" -o kern_head $(srcsrc)/kern_head.c $(LIBS_KVM)
[1]1301
1302sh_ks.h: kern_head
1303 @sleep 1; \
1304 ./kern_head > sh_ks.h
1305
1306sh_ks_xor.h: encode sh_ks.h
1307 @echo 'encode $(XOR_CODE) sh_ks.h'; \
1308 sleep 1; \
1309 ./encode $(XOR_CODE) sh_ks.h; \
1310 mv x_sh_ks.h sh_ks_xor.h
1311
1312# For bignum
1313internal.h: mkhdr
1314 @sleep 1; \
1315 ./mkhdr
1316
1317bignum.o: internal.h
1318
[170]1319
[1]1320# If your compiler can't handle long identifiers (> 6 chars), move the `#' to
1321# the other line.
1322
1323mkhdr: $(srcsrc)/mkhdr.c config.h
[98]1324 @echo "$(BUILD_CC) -I. -o mkhdr $(srcsrc)/mkhdr.c"; \
[1]1325 sleep 1; \
[98]1326 $(BUILD_CC) -I. -o mkhdr $(srcsrc)/mkhdr.c
[1]1327
1328# $(COMPILE) -DBIG_SHORT_NAMES -o mkhdr $(srcdir)/mkhdr.c
1329
1330#----------------------------------------------------------
1331#
1332# EXE PACKER rules
1333#
1334#----------------------------------------------------------
1335
1336minilzo.o: $(srcsrc)/minilzo.c $(srcinc)/lzoconf.h $(srcinc)/minilzo.h config.h
1337 @echo "$(COMPILE) -DMINILZO_HAVE_CONFIG_H -o minilzo.o -c $(srcsrc)/minilzo.c"; \
1338 $(COMPILE) -DMINILZO_HAVE_CONFIG_H -o minilzo.o -c $(srcsrc)/minilzo.c
1339
1340exepack_mkdata: $(srcsrc)/exepack_mkdata.c $(srcinc)/lzoconf.h $(srcinc)/minilzo.h minilzo.o
1341 @echo "$(COMPILE) -o exepack_mkdata.o -c $(srcsrc)/exepack_mkdata.c"; \
1342 $(COMPILE) -o exepack_mkdata.o -c $(srcsrc)/exepack_mkdata.c; \
1343 echo "$(LINK) exepack_mkdata.o minilzo.o"; \
1344 $(LINK) exepack_mkdata.o minilzo.o
1345
1346#
1347# prepare the data to be packed
1348#
1349exepack.data: $(SAMHAIN) exepack_mkdata sstrip
1350 @echo "cp ./$(SAMHAIN) ./samhain.pk.data"; \
1351 cp ./$(SAMHAIN) ./samhain.pk.data; \
1352 echo "strip ./samhain.pk.data"; \
1353 strip ./samhain.pk.data > /dev/null 2>&1 || echo "... is already stripped"; \
1354 echo "./sstrip ./samhain.pk.data"; \
1355 ./sstrip ./samhain.pk.data > /dev/null 2>&1 || echo "sstrip returned false"; \
1356 echo "./exepack_mkdata ./samhain.pk.data ./exepack.data 0"; \
1357 ./exepack_mkdata ./samhain.pk.data ./exepack.data 0; \
1358 echo "rm -f ./samhain.pk.data"; \
1359 rm -f ./samhain.pk.data;
1360
1361exepack: $(srcsrc)/exepack.c minilzo.o exepack.data
1362 @echo "$(COMPILE) -o exepack.o -c $(srcsrc)/exepack.c"; \
1363 $(COMPILE) -o exepack.o -c $(srcsrc)/exepack.c; \
1364 echo "$(LINK) exepack.o minilzo.o"; \
1365 $(LINK) exepack.o minilzo.o;
1366
1367#
1368# this program fills the data section with the binary
1369#
1370exepack_fill: $(srcsrc)/exepack_fill.c minilzo.o exepack
1371 @echo "$(COMPILE) -o exepack_fill.o -c $(srcsrc)/exepack_fill.c"; \
1372 $(COMPILE) -o exepack_fill.o -c $(srcsrc)/exepack_fill.c; \
1373 echo "$(LINK) exepack_fill.o minilzo.o"; \
1374 $(LINK) exepack_fill.o minilzo.o
1375
1376samhain.pk: $(SAMHAIN) exepack exepack_fill sstrip
1377 @echo "cp ./$(SAMHAIN) ./samhain.pk.data"; \
1378 cp ./$(SAMHAIN) ./samhain.pk.data; \
1379 echo "strip ./samhain.pk.data"; \
1380 strip ./samhain.pk.data > /dev/null 2>&1 || echo "... is already stripped"; \
1381 echo "./sstrip ./samhain.pk.data"; \
1382 ./sstrip ./samhain.pk.data > /dev/null 2>&1 || echo "sstrip returned false"; \
1383 test -f exepack.out && rm exepack.out; \
1384 echo "./exepack_fill exepack samhain.pk.data exepack.out"; \
1385 ./exepack_fill exepack samhain.pk.data exepack.out; \
1386 chmod +x exepack.out; \
1387 echo "strip exepack.out"; \
1388 strip exepack.out > /dev/null 2>&1 || echo "... is already stripped"; \
1389 ./sstrip exepack.out > /dev/null 2>&1 || echo "sstrip returned false"; \
1390 echo "mv exepack.out samhain.pk"; \
1391 rm -f samhain.pk; mv exepack.out samhain.pk
1392
1393samhain-packed: $(SAMHAIN) samhain_setpwd
1394 @echo "samhain_setpwd samhain new $(CLIENTPASSWD)"; \
1395 samhain_setpwd samhain new $(CLIENTPASSWD); \
1396 echo "rm -f samhain; mv samhain.new samhain"; \
1397 rm -f samhain; mv samhain.new samhain; \
1398 $(MAKE) samhain.pk; \
1399 echo "rm -f samhain; mv samhain.pk samhain"; \
1400 rm -f samhain; mv samhain.pk samhain
1401
1402#----------------------------------------------------------
1403#
1404# DEPLOY rules
1405#
1406#----------------------------------------------------------
1407
1408uninstall-deploy:
1409 rm -rf $(mydatadir)/profiles/source
1410 rm -rf $(mydatadir)/profiles/archpkg
1411 rm -rf $(mydatadir)/profiles/libexec
1412 rm -rf $(mydatadir)/profiles/tmp
1413 rm -rf $(mydatadir)/profiles/private
1414 @if test -f $(sbindir)/deploy.sh; then \
1415 old_deploy=`grep 'VERSION2' $(sbindir)/deploy.sh >/dev/null 2>&1 || echo old`; \
1416 if test x"$$old_deploy" = xold; then \
1417 echo "rm -f $(sbindir)/deploy2.sh"; \
1418 rm -f $(sbindir)/deploy2.sh; \
1419 else \
1420 echo "rm -f $(sbindir)/deploy.sh"; \
1421 rm -f $(sbindir)/deploy.sh; \
1422 fi; \
1423 fi
1424
1425EXECFILES= comCHECKSRC comDOWNLOAD comBUILD comCLEAN comINSTALL \
1426 funcDIALOG funcEXE funcPRINT funcSETUP funcBUILD funcINSTALL \
1427 funcDB comUNINSTALL \
1428 preinstall postinstall initscript
1429
1430# $(mydatadir)/profiles/
1431# |
1432# |
1433# |-- source -------------> (tarballs)
1434# |
1435# |-- configs ------------> (default configs)
1436# |
1437# |-- archpkg
1438# | |
1439# | |-- architecture -> (package, setup script)
1440# |
1441# |-- hosts
1442# | |
1443# | |-- hostname -----> (config)
1444# |
1445# |-- libexec ------------> (scripts)
1446# |
1447# |-- private ------------> (gpg key)
1448# |
1449# |-- tmp
1450#
1451install-deploy: deploy.sh samhain_stealth
1452 @echo "Creating directory tree under $(mydatadir)/profiles/"; \
1453 $(mkinstalldirs) $(sbindir); \
1454 $(mkinstalldirs) $(mydatadir)/profiles/source; \
1455 $(mkinstalldirs) $(mydatadir)/profiles/configs; \
1456 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/debian_i386; \
1457 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/gentoo_i386; \
1458 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/redhat_i386; \
1459 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/linux_i386; \
1460 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/freebsd_i386;\
1461 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/solaris; \
1462 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/aix; \
1463 $(mkinstalldirs) $(mydatadir)/profiles/hosts; \
1464 $(mkinstalldirs) $(mydatadir)/profiles/libexec; \
1465 $(mkinstalldirs) $(mydatadir)/profiles/private; \
1466 $(mkinstalldirs) $(mydatadir)/profiles/tmp; \
1467 if test -f $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz.asc; then \
1468 if test -f $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz; then \
1469 echo "Installing source tarball"; \
1470 $(INSTALL_DATA) $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz.asc \
1471 $(mydatadir)/profiles/source/$(PACKAGE)-$(VERSION).tar.gz.asc; \
1472 $(INSTALL_DATA) $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz \
1473 $(mydatadir)/profiles/source/$(PACKAGE)-$(VERSION).tar.gz; \
1474 fi; \
1475 fi; \
1476 echo "Installing default configs"; \
1477 test -f $(mydatadir)/profiles/configs/freebsd_i386.samhainrc || \
1478 $(INSTALL_DATA) $(srcdir)/samhainrc.freebsd \
1479 $(mydatadir)/profiles/configs/freebsd_i386.samhainrc; \
1480 test -f $(mydatadir)/profiles/configs/debian_i386.samhainrc || \
1481 $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
1482 $(mydatadir)/profiles/configs/debian_i386.samhainrc; \
1483 test -f $(mydatadir)/profiles/configs/gentoo_i386.samhainrc || \
1484 $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
1485 $(mydatadir)/profiles/configs/gentoo_i386.samhainrc; \
1486 test -f $(mydatadir)/profiles/configs/redhat_i386.samhainrc || \
1487 $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
1488 $(mydatadir)/profiles/configs/redhat_i386.samhainrc; \
1489 test -f $(mydatadir)/profiles/configs/linux_i386.samhainrc || \
1490 $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
1491 $(mydatadir)/profiles/configs/linux_i386.samhainrc; \
1492 test -f $(mydatadir)/profiles/configs/solaris.samhainrc || \
1493 $(INSTALL_DATA) $(srcdir)/samhainrc.solaris \
1494 $(mydatadir)/profiles/configs/solaris.samhainrc; \
1495 test -f $(mydatadir)/profiles/configs/aix.samhainrc || \
1496 $(INSTALL_DATA) $(srcdir)/samhainrc.aix5.2.0 \
1497 $(mydatadir)/profiles/configs/aix.samhainrc; \
1498 if test -f $(mydatadir)/profiles/configs/generic.configure; then \
1499 :; \
1500 else \
1501 SH_FQDN_SYSTEM=`uname -n`; \
1502 SH_FQDN_DOMAIN=`grep -i domain /etc/resolv.conf |grep -v "\#" |awk '{print $$2}' |head -1`; \
1503 if test -n "$${SH_FQDN_SYSTEM}" -a -n "$${SH_FQDN_DOMAIN}"; then \
1504 sh_thishost="$${SH_FQDN_SYSTEM}.$${SH_FQDN_DOMAIN}"; \
1505 else \
1506 sh_thishost="FQDN_MISSING"; \
1507 fi; \
1508 outfile=$(mydatadir)/profiles/configs/generic.configure; \
1509 echo "'--enable-network=client'" > $$outfile; \
1510 echo "'--with-logserver=$${sh_thishost}'" >> $$outfile; \
1511 echo "'--with-data-file=REQ_FROM_SERVER/var/lib/samhain/samhain_file'" >> $$outfile; \
1512 echo "'--with-config-file=REQ_FROM_SERVER/etc/samhainrc'" >> $$outfile; \
1513 echo "'--enable-base=@mykeybase@'" >> $$outfile; \
1514 fi; \
1515 $(INSTALL_SHELL) $(srcdir)/mkinstalldirs \
1516 $(mydatadir)/profiles/libexec; \
1517 $(INSTALL_SHELL) $(srcdir)/install-sh \
1518 $(mydatadir)/profiles/libexec; \
1519 for ff in $(EXECFILES); do \
1520 test -f $(srcdir)/dsys/$$ff && $(INSTALL_SHELL) $(srcdir)/dsys/$$ff \
1521 $(mydatadir)/profiles/libexec; \
1522 done; \
1523 $(INSTALL_SHELL) samhain_stealth $(mydatadir)/profiles/libexec; \
1524 test -f $(srcdir)/dsys/0F571F6C.asc && $(INSTALL_DATA) $(srcdir)/dsys/0F571F6C.asc \
1525 $(mydatadir)/profiles/private; \
1526 convert +compress $(srcdir)/stealth_template.jpg stealth_template.ps >/dev/null || \
1527 { echo "*"; echo "* 'convert' not found or not working, not installing"; echo "* $(mydatadir)/profiles/private/stealth_template.ps"; echo "* (only required for installing packages built with --enable-stealth)"; echo "*"; }; \
1528 if test -f stealth_template.ps; then \
1529 if test -f $(mydatadir)/profiles/private/stealth_template.ps; then \
1530 :; \
1531 else \
1532 $(INSTALL_DATA) stealth_template.ps $(mydatadir)/profiles/private; \
1533 fi; \
1534 fi; \
1535 if test -f $(sbindir)/deploy.sh; then \
1536 old_deploy=`grep 'VERSION2' $(sbindir)/deploy.sh >/dev/null 2>&1 || echo old`; \
1537 if test x"$$old_deploy" = xold; then \
1538 echo "*"; echo "* Version 1 of deploy.sh found"; echo "*"; \
1539 echo "* Installing $(sbindir)/deploy2.sh"; echo "*"; \
1540 $(INSTALL_SHELL) deploy.sh $(sbindir)/deploy2.sh; \
1541 else \
1542 echo "Installing $(sbindir)/deploy.sh"; \
1543 $(INSTALL_SHELL) deploy.sh $(sbindir)/deploy.sh; \
1544 fi; \
1545 else \
1546 echo "Installing $(sbindir)/deploy.sh"; \
1547 $(INSTALL_SHELL) deploy.sh $(sbindir)/deploy.sh; \
1548 fi
1549
1550
1551#----------------------------------------------------------
1552#
1553# DISTRIBUTION rules
1554#
1555#----------------------------------------------------------
1556
1557distdir = $(PACKAGE)-$(VERSION)
1558top_distdir = $(distdir)
1559
1560# This target untars the dist file and tries a VPATH configuration. Then
1561# it guarantees that the distribution is self-contained by making another
1562# tarfile.
1563
1564#
1565# 1) make distribution tarfile
1566# 2) unpack the tarfile into distdir
1567# 3) create build and install directories
1568# 4) do the build in the build dir, with sources from distdir
1569# 5) check (there are no subdirs, thus does nothing)
1570# 6) install
1571# 7) installcheck (equal to check, does nothing)
1572#
1573distcheck: dist
1574 -rm -rf $(distdir)
1575 GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
1576 mkdir $(distdir)/=build
1577 mkdir $(distdir)/=inst
1578 dc_install_base=`cd $(distdir)/=inst && pwd`; \
1579 cd $(distdir)/=build \
1580 && ../configure --srcdir=.. --prefix=$$dc_install_base \
1581 && $(MAKE) \
1582 && $(MAKE) install
1583 -rm -rf $(distdir)
1584 -rm -f $(distdir).tar.gz.asc
1585 @gpg -a --detach-sign $(distdir).tar.gz; \
1586 $(TAR) chof $(distdir).tar $(distdir).tar.gz $(distdir).tar.gz.asc; \
1587 rm -f $(distdir).tar.gz; \
1588 rm -f $(distdir).tar.gz.asc; \
1589 gzip --best $(distdir).tar
1590 mv $(distdir).tar.gz $(PACKAGE)_signed-$(VERSION).tar.gz
1591 @echo "========================"; \
1592 echo "$(PACKAGE)_signed-$(VERSION).tar.gz is ready for distribution"; \
1593 echo "========================"
1594
1595#
1596# create a tarfile for the distibution
1597#
1598distrpm: distdirrpm
1599 -chmod -R a+r $(distdir)
1600 -rm -rf $(distdir).tar.gz
1601 -rm -rf $(distdir).tar
1602 $(TAR) chof $(distdir).tar $(distdir)
1603 gzip -c --best $(distdir).tar > $(distdir).tar.gz
1604 -rm -rf $(distdir)
1605
1606dist: distdir
1607 -chmod -R a+r $(distdir)
1608 -rm -rf $(distdir).tar.gz
1609 -rm -rf $(distdir).tar
1610 $(TAR) chof $(distdir).tar $(distdir)
1611 gzip -c --best $(distdir).tar > $(distdir).tar.gz
1612 -rm -rf $(distdir)
1613
1614#
1615# create a tarfile for the distibution
1616#
1617dist-sign: distdir
1618 -rm -f $(distdir)/scripts/samhain.ebuild
1619 -rm -f $(distdir)/scripts/samhain.ebuild-light
1620 -chmod -R a+r $(distdir)
1621 -rm -rf $(distdir).tar.gz
1622 -rm -rf $(distdir).tar
1623 $(TAR) chof $(distdir).tar $(distdir)
1624 gzip --best $(distdir).tar
1625 -rm -rf $(distdir)
1626 -rm -f $(distdir).tar.gz.asc
1627 gpg -a --detach-sign $(distdir).tar.gz
1628 $(TAR) chof $(distdir).tar $(distdir).tar.gz $(distdir).tar.gz.asc
1629 -rm -f $(distdir).tar.gz
1630 -rm -f $(distdir).tar.gz.asc
1631 gzip --best $(distdir).tar
1632 mv $(distdir).tar.gz $(PACKAGE)_signed-$(VERSION).tar.gz
1633
1634
1635#
1636# same as dist
1637#
1638dist-all: distdir
1639 -chmod -R a+r $(distdir)
1640 GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
1641 -rm -rf $(distdir)
1642
1643#
1644# create distribution directory and copy files into it
1645#
1646INITFILES=samhain.startIRIX samhain.startFreeBSD samhain.startSolaris \
[71]1647samhain.startLSB samhain.startGentoo samhain.startLinux samhain.startHPUX \
[100]1648samhain.startIRIX samhain.startMACOSX
[1]1649
[414]1650SCRIPTFILES=redhat_i386.client.spec check_samhain.pl samhainadmin.pl \
[412]1651yuleadmin.pl samhain.ebuild samhain.ebuild-light samhain.spec
[1]1652
1653distdir: distfilecheck
1654 -rm -f $(top_srcdir)/init/*~
[412]1655 -rm -f $(top_srcdir)/sql_init/*~
[1]1656 -rm -f $(top_srcdir)/dsys/*~
1657 -rm -f $(top_srcdir)/docs/*~
1658 -rm -f $(top_srcdir)/include/*~
1659 -rm -f $(top_srcdir)/src/*~
1660 -rm -f $(top_srcdir)/test/*~
1661 -rm -f $(top_srcdir)/scripts/*~
1662 (cd $(top_srcdir)/init && rm -f $(INITFILES))
1663 (cd $(top_srcdir)/scripts && rm -f $(SCRIPTFILES))
1664 -rm -rf $(distdir)
1665 mkdir $(distdir)
1666 -chmod 777 $(distdir)
1667 @for file in $(DISTFILES); do \
1668 d=$(top_srcdir); \
1669 if test -f $$d/$$file || test -d $$d/$$file; then \
1670 cp -pr $$d/$$file $(distdir)/$$file; \
1671 fi; \
1672 done; \
1673 cp scripts/samhain.spec $(distdir)/samhain.spec; \
1674 rm -f $(distdir)/scripts/*.spec
1675
1676#
1677# as distdir, but don't copy spec file from scripts
1678#
1679distdirrpm: distfilecheck
1680 -rm -rf $(distdir)
1681 mkdir $(distdir)
1682 -chmod 777 $(distdir)
1683 @if test -f ./samhain.spec; then \
1684 :; \
1685 else \
1686 echo "Error: ./samhain.spec not found, please run configure"; \
1687 exit 1; \
1688 fi
1689 @cp -p samhain.spec $(distdir)/samhain.spec; \
1690 for file in $(DISTFILES); do \
1691 d=$(top_srcdir); \
1692 if test -f $$d/$$file || test -d $$d/$$file; then \
1693 if test x"$$file" = "xsamhain.spec"; then \
1694 :; \
1695 else \
1696 cp -pr $$d/$$file $(distdir)/$$file; \
1697 fi; \
1698 fi; \
1699 done; \
1700 rm -f $(distdir)/scripts/*.spec
1701
1702
1703distfilecheck: $(top_srcdir)/config.h.in $(top_srcdir)/depend.sum
1704 @for file in $(DISTFILES); do \
1705 d=$(top_srcdir); \
1706 if test -f $$d/$$file || test -d $$d/$$file; then \
1707 : \
1708 else \
1709 echo "File not found: $$d/$$file"; \
1710 fi; \
1711 done
1712 @for file in $(SOURCES); do \
1713 if test -f $$file; then \
1714 : \
1715 else \
1716 echo "File not found: $$file"; \
1717 fi; \
1718 done
1719
1720
1721# DO NOT DELETE THIS LINE
1722
1723
[367]1724samhain.o: $(srcsrc)/samhain.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_getopt.h $(srcinc)/sh_readconf.h $(srcinc)/sh_hash.h $(srcinc)/sh_restrict.h $(srcinc)/sh_nmail.h $(srcinc)/sh_tiger.h $(srcinc)/sh_gpg.h $(srcinc)/sh_mem.h $(srcinc)/sh_forward.h $(srcinc)/sh_tools.h $(srcinc)/sh_hash.h $(srcinc)/sh_extern.h $(srcinc)/sh_modules.h $(srcinc)/sh_ignore.h $(srcinc)/sh_prelink.h sh_MK.h $(srcinc)/sh_schedule.h
[310]1725sh_unix.o: $(srcsrc)/sh_unix.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_unix.h $(srcinc)/sh_utils.h $(srcinc)/sh_mem.h $(srcinc)/sh_hash.h $(srcinc)/sh_tools.h $(srcinc)/sh_restrict.h $(srcinc)/sh_ipvx.h $(srcinc)/sh_tiger.h $(srcinc)/sh_prelink.h $(srcinc)/sh_pthread.h $(srcinc)/sh_static.h $(srcinc)/sh_prelude.h $(srcinc)/zAVLTree.h $(srcinc)/sh_ignore.h
[138]1726sh_utils.o: $(srcsrc)/sh_utils.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_entropy.h $(srcinc)/sh_pthread.h
[214]1727sh_error.o: $(srcsrc)/sh_error.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_cat.h $(srcinc)/sh_database.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_nmail.h $(srcinc)/sh_forward.h $(srcinc)/sh_prelude.h $(srcinc)/sh_pthread.h $(srcinc)/sh_tools.h $(srcinc)/sh_extern.h
[367]1728sh_files.o: $(srcsrc)/sh_files.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_tiger.h $(srcinc)/sh_hash.h $(srcinc)/sh_ignore.h $(srcinc)/sh_inotify.h $(srcinc)/zAVLTree.h $(srcinc)/CuTest.h
1729sh_getopt.o: $(srcsrc)/sh_getopt.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_getopt.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_utils.h $(srcinc)/sh_mail.h $(srcinc)/sh_forward.h $(srcinc)/sh_hash.h $(srcinc)/sh_extern.h
1730sh_readconf.o: $(srcsrc)/sh_readconf.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_calls.h $(srcinc)/sh_error.h $(srcinc)/sh_extern.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_forward.h $(srcinc)/sh_gpg.h $(srcinc)/sh_hash.h $(srcinc)/sh_ignore.h $(srcinc)/sh_database.h $(srcinc)/sh_mail.h $(srcinc)/sh_modules.h $(srcinc)/sh_nmail.h $(srcinc)/sh_prelink.h $(srcinc)/sh_prelude.h $(srcinc)/sh_tiger.h $(srcinc)/sh_tools.h $(srcinc)/sh_utils.h $(srcinc)/sh_restrict.h
[167]1731sh_tiger0.o: $(srcsrc)/sh_tiger0.c Makefile config_xor.h $(srcinc)/sh_tiger.h $(srcinc)/sh_unix.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_pthread.h $(srcinc)/sh_string.h
[1]1732sh_tiger1.o: $(srcsrc)/sh_tiger1.c Makefile config_xor.h
1733sh_tiger2.o: $(srcsrc)/sh_tiger2.c Makefile config_xor.h
1734sh_tiger1_64.o: $(srcsrc)/sh_tiger1_64.c Makefile config_xor.h
1735sh_tiger2_64.o: $(srcsrc)/sh_tiger2_64.c Makefile config_xor.h
[149]1736sh_hash.o: $(srcsrc)/sh_hash.c Makefile config_xor.h $(srcinc)/sh_hash.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_tiger.h $(srcinc)/sh_gpg.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_ignore.h $(srcinc)/sh_pthread.h $(srcinc)/sh_forward.h $(srcinc)/sh_hash.h
[295]1737sh_mail.o: $(srcsrc)/sh_mail.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_mail.h $(srcinc)/sh_utils.h $(srcinc)/sh_fifo.h $(srcinc)/sh_tools.h $(srcinc)/sh_pthread.h $(srcinc)/sh_filter.h $(srcinc)/sh_mail_int.h $(srcinc)/sh_nmail.h $(srcinc)/sh_ipvx.h $(srcinc)/sh_static.h $(srcinc)/sh_tools.h
[138]1738sh_mem.o: $(srcsrc)/sh_mem.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_mem.h $(srcinc)/sh_pthread.h
[147]1739sh_entropy.o: $(srcsrc)/sh_entropy.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_calls.h $(srcinc)/sh_pthread.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h $(srcinc)/CuTest.h
[295]1740sh_forward.o: $(srcsrc)/sh_forward.c Makefile config_xor.h $(srcinc)/sh_ipvx.h $(srcinc)/samhain.h $(srcinc)/sh_tiger.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_forward.h $(srcinc)/sh_srp.h $(srcinc)/sh_fifo.h $(srcinc)/sh_tools.h $(srcinc)/sh_entropy.h $(srcinc)/sh_html.h $(srcinc)/sh_nmail.h $(srcinc)/sh_socket.h $(srcinc)/sh_static.h $(srcinc)/rijndael-api-fst.h $(srcinc)/sh_readconf.h $(srcinc)/zAVLTree.h $(srcinc)/sh_extern.h
[367]1741sh_modules.o: $(srcsrc)/sh_modules.c Makefile config_xor.h $(srcinc)/sh_modules.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utmp.h $(srcinc)/sh_mounts.h $(srcinc)/sh_userfiles.h $(srcinc)/sh_kern.h $(srcinc)/sh_suidchk.h $(srcinc)/sh_processcheck.h $(srcinc)/sh_portcheck.h $(srcinc)/sh_logmon.h $(srcinc)/sh_registry.h $(srcinc)/sh_fInotify.h
[259]1742sh_utmp.o: $(srcsrc)/sh_utmp.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_modules.h $(srcinc)/sh_utmp.h $(srcinc)/sh_pthread.h $(srcinc)/sh_inotify.h
[138]1743sh_kern.o: $(srcsrc)/sh_kern.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_modules.h $(srcinc)/sh_kern.h sh_ks_xor.h $(srcinc)/sh_unix.h $(srcinc)/sh_hash.h
1744sh_suidchk.o: $(srcsrc)/sh_suidchk.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_modules.h $(srcinc)/sh_suidchk.h $(srcinc)/sh_hash.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_schedule.h $(srcinc)/sh_calls.h
[225]1745sh_srp.o: $(srcsrc)/sh_srp.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_tiger.h $(srcinc)/sh_mem.h $(srcinc)/sh_utils.h $(srcinc)/sh_srp.h $(srcinc)/bignum.h $(srcinc)/CuTest.h
[214]1746sh_fifo.o: $(srcsrc)/sh_fifo.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_unix.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h $(srcinc)/sh_fifo.h
[295]1747sh_tools.o: $(srcsrc)/sh_tools.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_error.h $(srcinc)/sh_tools.h $(srcinc)/sh_utils.h $(srcinc)/sh_tiger.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h $(srcinc)/sh_ipvx.h $(srcinc)/rijndael-api-fst.h $(srcinc)/rijndael-api-fst.h
[1]1748sh_html.o: $(srcsrc)/sh_html.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_forward.h $(srcinc)/sh_error.h $(srcinc)/sh_unix.h $(srcinc)/sh_utils.h $(srcinc)/sh_html.h $(srcinc)/zAVLTree.h
1749sh_gpg.o: $(srcsrc)/sh_gpg.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_tiger.h $(srcinc)/sh_static.h
1750sh_cat.o: $(srcsrc)/sh_cat.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_cat.h
[315]1751sh_calls.o: $(srcsrc)/sh_calls.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_calls.h $(srcinc)/sh_ipvx.h $(srcinc)/sh_sub.h $(srcinc)/sh_utils.h
[215]1752sh_extern.o: $(srcsrc)/sh_extern.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_extern.h $(srcinc)/sh_calls.h $(srcinc)/sh_filter.h $(srcinc)/sh_static.h
[1]1753sh_database.o: $(srcsrc)/sh_database.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_cat.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h
1754sh_err_log.o: $(srcsrc)/sh_err_log.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_tiger.h
1755sh_err_console.o: $(srcsrc)/sh_err_console.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h
1756sh_err_syslog.o: $(srcsrc)/sh_err_syslog.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h
[23]1757sh_schedule.o: $(srcsrc)/sh_schedule.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_schedule.h
[1]1758bignum.o: $(srcsrc)/bignum.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/bignum.h
1759mkhdr.o: $(srcsrc)/mkhdr.c Makefile config.h
1760samhain_setpwd.o: $(srcsrc)/samhain_setpwd.c Makefile config_xor.h
1761samhain_stealth.o: $(srcsrc)/samhain_stealth.c Makefile config_xor.h
1762encode.o: $(srcsrc)/encode.c Makefile
[48]1763sstrip.o: $(srcsrc)/sstrip.c Makefile config.h
[138]1764trustfile.o: $(srcsrc)/trustfile.c Makefile config_xor.h $(srcinc)/sh_calls.h $(srcinc)/slib.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h
[1]1765exepack.o: $(srcsrc)/exepack.c Makefile config.h $(srcinc)/minilzo.h $(srcinc)/exepack.data
1766exepack_fill.o: $(srcsrc)/exepack_fill.c Makefile config.h config.h $(srcinc)/minilzo.h
1767exepack_mkdata.o: $(srcsrc)/exepack_mkdata.c Makefile config.h $(srcinc)/minilzo.h
1768minilzo.o: $(srcsrc)/minilzo.c Makefile $(srcinc)/minilzo.h
[167]1769slib.o: $(srcsrc)/slib.c Makefile config_xor.h $(srcinc)/slib.h $(srcinc)/sh_calls.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h $(srcinc)/sh_string.h $(srcinc)/sh_mem.h
[1]1770rijndael-alg-fst.o: $(srcsrc)/rijndael-alg-fst.c Makefile config_xor.h $(srcinc)/rijndael-alg-fst.h $(srcinc)/rijndael-boxes-fst.h
[230]1771rijndael-api-fst.o: $(srcsrc)/rijndael-api-fst.c Makefile config_xor.h $(srcinc)/rijndael-api-fst.h
[1]1772zAVLTree.o: $(srcsrc)/zAVLTree.c Makefile $(srcinc)/zAVLTree.h
1773sh_socket.o: $(srcsrc)/sh_socket.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_socket.h $(srcinc)/sh_error.h $(srcinc)/sh_unix.h $(srcinc)/sh_calls.h $(srcinc)/sh_utils.h $(srcinc)/zAVLTree.h $(srcinc)/sh_html.h $(srcinc)/sh_tools.h
[335]1774sh_ignore.o: $(srcsrc)/sh_ignore.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_error.h $(srcinc)/CuTest.h
[1]1775yulectl.o: $(srcsrc)/yulectl.c Makefile config_xor.h
1776sh_mounts.o: $(srcsrc)/sh_mounts.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_modules.h $(srcinc)/sh_mounts.h
[138]1777sh_userfiles.o: $(srcsrc)/sh_userfiles.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_modules.h $(srcinc)/sh_userfiles.h $(srcinc)/sh_utils.h $(srcinc)/sh_schedule.h $(srcinc)/sh_error.h $(srcinc)/sh_hash.h $(srcinc)/sh_files.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h
1778sh_prelude.o: $(srcsrc)/sh_prelude.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_cat.h $(srcinc)/sh_error_min.h $(srcinc)/sh_prelude.h $(srcinc)/sh_static.h
[1]1779kern_head.o: $(srcsrc)/kern_head.c Makefile config.h $(srcinc)/kern_head.h $(srcinc)/kern_head.h
1780sh_prelink.o: $(srcsrc)/sh_prelink.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_tiger.h $(srcinc)/sh_extern.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h
[138]1781sh_static.o: $(srcsrc)/sh_static.c Makefile config_xor.h $(srcinc)/sh_pthread.h
[18]1782sh_async.o: $(srcsrc)/sh_async.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_calls.h $(srcinc)/sh_error.h
[143]1783sh_processcheck.o: $(srcsrc)/sh_processcheck.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_modules.h $(srcinc)/sh_processcheck.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_extern.h $(srcinc)/sh_calls.h $(srcinc)/sh_pthread.h $(srcinc)/CuTest.h
[295]1784sh_portcheck.o: $(srcsrc)/sh_portcheck.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_mem.h $(srcinc)/sh_calls.h $(srcinc)/sh_utils.h $(srcinc)/sh_modules.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h $(srcinc)/sh_ipvx.h $(srcinc)/CuTest.h
[143]1785sh_pthread.o: $(srcsrc)/sh_pthread.c Makefile config_xor.h $(srcinc)/sh_pthread.h $(srcinc)/sh_calls.h $(srcinc)/sh_modules.h
[169]1786sh_string.o: $(srcsrc)/sh_string.c Makefile config_xor.h $(srcinc)/sh_string.h $(srcinc)/sh_mem.h $(srcinc)/CuTest.h
[171]1787dnmalloc.o: $(srcsrc)/dnmalloc.c Makefile config.h
1788t-test1.o: $(srcsrc)/t-test1.c Makefile config.h $(srcinc)/malloc.h
[298]1789sh_port2proc.o: $(srcsrc)/sh_port2proc.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error_min.h $(srcinc)/sh_pthread.h $(srcinc)/sh_ipvx.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_ipvx.h
[183]1790sh_log_parse_syslog.o: $(srcsrc)/sh_log_parse_syslog.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h
1791sh_log_parse_pacct.o: $(srcsrc)/sh_log_parse_pacct.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h
1792sh_log_parse_apache.o: $(srcsrc)/sh_log_parse_apache.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h
[265]1793sh_log_evalrule.o: $(srcsrc)/sh_log_evalrule.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h $(srcinc)/sh_log_check.h $(srcinc)/sh_log_evalrule.h $(srcinc)/sh_log_correlate.h $(srcinc)/sh_log_mark.h $(srcinc)/sh_log_repeat.h $(srcinc)/zAVLTree.h
[275]1794sh_log_check.o: $(srcsrc)/sh_log_check.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_string.h $(srcinc)/sh_log_check.h $(srcinc)/sh_log_evalrule.h $(srcinc)/sh_log_correlate.h $(srcinc)/sh_log_mark.h $(srcinc)/sh_log_repeat.h $(srcinc)/sh_extern.h $(srcinc)/sh_modules.h
[185]1795sh_log_parse_samba.o: $(srcsrc)/sh_log_parse_samba.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_string.h
[215]1796sh_nmail.o: $(srcsrc)/sh_nmail.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_mem.h $(srcinc)/sh_mail.h $(srcinc)/sh_tiger.h $(srcinc)/sh_string.h $(srcinc)/sh_utils.h $(srcinc)/sh_fifo.h $(srcinc)/sh_filter.h $(srcinc)/sh_mail_int.h $(srcinc)/zAVLTree.h
1797sh_filter.o: $(srcsrc)/sh_filter.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_mem.h $(srcinc)/sh_filter.h
[367]1798sh_inotify.o: $(srcsrc)/sh_inotify.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_calls.h $(srcinc)/sh_inotify.h $(srcinc)/sh_mem.h $(srcinc)/sh_utils.h $(srcinc)/slib.h $(srcinc)/zAVLTree.h $(srcinc)/sh_calls.h $(srcinc)/sh_inotify.h $(srcinc)/CuTest.h
[265]1799sh_log_correlate.o: $(srcsrc)/sh_log_correlate.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h $(srcinc)/sh_log_check.h $(srcinc)/sh_log_evalrule.h
1800sh_log_mark.o: $(srcsrc)/sh_log_mark.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_mem.h $(srcinc)/sh_string.h $(srcinc)/sh_error_min.h $(srcinc)/sh_log_check.h $(srcinc)/sh_log_evalrule.h $(srcinc)/zAVLTree.h
1801sh_log_repeat.o: $(srcsrc)/sh_log_repeat.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h $(srcinc)/sh_log_check.h $(srcinc)/sh_log_evalrule.h
[275]1802sh_log_parse_generic.o: $(srcsrc)/sh_log_parse_generic.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_log_check.h $(srcinc)/sh_string.h
[295]1803sh_login_track.o: $(srcsrc)/sh_login_track.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_string.h $(srcinc)/sh_tools.h $(srcinc)/sh_ipvx.h $(srcinc)/sh_error_min.h $(srcinc)/CuTest.h $(srcinc)/CuTest.h
[294]1804sh_audit.o: $(srcsrc)/sh_audit.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_extern.h $(srcinc)/sh_utils.h
1805sh_registry.o: $(srcsrc)/sh_registry.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_modules.h $(srcinc)/sh_hash.h $(srcinc)/sh_tiger.h
[295]1806sh_ipvx.o: $(srcsrc)/sh_ipvx.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_ipvx.h
[310]1807sh_restrict.o: $(srcsrc)/sh_restrict.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_error_min.h $(srcinc)/sh_string.h $(srcinc)/sh_utils.h $(srcinc)/sh_restrict.h $(srcinc)/CuTest.h
1808sh_filetype.o: $(srcsrc)/sh_filetype.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_error_min.h $(srcinc)/sh_utils.h
[315]1809sh_sub.o: $(srcsrc)/sh_sub.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h
[367]1810sh_fInotify.o: $(srcsrc)/sh_fInotify.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_modules.h $(srcinc)/sh_pthread.h $(srcinc)/sh_inotify.h $(srcinc)/sh_unix.h $(srcinc)/sh_hash.h $(srcinc)/sh_files.h $(srcinc)/sh_ignore.h
Note: See TracBrowser for help on using the repository browser.