source: trunk/Makefile.in@ 370

Last change on this file since 370 was 367, checked in by katerina, 13 years ago

Modifications for ticket #265 (inotify support). Needs testing.

File size: 78.3 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 \
[1]358 yule samhain_setpwd samhain_stealth samhainrc yulectl samhain_hide.ko
359
360clean:
361 -rm -f core *.o
362 @-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
363
364
365# everything created by (./configure && make)
366#
367
368DISTCLEANFILES = Makefile samhain.spec sh_gpg_checksum.h sh_gpg_fp.h \
369 init/samhain.startLinux init/samhain.startGentoo \
370 init/samhain.startLSB init/samhain.startFreeBSD \
371 init/samhain.startSolaris init/samhain.startHPUX \
[71]372 init/samhain.startIRIX init/samhain.startMACOSX \
[1]373 deploy.sh sh_MK.h samhain-install.sh sh_gpg_chksum.h sh_gpg_fp.h \
374 rules.deb rules.deb-light \
375 scripts/samhainadmin.pl scripts/check_samhain.pl \
376 scripts/samhain.ebuild scripts/samhain.ebuild-light
377
378TESTCLEANFILES = samhain.build samhain.new yule.html \
[170]379 test_ext test_ext.c test_ext.res testhash.tmp \
[171]380 testrc1.signed testrc_1ext testrc_2 testrc_2.signed \
381 test_dnmalloc
[1]382
383distclean: clean
384 -rm -f config.status config.log configure.lineno config.h config.cache
385 @-test -z "$(TESTCLEANFILES)" || rm -f $(TESTCLEANFILES)
386 @-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
387
388
389#----------------------------------------------------------
390#
391# TEST rules
392#
393#----------------------------------------------------------
394
395test14: test
396 @cd test && TOP_SRCDIR=$(top_srcdir) && \
397 export TOP_SRCDIR && ./test.sh 14 `hostname -f`
398
399test13: test
400 @cd test && TOP_SRCDIR=$(top_srcdir) && \
401 export TOP_SRCDIR && ./test.sh 13 `hostname -f`
402
403test12: test
404 @cd test && TOP_SRCDIR=$(top_srcdir) && \
405 export TOP_SRCDIR && ./test.sh 12 `hostname -f`
406
407test11: test
408 @cd test && TOP_SRCDIR=$(top_srcdir) && \
409 export TOP_SRCDIR && ./test.sh 11 `hostname -f`
410
411test10: test
412 @cd test && TOP_SRCDIR=$(top_srcdir) && \
413 export TOP_SRCDIR && ./test.sh 10 `hostname -f`
414
415test7: test
416 @cd test && TOP_SRCDIR=$(top_srcdir) && \
417 export TOP_SRCDIR && ./test.sh 7
418
419test6: test
420 @cd test && TOP_SRCDIR=$(top_srcdir) && \
421 export TOP_SRCDIR && ./test.sh 6
422
423test5: test
424 @cd test && TOP_SRCDIR=$(top_srcdir) && \
425 export TOP_SRCDIR && ./test.sh 5
426
427test4: test
428 @cd test && TOP_SRCDIR=$(top_srcdir) && \
429 export TOP_SRCDIR && ./test.sh 4
430
431test3: test
432 @cd test && TOP_SRCDIR=$(top_srcdir) && \
433 export TOP_SRCDIR && ./test.sh 3
434
435test2: test
436 @cd test && TOP_SRCDIR=$(top_srcdir) && \
437 export TOP_SRCDIR && ./test.sh 2
438
439test1: test
440 @cd test && TOP_SRCDIR=$(top_srcdir) && \
441 export TOP_SRCDIR && ./test.sh 1
442
443test:
444 @if test -f test; then \
445 :; \
446 else \
447 cp -pr $(top_srcdir)/test .; \
448 cat $(top_srcdir)/test/test.sh | \
449 sed 's%XXXSRCXXX%$(top_srcdir)%' > test/test.sh; \
450 chmod +x test/test.sh; \
451 fi
452
[171]453test_dnmalloc: $(srcsrc)/t-test1.c dnmalloc.o
454 $(COMPILE) $(VFLAG) -o t-test1.o -c $(srcsrc)/t-test1.c; \
455 $(LINK) t-test1.o dnmalloc.o $(LIBS_TRY)
456
457
[1]458#----------------------------------------------------------
459#
460# INSTALL rules
461#
462#----------------------------------------------------------
463
464install: install-lkm install-program install-man install-data
465 @echo; \
466 echo " You can use 'samhain-install.sh uninstall' for uninstalling"; \
467 echo " i.e. you might consider saving that script for future use";\
468 echo; \
469 echo " Use 'make install-boot' if you want @install_name@ to start on system boot"; \
470 echo
471
472install-light: install-lkm install-program install-data
473 @echo; \
474 echo " You can use 'samhain-install.sh uninstall' for uninstalling"; \
475 echo " i.e. you might consider saving that script for future use";\
476 echo; \
477 echo " Use 'make install-boot' if you want @install_name@ to start on system boot"; \
478 echo
479
480purge: uninstall-lkm uninstall-program uninstall-man
481 @echo "./samhain-install.sh --destdir=$(DESTDIR) --force --verbose uninstall-data"; \
482 ./samhain-install.sh --destdir=$(DESTDIR) --force --verbose uninstall-data
483
484remove: uninstall
485
486uninstall: uninstall-lkm uninstall-program uninstall-man uninstall-data
487 @echo; \
488 echo " Use 'make purge' if you also want to uninstall the configuration file"; \
489 echo " Use 'make uninstall-boot' to uninstall the runlevel scripts"; \
490 echo
491
492#
493# --- boot ---
494#
495install-boot: samhain-install.sh
496 ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose install-boot
497
498
499uninstall-boot: samhain-install.sh
500 ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-boot
501
502#
503# --- program ---
504#
505
506# -- NEW --
507install-lkm: @sh_lkm@
508 @RVER=`uname -r`; \
509 if test "x@sh_lkm@" != "x"; then \
510 if test -d /lib/modules/$$RVER; then \
511 MODDIR="/lib/modules/$$RVER"; \
512 elif test -d /lib/modules/misc; then \
513 MODDIR="/lib/modules/misc"; \
514 elif test -d /lib/modules; then \
515 MODDIR="/lib/modules/misc"; \
516 fi; \
517 $(mkinstalldirs) $(DESTDIR)$${MODDIR}; \
518 list='@sh_lkm@'; for p in $$list; do \
519 echo " cp $$p $(DESTDIR)$${MODDIR}/`echo $$p|sed 's%samhain%@install_name@%'`"; \
520 cp $$p $(DESTDIR)$${MODDIR}/`echo $$p|sed 's%samhain%@install_name@%'` ; \
521 chown root $(DESTDIR)$${MODDIR}/`echo $$p|sed 's%samhain%@install_name@%'`; \
522 done; \
523 if test "x$(DESTDIR)" = x; then \
524 echo " depmod -a || /sbin/depmod -a"; \
525 depmod -a || /sbin/depmod -a; \
526 fi; \
527 fi
528
529uninstall-lkm:
530 @echo "./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-lkm";\
531 ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-lkm
532
533
534install-program: $(PROGRAMS) sstrip
535 @$(mkinstalldirs) $(DESTDIR)$(sbindir)
[302]536 @if test x$(mytmpdir) != x; then \
537 $(mkinstalldirs) $(DESTDIR)$(mytmpdir); \
538 fi
[1]539 @list='$(PROGRAMS)'; for p in $$list; do \
540 if test -f $$p; then \
541 echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's%samhain%@install_name@%'|sed 's%yule%@install_name@%'`"; \
542 $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's%samhain%@install_name@%'|sed 's%yule%@install_name@%'`; \
[40]543 chmod 0700 $(DESTDIR)$(sbindir)/`echo $$p|sed 's%samhain%@install_name@%'|sed 's%yule%@install_name@%'`; \
[1]544 echo " ./sstrip $(DESTDIR)$(sbindir)/`echo $$p|sed 's%samhain%@install_name@%'|sed 's%yule%@install_name@%'`"; \
545 ./sstrip $(DESTDIR)$(sbindir)/`echo $$p|sed 's%samhain%@install_name@%'|sed 's%yule%@install_name@%'`; \
546 else :; fi; \
547 done
548
549uninstall-program:
550 @echo "./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-program";\
551 ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-program
552
553
554#
555# -- data files
556#
557
558install-user:
559 @if test "x@need_user_install@" = x1; then \
560 echo "./samhain-install.sh --destdir=$(DESTDIR) --express --verbose install-user @myident@"; \
561 ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose install-user @myident@; \
562 fi
563 @if test x"$(VFLAG)" = "x-DSH_WITH_SERVER"; then \
564 echo " chown root $(DESTDIR)$(mydatadir)"; \
565 chown root $(DESTDIR)$(mydatadir); \
566 echo " chmod 755 $(DESTDIR)$(mydatadir)"; \
567 chmod 755 $(DESTDIR)$(mydatadir); \
568 echo " chown @myident@ $(DESTDIR)$(configfile)"; \
569 chown @myident@ $(DESTDIR)$(configfile); \
570 if test x"$(mylogdir)" = "x/var/log"; then \
571 if test x"@myident@" = xroot; then \
572 :; \
573 else \
574 echo; \
575 echo " ----------------------------------------------------------------"; \
576 echo " Directory $(mylogdir) (log file) looks like a system directory."; \
577 echo " You may run into problems (need write access for user @myident@)."; \
578 echo " ----------------------------------------------------------------"; \
579 echo; \
580 fi; \
581 else \
582 echo " chown @myident@ $(DESTDIR)$(mylogdir)"; \
583 chown @myident@ $(DESTDIR)$(mylogdir); \
584 fi; \
585 fi
586
587install-data: trustfile
588 @$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
589 @$(mkinstalldirs) $(DESTDIR)$(mylockdir)
590 @$(mkinstalldirs) $(DESTDIR)$(mylogdir)
591 @$(mkinstalldirs) $(DESTDIR)$(mydatadir); \
592 chmod 700 $(DESTDIR)$(mydatadir)
593 @if test -f samhainrc.$(selectconfig); then \
594 :; \
595 else \
596 if test -f $(srcdir)/samhainrc.$(selectconfig); then \
597 cp $(srcdir)/samhainrc.$(selectconfig) . ; \
598 fi; \
599 fi; \
600 if test -f yulerc; then \
601 :; \
602 else \
603 if test -f $(srcdir)/yulerc.template; then \
604 cp $(srcdir)/yulerc.template yulerc; \
605 fi; \
606 fi; \
607 if test -f stealth_template.jpg; then \
608 :; \
609 else \
610 if test -f $(srcdir)/stealth_template.jpg; then \
611 cp $(srcdir)/stealth_template.jpg . ; \
612 fi; \
613 fi
614 @echo "./samhain-install.sh --destdir=$(DESTDIR) --express --verbose install-data"; \
615 ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose install-data || \
616 echo " ERROR: Failed to install the configuration file to $(DESTDIR)$(configfile). You need to install the configuration file manually."
617 @if test x"$(VFLAG)" = "x-DSH_WITH_SERVER"; then \
618 echo;\
619 echo " -----------------------------------------------------";\
620 echo " The server will run as user @myident@ if started with";\
621 echo " root privileges, otherwise as the user of the parent ";\
622 echo " process (use --enable-identity=USER to change).";\
623 echo;\
624 echo " You may want to use: make install-user";\
625 echo;\
626 echo " - to add the user @myident@ (if not existing already)";\
627 echo " - to chown the data directory $(mydatadir)";\
628 echo " - to chown the log file directory $(mylogdir)";\
629 echo " - to chown the configuration file $(configfile)";\
630 echo " -----------------------------------------------------";\
631 else \
632 if test "x@need_user_install@" = x1; then \
633 echo;\
634 echo " -----------------------------------------------------";\
635 echo " You may want to use: make install-user";\
636 echo;\
637 echo " - to add the user @myident@ (if not existing already)";\
638 echo " -----------------------------------------------------";\
639 fi; \
640 fi
641
642uninstall-data:
643 @echo "./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-data"; \
644 ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-data
645
646#
647# -- man files
648#
649
650install-man:
651 $(mkinstalldirs) $(DESTDIR)$(mandir)/man8
652 $(mkinstalldirs) $(DESTDIR)$(mandir)/man5
653 @if test -f $(top_srcdir)/man/samhain.8 ; then \
654 echo " $(INSTALL_MAN) $(top_srcdir)/man/samhain.8 $(DESTDIR)$(mandir)/man8/@install_name@.8"; \
655 $(INSTALL_MAN) $(top_srcdir)/man/samhain.8 $(DESTDIR)$(mandir)/man8/@install_name@.8; \
656 fi
657 @if test -f $(top_srcdir)/man/samhainrc.5 ; then \
658 echo " $(INSTALL_MAN) $(top_srcdir)/man/samhainrc.5 $(DESTDIR)$(mandir)/man5/@install_name@rc.5"; \
659 $(INSTALL_MAN) $(top_srcdir)/man/samhainrc.5 $(DESTDIR)$(mandir)/man5/@install_name@rc.5; \
660 fi
661
662uninstall-man:
663 @echo "./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-man";\
664 ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-man
665
666
667#----------------------------------------------------------
668#
669# BUILD rules
670#
671#----------------------------------------------------------
672
673run: run-light
674
675run-light: all
676 @echo "Building $(PACKAGE)-$(VERSION).run"; \
677 STAGE=$(PACKAGE)-$(VERSION); \
678 mkdir $$STAGE; \
679 if test x"$$?" != x0; then \
680 echo "ERROR ... mkdir $$STAGE failed"; \
681 exit 1; \
682 fi; \
[40]683 $(MAKE) DESTDIR=$$STAGE install-light; \
[1]684 rm -f $$STAGE/@sbindir@/@install_name@_stealth; \
685 echo "#! /bin/sh" > $$STAGE/setup.sh; \
[302]686 if test x$(mytmpdir) != x; then \
687 echo "./mkinstalldirs @mytmpdir@ || exit 1" >> $$STAGE/setup.sh; \
688 fi; \
[1]689 echo "./mkinstalldirs @sbindir@ || exit 1" >> $$STAGE/setup.sh; \
690 echo "./mkinstalldirs @sysconfdir@ || exit 1" >> $$STAGE/setup.sh; \
691 echo "./mkinstalldirs @mylockdir@ || exit 1" >> $$STAGE/setup.sh; \
692 echo "./mkinstalldirs @mylogdir@ || exit 1" >> $$STAGE/setup.sh; \
693 echo "./mkinstalldirs @mydataroot@ || exit 1" >> $$STAGE/setup.sh; \
694 echo "chmod 700 @mydataroot@ || exit 1" >> $$STAGE/setup.sh; \
695 if test -f $$STAGE/lib/modules; then \
696 RVER=`uname -r`; \
697 echo "chown root:root lib/modules/$$RVER/*" >> $$STAGE/setup.sh; \
698 if test -d /lib/modules/$$RVER; then \
699 echo "./mkinstalldirs /lib/modules/$$RVER" >> $$STAGE/setup.sh; \
700 echo "cp -p lib/modules/$$RVER/* /lib/modules/$$RVER/" >> $$STAGE/setup.sh; \
701 elif test -d /lib/modules/misc; then \
702 echo "./mkinstalldirs /lib/modules/misc" >> $$STAGE/setup.sh; \
703 echo "cp -p lib/modules/misc/* /lib/modules/misc/" >> $$STAGE/setup.sh; \
704 elif test -d /lib/modules; then \
705 echo "./mkinstalldirs /lib/modules/misc" >> $$STAGE/setup.sh; \
706 echo "cp -p lib/modules/misc/* /lib/modules/misc/" >> $$STAGE/setup.sh; \
707 fi; \
708 echo "/sbin/depmod -a" >> $$STAGE/setup.sh; \
709 fi; \
710 temp=`echo $(sbindir) | sed s,^/,,`; \
711 echo "chown root $$temp/*" >> $$STAGE/setup.sh; \
712 echo "cp -p $$temp/* $(sbindir) || exit 1" >> $$STAGE/setup.sh; \
713 temp=`echo $(sysconfdir) | sed s,^/,,`; \
714 echo "chown root $$temp/*" >> $$STAGE/setup.sh; \
715 configfile=`echo @myconffile@ | sed 's%^REQ_FROM_SERVER%%'`; \
716 echo "test -f $$configfile || cp -p $$temp/* $$configfile" >> $$STAGE/setup.sh; \
[71]717 echo "./samhain-install.sh --express --verbose install-boot || echo 'Cannot install init script'" >> $$STAGE/setup.sh; \
[1]718 cp $(top_srcdir)/mkinstalldirs $$STAGE/; \
719 cp $(top_srcdir)/install-sh $$STAGE/; \
720 cp ./samhain-install.sh $$STAGE/; \
721 cp -r init/ $$STAGE/; \
722 chmod +x $$STAGE/setup.sh; \
723 chmod +x $$STAGE/samhain-install.sh; \
724 chmod +x $$STAGE/mkinstalldirs; \
725 chmod +x $$STAGE/install-sh; \
726 $(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 && \
727 rm -r $(PACKAGE)-$(VERSION)
728
729emerge-prepare: dist
730 @echo "Building $(PACKAGE)-$(VERSION)"; \
731 test -f /etc/make.globals && . /etc/make.globals; \
732 test -f /etc/make.conf && . /etc/make.conf; \
733 echo "$(INSTALL_MAN) $(PACKAGE)-$(VERSION).tar.gz $${DISTDIR}/@install_name@-$(VERSION).tar.gz"; \
734 $(INSTALL_MAN) $(PACKAGE)-$(VERSION).tar.gz $${DISTDIR}/@install_name@-$(VERSION).tar.gz; \
735 if test "x$${PORTDIR_OVERLAY}" = "x"; then \
736 COPY_TO="$${PORTDIR}"; \
737 else \
738 COPY_TO="$${PORTDIR_OVERLAY}"; \
739 fi; \
740 $(mkinstalldirs) $${COPY_TO}/app-admin/@install_name@; \
741 echo "$(INSTALL_MAN) scripts/samhain.ebuild $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild";\
742 $(INSTALL_MAN) scripts/samhain.ebuild $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild; \
743 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);\
744 ebuild $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild digest;
745
746emerge-prepare-light: dist
747 @echo "Building $(PACKAGE)-$(VERSION)"; \
748 test -f /etc/make.globals && . /etc/make.globals; \
749 test -f /etc/make.conf && . /etc/make.conf; \
750 echo "$(INSTALL_MAN) $(PACKAGE)-$(VERSION).tar.gz $${DISTDIR}/@install_name@-$(VERSION).tar.gz"; \
751 $(INSTALL_MAN) $(PACKAGE)-$(VERSION).tar.gz $${DISTDIR}/@install_name@-$(VERSION).tar.gz; \
752 if test "x$${PORTDIR_OVERLAY}" = "x"; then \
753 COPY_TO="$${PORTDIR}"; \
754 else \
755 COPY_TO="$${PORTDIR_OVERLAY}"; \
756 fi; \
757 $(mkinstalldirs) $${COPY_TO}/app-admin/@install_name@; \
758 echo "$(INSTALL_MAN) scripts/samhain.ebuild-light $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild";\
759 $(INSTALL_MAN) scripts/samhain.ebuild-light $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild; \
760 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);\
761 ebuild $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild digest;
762
763
764tbz2: emerge-prepare
765 @emerge --buildpkgonly @install_name@; \
766 test -f /etc/make.globals && . /etc/make.globals; \
767 test -f /etc/make.conf && . /etc/make.conf; \
768 echo; \
769 echo "@install_name@-$(VERSION).tbz2 should be in $${PKGDIR}/All"; \
770 if test -f $${PKGDIR}/All/@install_name@-$(VERSION).tbz2; then \
771 echo "Package $${PKGDIR}/All/@install_name@-$(VERSION).tbz2 built."; \
772 mv $${PKGDIR}/All/@install_name@-$(VERSION).tbz2 $(PACKAGE)-$(VERSION).tbz2; \
773 rm -f $${PKGDIR}/app-admin/@install_name@-$(VERSION).tbz2; \
774 rm -rf $${PORTAGE_TMPDIR}/portage/@install_name@-$(VERSION); \
775 else \
776 echo "Error ... cannot find package."; \
777 exit 1; \
778 fi; \
779 echo
780
781tbz2-light: emerge-prepare-light
782 @emerge --buildpkgonly @install_name@; \
783 test -f /etc/make.globals && . /etc/make.globals; \
784 test -f /etc/make.conf && . /etc/make.conf; \
785 echo; \
786 if test -f $${PKGDIR}/All/@install_name@-$(VERSION).tbz2; then \
787 echo "Package $${PKGDIR}/All/@install_name@-$(VERSION).tbz2 built."; \
788 mv $${PKGDIR}/All/@install_name@-$(VERSION).tbz2 $(PACKAGE)-$(VERSION).tbz2; \
789 rm -f $${PKGDIR}/app-admin/@install_name@-$(VERSION).tbz2; \
790 rm -rf $${PORTAGE_TMPDIR}/portage/@install_name@-$(VERSION); \
791 else \
792 echo "Error ... cannot find package."; \
793 exit 1; \
794 fi; \
795 echo
796
797emerge:
798 emerge $(PACKAGE);
799
800deb-light:
801 @echo "creating subdirectory debian"; \
802 mkdir -p debian; \
803 cp rules.deb-light debian/rules; \
804 chmod +x debian/rules; \
805 echo $(sbindir) | sed s,^/,, > debian/dirs; \
[302]806 if test x$(mytmpdir) != x; then \
807 echo $(mytmpdir) | sed s,^/,, >> debian/dirs; \
808 fi; \
[1]809 echo $(sysconfdir) | sed s,^/,, >> debian/dirs; \
810 echo etc/init.d >> debian/dirs; \
811 echo $(mydatadir) | sed s,^/,, >> debian/dirs; \
812 echo $(mylogdir) | sed s,^/,, >> debian/dirs; \
813 echo $(mylockdir) | sed s,^/,, >> debian/dirs; \
814 if test "x@sh_lkm@" != x; then \
815 RVER=`uname -r`; \
816 if test -d /lib/modules/$$RVER; then \
817 echo "lib/modules/$$RVER" >> debian/dirs; \
818 elif test -d /lib/modules/misc; then \
819 echo "lib/modules/misc" >> debian/dirs; \
820 elif test -d /lib/modules; then \
821 echo "lib/modules/misc" >> debian/dirs; \
822 fi; \
823 fi; \
824 $(MAKE) deb-run
825
826deb:
827 @echo "creating subdirectory debian"; \
828 mkdir -p debian; \
829 cp rules.deb debian/rules; \
830 chmod +x debian/rules; \
831 echo $(sbindir) | sed s,^/,, > debian/dirs; \
[302]832 if test x$(mytmpdir) != x; then \
833 echo $(mytmpdir) | sed s,^/,, >> debian/dirs; \
834 fi; \
[1]835 echo $(sysconfdir) | sed s,^/,, >> debian/dirs; \
836 echo etc/init.d >> debian/dirs; \
837 echo $(mydatadir) | sed s,^/,, >> debian/dirs; \
838 echo $(mylogdir) | sed s,^/,, >> debian/dirs; \
839 echo $(mylockdir) | sed s,^/,, >> debian/dirs; \
840 echo $(mandir)/man5 | sed s,^/,, >> debian/dirs; \
841 echo $(mandir)/man8 | sed s,^/,, >> debian/dirs; \
842 echo usr/share/doc/$(PACKAGE) >> debian/dirs; \
843 if test "x@sh_lkm@" != x; then \
844 RVER=`uname -r`; \
845 if test -d /lib/modules/$$RVER; then \
846 echo "lib/modules/$$RVER" >> debian/dirs; \
847 elif test -d /lib/modules/misc; then \
848 echo "lib/modules/misc" >> debian/dirs; \
849 elif test -d /lib/modules; then \
850 echo "lib/modules/misc" >> debian/dirs; \
851 fi; \
852 fi; \
853 echo $(top_srcdir)/README > debian/docs; \
854 echo $(top_srcdir)/test/testtiger.txt >> debian/docs; \
855 echo $(srcsrc)/simple-bignum.tar.bz2 >> debian/docs; \
856 echo $(top_srcdir)/scripts/head.html >> debian/docs; \
857 echo $(top_srcdir)/scripts/foot.html >> debian/docs; \
858 echo $(top_srcdir)/samhain.jpg >> debian/docs; \
859 echo $(top_srcdir)/docs/BUGS >> debian/docs; \
860 echo $(top_srcdir)/docs/HOWTO-client+server.html >> debian/docs; \
861 echo $(top_srcdir)/docs/HOWTO-samhain+GnuPG.html >> debian/docs; \
[68]862 echo $(top_srcdir)/docs/MANUAL-2_3.html.tar >> debian/docs; \
863 echo $(top_srcdir)/docs/MANUAL-2_3.pdf >> debian/docs; \
[1]864 echo $(top_srcdir)/docs/README.gcc_bug >> debian/docs; \
865 echo $(top_srcdir)/docs/README.LZO >> debian/docs; \
866 echo $(top_srcdir)/docs/README.sstrip >> debian/docs; \
867 echo $(top_srcdir)/docs/README.UPGRADE >> debian/docs; \
868 echo $(top_srcdir)/docs/README.win2K >> debian/docs; \
869 echo $(top_srcdir)/docs/TODO >> debian/docs; \
870 $(MAKE) deb-run
871
872deb-run:
[68]873 @maintainer=`gpg --list-secret-keys | grep 'uid ' | cut -d" " -f 5- | sed 's/^ *//' | sed q1`;\
[1]874 if test "x$$maintainer" = x; then \
[245]875 maintainer="$(DEFAULT_MAINTAINER)"; \
[1]876 fi; \
[245]877 echo "$(PACKAGE) ($(VERSION)-$(BUILD_NUM)) stable; urgency=low" > debian/changelog; \
[1]878 echo >> debian/changelog; \
879 echo " * Initial release." >> debian/changelog; \
880 echo >> debian/changelog; \
881 echo " -- $$maintainer `date -R`" >> debian/changelog; \
882 echo >> debian/changelog; \
883 echo "Local variables:" >> debian/changelog; \
884 echo "mode: debian-changelog" >> debian/changelog; \
885 echo "End:" >> debian/changelog; \
886 cp $(top_srcdir)/COPYING debian/copyright; \
887 touch debian/README.debian; \
888 echo "Document: @install_name@-manual" > debian/@install_name@.doc-base; \
889 echo "Title: @install_name@ Manual" >> debian/@install_name@.doc-base; \
890 echo "Author: Rainer Wichmann" >> debian/@install_name@.doc-base; \
891 echo "Abstract: This manual describes what @install_name@ is" >> debian/@install_name@.doc-base; \
892 echo " and how it can be used to check the file integrity of your" >> debian/@install_name@.doc-base; \
893 echo " server." >> debian/@install_name@.doc-base; \
[209]894 echo "Section: System/Security" >> debian/@install_name@.doc-base; \
[1]895 echo >> debian/@install_name@.doc-base; \
896 echo >> debian/@install_name@.doc-base; \
897 echo "Format: Postscript" >> debian/@install_name@.doc-base; \
[209]898 echo "Files: /usr/share/doc/@install_name@/manual.pdf.gz" >> debian/@install_name@.doc-base; \
[1]899 echo >> debian/@install_name@.doc-base; \
900 echo "Format: HTML" >> debian/@install_name@.doc-base; \
901 echo "Index: /usr/share/doc/@install_name@/manual.html/index.html" >> debian/@install_name@.doc-base; \
902 echo "Files: /usr/share/doc/@install_name@/manual.html/*.html" >> debian/@install_name@.doc-base; \
[65]903 if test -f /usr/lib/lsb/install_initd; then \
904 cp init/samhain.startLSB debian/@install_name@.init; \
905 else \
906 cp init/samhain.startLinux debian/@install_name@.init; \
907 fi; \
[1]908 echo "Source: samhain" > debian/control; \
909 echo "Section: admin" >> debian/control; \
910 echo "Priority: optional" >> debian/control; \
911 echo "Maintainer: $$maintainer" >> debian/control; \
912 echo "Standards-Version: 3.2.1" >> debian/control; \
913 echo >> debian/control; \
914 echo "Package: @install_name@" >> debian/control; \
915 echo "Architecture: any" >> debian/control; \
[209]916 echo "Depends: libc6" >> debian/control; \
[1]917 echo "Description: File integrity checker" >> debian/control; \
918 echo " A file integrity checker" >> debian/control; \
919 echo "running debuild -us -uc"; \
[209]920 debuild -us -uc -b; \
[1]921 DEBFILE=`find ../ -follow -maxdepth 1 -cnewer ./debian/control 2>/dev/null | grep '@install_name@_$(VERSION)' | grep '\.deb'`; \
922 if test x"$$DEBFILE" = x; then \
923 echo "Error ... cannot find package file"; \
924 exit 1; \
925 else \
926 echo "Package $$DEBFILE built."; \
[245]927 cp $$DEBFILE ./$(PACKAGE)-$(VERSION)-$(BUILD_NUM).deb; \
[272]928 ln -s ./$(PACKAGE)-$(VERSION)-$(BUILD_NUM).deb ./$(PACKAGE)-$(VERSION).deb; \
[1]929 fi; \
930 echo
931
932#
933# Check samhain.spec
934#
935rpmspec-full:
936 @grep 'install-light' samhain.spec >/dev/null 2>&1; \
937 if test x"$$?" = "x0"; then \
938 echo "Your samhain.spec is from rpm-light. Please run"; \
939 echo " .config.status to re-create the original samhain.spec"; \
940 exit 1; \
941 fi
942
943# when editing the spec file, make an additional blank after 'make'
944# to avoid that it matches on a second processing
945#
946rpmspec-light: samhain.spec
947 @echo "Stripping docs from samhain.spec"; \
948 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 s,%attr.*,, > samhain.spec-light; \
949 mv samhain.spec-light samhain.spec
950
951rpm-light: rpmspec-light distrpm
952 rpmbuild -ta ./$(PACKAGE)-$(VERSION).tar.gz;
[58]953 @RPMTOP=`cat ~/.rpmmacros 2>/dev/null | grep '%_topdir' | awk '{ print $$2}'`; \
954 if test x"$$RPMTOP" = x; then RPMTOP=/usr/src; fi; \
955 echo "Searching the RPM package below $$RPMTOP ..."; \
956 RPMFILE=`find $$RPMTOP -follow -maxdepth 4 -cnewer ./samhain.spec 2>/dev/null | grep '@install_name@-$(VERSION)' | grep '\.rpm' | grep -v '\.src\.'`; \
[1]957 echo; \
958 if test x"$$RPMFILE" = x; then \
959 echo "Error ... cannot find package file"; \
960 exit 1; \
961 else \
962 echo "Package $$RPMFILE built."; \
[58]963 echo "Copying it to ./$(PACKAGE)-$(VERSION).rpm"; \
[1]964 cp $$RPMFILE ./$(PACKAGE)-$(VERSION).rpm; \
965 fi; \
966 echo
967
968rpm: rpmspec-full distrpm
969 rpmbuild -ta ./$(PACKAGE)-$(VERSION).tar.gz;
[58]970 @RPMTOP=`cat ~/.rpmmacros 2>/dev/null | grep '%_topdir' | awk '{ print $$2}'`; \
971 if test x"$$RPMTOP" = x; then RPMTOP=/usr/src; fi; \
972 echo "Searching the RPM package below $$RPMTOP ..."; \
973 RPMFILE=`find $$RPMTOP -follow -maxdepth 4 -cnewer ./samhain.spec 2>/dev/null | grep '@install_name@-$(VERSION)' | grep '\.rpm' | grep -v '\.src\.'`; \
[1]974 echo; \
975 if test x"$$RPMFILE" = x; then \
976 echo "Error ... cannot find package file"; \
977 exit 1; \
978 else \
979 echo "Package $$RPMFILE built."; \
[58]980 echo "Copying it to ./$(PACKAGE)-$(VERSION).rpm"; \
[1]981 cp $$RPMFILE ./$(PACKAGE)-$(VERSION).rpm; \
982 fi; \
983 echo
984
985srpm-dist: rpmspec-full samhain.spec
986 @cat samhain.spec | \
987 sed s%\-\-with\-base=.*\,[0123456789]*%% | \
988 sed s%\'\'%% > samhain.spec.m; \
989 mv samhain.spec.m samhain.spec
990 $(MAKE) distrpm
991 rpmbuild -ts ./$(PACKAGE)-$(VERSION).tar.gz
992
993
994srpm: rpmspec-full distrpm
995 rpmbuild -ts ./$(PACKAGE)-$(VERSION).tar.gz
996
997solaris-pkg-light: all
998 @STAGE=/tmp/samhain-pkg-staging; \
999 mkdir $$STAGE; \
1000 if test x"$$?" != x0; then \
1001 echo "ERROR ... mkdir $$STAGE failed"; \
1002 exit 1; \
1003 fi; \
[40]1004 $(MAKE) DESTDIR=$$STAGE install-light;
[1]1005 $(MAKE) solaris-pkg-finish
1006
1007solaris-pkg: all
1008 @STAGE=/tmp/samhain-pkg-staging; \
1009 mkdir $$STAGE; \
1010 if test x"$$?" != x0; then \
1011 echo "ERROR ... mkdir $$STAGE failed"; \
1012 exit 1; \
1013 fi; \
[40]1014 $(MAKE) DESTDIR=$$STAGE install;
[1]1015 $(MAKE) solaris-pkg-finish
1016
1017solaris-pkg-finish:
1018 @STAGE=/tmp/samhain-pkg-staging; \
1019 $(mkinstalldirs) $$STAGE/etc/init.d; \
1020 $(INSTALL_SHELL) init/samhain.startSolaris $$STAGE/etc/init.d/@install_name@; \
1021 (echo 'i pkginfo'; pkgproto $$STAGE=/ ) >prototype; \
1022 user=`id | sed s,uid=[0123456789]*\(,, | sed s,\).*,,`; \
1023 group=`id | sed s,.*gid=[0123456789]*\(,, | sed s,\).*,,`; \
[40]1024 cat prototype | grep -v 'none / ' | \
[1]1025 sed s,$$user\ $$group,root\ sys,g > prototype.1; \
[44]1026 rm -f prototype.2; \
1027 while read line; do \
1028 echo "$${line}" | egrep '^d none' >/dev/null 2>&1; \
1029 if [ $$? = 0 ]; then \
1030 dir=`echo "$${line}" | awk '{ print $$3 }'`; \
1031 if [ -d "$$dir" ]; then \
1032 echo "d none $${dir} ? ? ?" >> prototype.2; \
1033 else \
1034 echo "$${line}" >> prototype.2; \
1035 fi; \
1036 else \
1037 echo "$${line}" >> prototype.2; \
1038 fi; \
1039 done < prototype.1; \
1040 rm -f prototype && rm prototype.1 && mv prototype.2 prototype; \
[1]1041 echo "d none /etc/rc0.d ? ? ?" >> prototype; \
1042 echo "d none /etc/rc1.d ? ? ?" >> prototype; \
1043 echo "d none /etc/rc3.d ? ? ?" >> prototype; \
1044 echo "l none /etc/rc3.d/S99@install_name@=/etc/init.d/@install_name@" >> prototype; \
1045 echo "l none /etc/rc0.d/K10@install_name@=/etc/init.d/@install_name@" >> prototype; \
1046 echo "l none /etc/rc1.d/K10@install_name@=/etc/init.d/@install_name@" >> prototype; \
1047 ARCH=`uname -p`; \
[101]1048 PSTAMP=`date '+%c%y%m%d%H%M%S'`; \
[1]1049 echo "PKG=@install_name@" > pkginfo; \
1050 echo "NAME=file integrity check" >> pkginfo; \
1051 echo "VERSION=$(VERSION)" >> pkginfo; \
1052 echo "CATEGORY=system" >> pkginfo; \
1053 echo "CLASSES=none" >> pkginfo; \
1054 echo "VENDOR=http://la-samhna.de/samhain" >> pkginfo; \
1055 echo "EMAIL=support@la-samhna.de" >> pkginfo; \
1056 echo "ARCH=$$ARCH" >> pkginfo; \
1057 echo "PSTAMP=$$PSTAMP" >> pkginfo; \
1058 pkgmk -o; \
1059 pkgtrans -s /var/spool/pkg /tmp/samhain-pkg-staging/@install_name@.pkg @install_name@; \
1060 if test -f /tmp/samhain-pkg-staging/@install_name@.pkg; then \
1061 echo; \
1062 cp /tmp/samhain-pkg-staging/@install_name@.pkg $(PACKAGE)-$(VERSION).pkg; \
[40]1063 echo "Package $(PACKAGE)-$(VERSION).pkg is ready for installation"; \
[44]1064 echo "to install, use: pkgadd -n -d $(PACKAGE)-$(VERSION).pkg all"; \
[1]1065 echo; \
[40]1066 rm -rf /var/spool/pkg/@install_name@ /tmp/samhain-pkg-staging; \
[1]1067 else \
1068 echo; \
[126]1069 echo "**************************************************************"; \
[1]1070 echo "Error ... cannot find /tmp/samhain-pkg-staging/@install_name@.pkg."; \
1071 echo "Keeping /var/spool/pkg/@install_name@ /tmp/samhain-pkg-staging"; \
[126]1072 if test -d /var/spool/pkg; then \
1073 echo "**************************************************************"; \
1074 else \
1075 echo "************** /var/spool/pkg is missing *********************"; \
1076 fi; \
[1]1077 echo; \
1078 exit 1; \
1079 fi
1080
1081depot-prep: all
1082 STAGE=/tmp/samhain-pkg-staging; \
1083 mkdir $$STAGE; \
1084 if test x"$$?" != x0; then \
1085 echo "ERROR ... mkdir $$STAGE failed"; \
1086 exit 1; \
1087 fi; \
[40]1088 $(MAKE) DESTDIR=$$STAGE install; \
1089 $(MAKE) DESTDIR=$$STAGE install-boot; \
[1]1090 cp hp_ux.psf $$STAGE; \
1091 mkdir $$STAGE/sc; \
1092 echo "#!/sbin/sh" > $$STAGE/sc/configure; \
1093 echo "PATH=\$$SW_PATH; export PATH" >> $$STAGE/sc/configure; \
1094 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; \
1095 chmod +x $$STAGE/sc/configure; \
1096 echo "#!/sbin/sh" > $$STAGE/sc/unconfigure; \
1097 echo "PATH=\$$SW_PATH; export PATH" >> $$STAGE/sc/unconfigure; \
1098 echo "rm -f /sbin/rc2.d/S900@install_name@; rm -f /sbin/rc1.d/K100@install_name@" >> $$STAGE/sc/unconfigure; \
1099 chmod +x $$STAGE/sc/unconfigure; \
1100 echo "#!/sbin/sh" > $$STAGE/sc/preremove; \
1101 echo "PATH=\$$SW_PATH; export PATH" >> $$STAGE/sc/preremove; \
1102 echo "/sbin/init.d/@install_name@ stop" >> $$STAGE/sc/preremove; \
1103 echo "exit 0" >> $$STAGE/sc/preremove; \
1104 chmod +x $$STAGE/sc/preremove;
1105
1106depot: depot-prep
1107 (cd /tmp/samhain-pkg-staging && /usr/sbin/swpackage -v -s ./hp_ux.psf -x media_type=tape @ $(PACKAGE)-$(VERSION).depot)
1108 cp /tmp/samhain-pkg-staging/$(PACKAGE)-$(VERSION).depot .
1109 rm -rf /tmp/samhain-pkg-staging
1110
1111depot-light: depot
1112
1113#---------------------------------------------------------------
1114
1115
1116trustfile: $(srcsrc)/trustfile.c config.h
1117 $(COMPILE) $(VFLAG) -DSH_IDENT=\"@myident@\" -DTRUST_MAIN -DSL_ALWAYS_TRUSTED=@mytrust@ -o trustfile $(srcsrc)/trustfile.c
1118
1119sh_MK.h: config.h
1120 @echo "creating sh_MK.h"; \
1121 echo "#ifndef SH_MK_H" > sh_MK.h; \
1122 echo "#define SH_MK_H" >> sh_MK.h; \
1123 $(top_srcdir)/c_bits.sh @my_key_1@ MKB >> sh_MK.h; \
1124 $(top_srcdir)/c_bits.sh @my_key_2@ MKA >> sh_MK.h; \
1125 $(top_srcdir)/c_bits.sh @my_key_3@ MKC >> sh_MK.h; \
1126 $(top_srcdir)/c_bits.sh @my_key_4@ MKD >> sh_MK.h; \
1127 echo "#endif" >> sh_MK.h
1128
1129
1130sstrip: $(srcsrc)/sstrip.c Makefile
[98]1131 $(BUILD_CC) -I. -o sstrip $(srcsrc)/sstrip.c
[1]1132
1133encode: $(srcsrc)/encode.c Makefile
[98]1134 $(BUILD_CC) -I. -o encode $(srcsrc)/encode.c
[1]1135
1136config_xor.h: config.h encode
1137 @echo 'encode $(XOR_CODE) config.h'; \
1138 sleep 1; \
1139 ./encode $(XOR_CODE) config.h; \
1140 mv x_config.h config_xor.h
1141
1142#.c.o:
1143# @echo "./encode $(XOR_CODE) $< --> x_`echo $< |sed 's%.*/%%'`"; \
1144# ./encode $(XOR_CODE) $<; \
1145# echo "$(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $< |sed 's%.*/%%'`"; \
1146# $(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $< |sed 's%.*/%%'`; \
1147# rm x_`echo $< |sed 's%.*/%%'`
1148
[170]1149$(OBJECTS): encode internal.h
[1]1150 @echo "./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c --> x_`echo $@ |sed 's%\.o$$%%'`.c"; \
1151 ./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c; \
1152 echo "$(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c"; \
1153 $(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c; \
1154 rm x_`echo $@ |sed 's%\.o$$%%'`.c
1155
[18]1156sh_tiger_i.o: $(srcsrc)/$(TIGER_SRC) Makefile config_xor.h
1157 @echo "$(COMPILE) $(VFLAG) -o sh_tiger_i.o -c $(srcsrc)/$(TIGER_SRC)";\
1158 $(COMPILE) $(VFLAG) -o sh_tiger_i.o -c $(srcsrc)/$(TIGER_SRC);
1159
[1]1160samhain_setpwd: encode config_xor.h $(srcsrc)/samhain_setpwd.c
1161 @echo '$(COMPILE) -o samhain_setpwd $(srcsrc)/samhain_setpwd.c'; \
1162 ./encode $(XOR_CODE) $(srcsrc)/samhain_setpwd.c; \
1163 $(COMPILE) -o samhain_setpwd x_samhain_setpwd.c; \
1164 rm x_samhain_setpwd.c
1165
1166samhain_stealth: encode config_xor.h $(srcsrc)/samhain_stealth.c
1167 @echo '$(COMPILE) -o samhain_stealth $(srcsrc)/samhain_stealth.c'; \
1168 ./encode $(XOR_CODE) $(srcsrc)/samhain_stealth.c; \
1169 $(COMPILE) -o samhain_stealth x_samhain_stealth.c; \
1170 rm x_samhain_stealth.c
1171
1172yulectl: encode config_xor.h $(srcsrc)/yulectl.c
1173 @echo '$(COMPILE) -o yulectl $(srcsrc)/yulectl.c $(LIBS_SOCK)'; \
1174 ./encode $(XOR_CODE) $(srcsrc)/yulectl.c; \
1175 $(COMPILE) -o yulectl x_yulectl.c $(LIBS_SOCK); \
1176 rm x_yulectl.c
1177
[18]1178$(SAMHAIN): internal.h $(OBJECTS) sh_tiger_i.o
[1]1179 @-rm -f $(SAMHAIN)
[18]1180 @echo "$(LINK) sh_tiger_i.o $(OBJECTS) $(LIBS_TRY)"; \
1181 $(LINK) sh_tiger_i.o $(OBJECTS) $(LIBS_TRY)
[1]1182
1183
[18]1184CUTEST_SOURCES = $(srcsrc)/cutest_sh_tools.c \
[23]1185 $(srcsrc)/cutest_sh_utils.c \
[25]1186 $(srcsrc)/cutest_sh_unix.c \
[23]1187 $(srcsrc)/cutest_slib.c \
[18]1188 $(srcsrc)/cutest_zAVLTree.c \
[34]1189 $(srcsrc)/cutest_sh_hash.c \
[18]1190 $(srcsrc)/cutest_sh_tiger0.c
[1]1191
[23]1192CUTEST_OBJECTS = cutest_sh_tools.o \
1193 cutest_sh_utils.o \
[25]1194 cutest_sh_unix.o \
[23]1195 cutest_slib.o \
1196 cutest_zAVLTree.o \
[34]1197 cutest_sh_hash.o \
[23]1198 cutest_sh_tiger0.o
[18]1199
[170]1200$(CUTEST_OBJECTS): $(CUTEST_SOURCES) config_xor.h internal.h
[18]1201 @echo "./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c --> x_`echo $@ |sed 's%\.o$$%%'`.c"; \
1202 ./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c; \
1203 echo "$(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c"; \
1204 $(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c; \
1205 rm x_`echo $@ |sed 's%\.o$$%%'`.c
1206
[68]1207
1208cutest: $(SOURCES) $(CUTEST_SOURCES)
1209 @$(MAKE) CUTEST='-DSH_CUTEST=1' intcutest
1210
[257]1211$(srcsrc)/CuTestMain.c: $(SOURCES) $(CUTEST_SOURCES) $(srcsrc)/make-tests.sh
1212 cd $(srcsrc)/ && ./make-tests.sh >CuTestMain.c;
1213
1214intcutest: internal.h $(OBJECTS) $(CUTEST_OBJECTS) sh_tiger_i.o $(srcsrc)/CuTestMain.c
[18]1215 @$(COMPILE) -o CuTestMain.o -c $(srcsrc)/CuTestMain.c; \
1216 $(COMPILE) -o CuTest.o -c $(srcsrc)/CuTest.c; \
1217 rm -f samhain.o; \
1218 ./encode $(XOR_CODE) $(srcsrc)/samhain.c; \
[68]1219 $(COMPILE) $(VFLAG) -o samhain.o -c x_samhain.c; \
[18]1220 rm x_samhain.c; \
1221 $(LINK) sh_tiger_i.o $(CUTEST_OBJECTS) CuTestMain.o CuTest.o $(OBJECTS) $(LIBS_TRY); \
[68]1222 test -f ./intcutest && mv ./intcutest ./cutest; \
[18]1223 ./cutest
1224
[171]1225runcutest:
1226 gdb ./cutest
1227
[1]1228samhain_hide.o: $(srcsrc)/samhain_hide.c samhain_erase.o
1229 gcc @lkm_inc@ -I. -Wall -O2 -c $(srcsrc)/samhain_hide.c
1230
1231samhain_erase.o: $(srcsrc)/samhain_erase.c
1232 gcc @lkm_inc@ -I. -Wall -O2 -c $(srcsrc)/samhain_erase.c
1233
1234# -- NEW --
1235samhain_hide.ko: $(srcsrc)/samhain_hide.c
1236 @test -d m_comp || mkdir m_comp; \
1237 echo "KVERSION := \$$(shell uname -r)" > m_comp/Makefile;\
1238 echo "KSOURCE ?= /lib/modules/\$$(KVERSION)/build" >> m_comp/Makefile;\
1239 echo "obj-m := samhain_hide.o" >> m_comp/Makefile;\
1240 echo ".PHONY: modules install clean modules_add" >> m_comp/Makefile;\
1241 echo "install : modules_add" >> m_comp/Makefile;\
1242 echo "modules modules_install clean:" >> m_comp/Makefile;\
1243 echo "T\$$(MAKE) -C \$$(KSOURCE) \$$@ SUBDIRS=\$$(CURDIR) KBUILD_VERBOSE=2" | tr T '\t' >> m_comp/Makefile;\
1244 cp config.h m_comp/; \
1245 cp $(srcsrc)/samhain_hide.c m_comp/; \
[40]1246 cd m_comp && $(MAKE) modules
[1]1247 @if test -f m_comp/samhain_hide.ko; then \
1248 cp -p m_comp/samhain_hide.ko samhain_hide.ko; \
1249 rm -rf m_comp/; \
1250 else \
1251 echo "Kernel module samhain_hide.ko not build"; \
1252 exit 1; \
1253 fi
1254
1255# -- NEW --
[279]1256samhain_kmem.ko: $(srcsrc)/samhain_kmem.c
1257 @test -d m_comp || mkdir m_comp; \
1258 echo "KVERSION := \$$(shell uname -r)" > m_comp/Makefile;\
1259 echo "KSOURCE ?= /lib/modules/\$$(KVERSION)/build" >> m_comp/Makefile;\
[353]1260 echo "obj-m := @install_name@_kmem.o" >> m_comp/Makefile;\
[279]1261 echo ".PHONY: modules install clean modules_add" >> m_comp/Makefile;\
1262 echo "install : modules_add" >> m_comp/Makefile;\
1263 echo "modules modules_install clean:" >> m_comp/Makefile;\
1264 echo "T\$$(MAKE) -C \$$(KSOURCE) \$$@ SUBDIRS=\$$(CURDIR) KBUILD_VERBOSE=2" | tr T '\t' >> m_comp/Makefile;\
1265 cp config.h m_comp/; \
[353]1266 cp $(srcsrc)/samhain_kmem.c m_comp/@install_name@_kmem.c; \
[279]1267 cd m_comp && $(MAKE) modules
[353]1268 @if test -f m_comp/@install_name@_kmem.ko; then \
1269 cp -p m_comp/@install_name@_kmem.ko samhain_kmem.ko; \
[279]1270 rm -rf m_comp/; \
1271 else \
1272 echo "Kernel module samhain_kmem.ko not build"; \
1273 exit 1; \
1274 fi
1275
1276
1277# -- NEW --
[1]1278lkm: @sh_lkm@
1279
1280
1281
1282# For kernel syscall monitoring
1283kern_head: Makefile $(top_srcdir)/include/kern_head.h $(srcsrc)/kern_head.c
[101]1284 @echo "$(BUILD_CC) -I. -I./include -DSYSTEMMAP=\"@systemmap@\" -o kern_head $(srcsrc)/kern_head.c $(LIBS_KVM)"; \
1285 $(BUILD_CC) -I. -I./include -DSYSTEMMAP=\"@systemmap@\" -o kern_head $(srcsrc)/kern_head.c $(LIBS_KVM)
[1]1286
1287sh_ks.h: kern_head
1288 @sleep 1; \
1289 ./kern_head > sh_ks.h
1290
1291sh_ks_xor.h: encode sh_ks.h
1292 @echo 'encode $(XOR_CODE) sh_ks.h'; \
1293 sleep 1; \
1294 ./encode $(XOR_CODE) sh_ks.h; \
1295 mv x_sh_ks.h sh_ks_xor.h
1296
1297# For bignum
1298internal.h: mkhdr
1299 @sleep 1; \
1300 ./mkhdr
1301
1302bignum.o: internal.h
1303
[170]1304
[1]1305# If your compiler can't handle long identifiers (> 6 chars), move the `#' to
1306# the other line.
1307
1308mkhdr: $(srcsrc)/mkhdr.c config.h
[98]1309 @echo "$(BUILD_CC) -I. -o mkhdr $(srcsrc)/mkhdr.c"; \
[1]1310 sleep 1; \
[98]1311 $(BUILD_CC) -I. -o mkhdr $(srcsrc)/mkhdr.c
[1]1312
1313# $(COMPILE) -DBIG_SHORT_NAMES -o mkhdr $(srcdir)/mkhdr.c
1314
1315#----------------------------------------------------------
1316#
1317# EXE PACKER rules
1318#
1319#----------------------------------------------------------
1320
1321minilzo.o: $(srcsrc)/minilzo.c $(srcinc)/lzoconf.h $(srcinc)/minilzo.h config.h
1322 @echo "$(COMPILE) -DMINILZO_HAVE_CONFIG_H -o minilzo.o -c $(srcsrc)/minilzo.c"; \
1323 $(COMPILE) -DMINILZO_HAVE_CONFIG_H -o minilzo.o -c $(srcsrc)/minilzo.c
1324
1325exepack_mkdata: $(srcsrc)/exepack_mkdata.c $(srcinc)/lzoconf.h $(srcinc)/minilzo.h minilzo.o
1326 @echo "$(COMPILE) -o exepack_mkdata.o -c $(srcsrc)/exepack_mkdata.c"; \
1327 $(COMPILE) -o exepack_mkdata.o -c $(srcsrc)/exepack_mkdata.c; \
1328 echo "$(LINK) exepack_mkdata.o minilzo.o"; \
1329 $(LINK) exepack_mkdata.o minilzo.o
1330
1331#
1332# prepare the data to be packed
1333#
1334exepack.data: $(SAMHAIN) exepack_mkdata sstrip
1335 @echo "cp ./$(SAMHAIN) ./samhain.pk.data"; \
1336 cp ./$(SAMHAIN) ./samhain.pk.data; \
1337 echo "strip ./samhain.pk.data"; \
1338 strip ./samhain.pk.data > /dev/null 2>&1 || echo "... is already stripped"; \
1339 echo "./sstrip ./samhain.pk.data"; \
1340 ./sstrip ./samhain.pk.data > /dev/null 2>&1 || echo "sstrip returned false"; \
1341 echo "./exepack_mkdata ./samhain.pk.data ./exepack.data 0"; \
1342 ./exepack_mkdata ./samhain.pk.data ./exepack.data 0; \
1343 echo "rm -f ./samhain.pk.data"; \
1344 rm -f ./samhain.pk.data;
1345
1346exepack: $(srcsrc)/exepack.c minilzo.o exepack.data
1347 @echo "$(COMPILE) -o exepack.o -c $(srcsrc)/exepack.c"; \
1348 $(COMPILE) -o exepack.o -c $(srcsrc)/exepack.c; \
1349 echo "$(LINK) exepack.o minilzo.o"; \
1350 $(LINK) exepack.o minilzo.o;
1351
1352#
1353# this program fills the data section with the binary
1354#
1355exepack_fill: $(srcsrc)/exepack_fill.c minilzo.o exepack
1356 @echo "$(COMPILE) -o exepack_fill.o -c $(srcsrc)/exepack_fill.c"; \
1357 $(COMPILE) -o exepack_fill.o -c $(srcsrc)/exepack_fill.c; \
1358 echo "$(LINK) exepack_fill.o minilzo.o"; \
1359 $(LINK) exepack_fill.o minilzo.o
1360
1361samhain.pk: $(SAMHAIN) exepack exepack_fill sstrip
1362 @echo "cp ./$(SAMHAIN) ./samhain.pk.data"; \
1363 cp ./$(SAMHAIN) ./samhain.pk.data; \
1364 echo "strip ./samhain.pk.data"; \
1365 strip ./samhain.pk.data > /dev/null 2>&1 || echo "... is already stripped"; \
1366 echo "./sstrip ./samhain.pk.data"; \
1367 ./sstrip ./samhain.pk.data > /dev/null 2>&1 || echo "sstrip returned false"; \
1368 test -f exepack.out && rm exepack.out; \
1369 echo "./exepack_fill exepack samhain.pk.data exepack.out"; \
1370 ./exepack_fill exepack samhain.pk.data exepack.out; \
1371 chmod +x exepack.out; \
1372 echo "strip exepack.out"; \
1373 strip exepack.out > /dev/null 2>&1 || echo "... is already stripped"; \
1374 ./sstrip exepack.out > /dev/null 2>&1 || echo "sstrip returned false"; \
1375 echo "mv exepack.out samhain.pk"; \
1376 rm -f samhain.pk; mv exepack.out samhain.pk
1377
1378samhain-packed: $(SAMHAIN) samhain_setpwd
1379 @echo "samhain_setpwd samhain new $(CLIENTPASSWD)"; \
1380 samhain_setpwd samhain new $(CLIENTPASSWD); \
1381 echo "rm -f samhain; mv samhain.new samhain"; \
1382 rm -f samhain; mv samhain.new samhain; \
1383 $(MAKE) samhain.pk; \
1384 echo "rm -f samhain; mv samhain.pk samhain"; \
1385 rm -f samhain; mv samhain.pk samhain
1386
1387#----------------------------------------------------------
1388#
1389# DEPLOY rules
1390#
1391#----------------------------------------------------------
1392
1393uninstall-deploy:
1394 rm -rf $(mydatadir)/profiles/source
1395 rm -rf $(mydatadir)/profiles/archpkg
1396 rm -rf $(mydatadir)/profiles/libexec
1397 rm -rf $(mydatadir)/profiles/tmp
1398 rm -rf $(mydatadir)/profiles/private
1399 @if test -f $(sbindir)/deploy.sh; then \
1400 old_deploy=`grep 'VERSION2' $(sbindir)/deploy.sh >/dev/null 2>&1 || echo old`; \
1401 if test x"$$old_deploy" = xold; then \
1402 echo "rm -f $(sbindir)/deploy2.sh"; \
1403 rm -f $(sbindir)/deploy2.sh; \
1404 else \
1405 echo "rm -f $(sbindir)/deploy.sh"; \
1406 rm -f $(sbindir)/deploy.sh; \
1407 fi; \
1408 fi
1409
1410EXECFILES= comCHECKSRC comDOWNLOAD comBUILD comCLEAN comINSTALL \
1411 funcDIALOG funcEXE funcPRINT funcSETUP funcBUILD funcINSTALL \
1412 funcDB comUNINSTALL \
1413 preinstall postinstall initscript
1414
1415# $(mydatadir)/profiles/
1416# |
1417# |
1418# |-- source -------------> (tarballs)
1419# |
1420# |-- configs ------------> (default configs)
1421# |
1422# |-- archpkg
1423# | |
1424# | |-- architecture -> (package, setup script)
1425# |
1426# |-- hosts
1427# | |
1428# | |-- hostname -----> (config)
1429# |
1430# |-- libexec ------------> (scripts)
1431# |
1432# |-- private ------------> (gpg key)
1433# |
1434# |-- tmp
1435#
1436install-deploy: deploy.sh samhain_stealth
1437 @echo "Creating directory tree under $(mydatadir)/profiles/"; \
1438 $(mkinstalldirs) $(sbindir); \
1439 $(mkinstalldirs) $(mydatadir)/profiles/source; \
1440 $(mkinstalldirs) $(mydatadir)/profiles/configs; \
1441 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/debian_i386; \
1442 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/gentoo_i386; \
1443 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/redhat_i386; \
1444 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/linux_i386; \
1445 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/freebsd_i386;\
1446 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/solaris; \
1447 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/aix; \
1448 $(mkinstalldirs) $(mydatadir)/profiles/hosts; \
1449 $(mkinstalldirs) $(mydatadir)/profiles/libexec; \
1450 $(mkinstalldirs) $(mydatadir)/profiles/private; \
1451 $(mkinstalldirs) $(mydatadir)/profiles/tmp; \
1452 if test -f $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz.asc; then \
1453 if test -f $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz; then \
1454 echo "Installing source tarball"; \
1455 $(INSTALL_DATA) $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz.asc \
1456 $(mydatadir)/profiles/source/$(PACKAGE)-$(VERSION).tar.gz.asc; \
1457 $(INSTALL_DATA) $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz \
1458 $(mydatadir)/profiles/source/$(PACKAGE)-$(VERSION).tar.gz; \
1459 fi; \
1460 fi; \
1461 echo "Installing default configs"; \
1462 test -f $(mydatadir)/profiles/configs/freebsd_i386.samhainrc || \
1463 $(INSTALL_DATA) $(srcdir)/samhainrc.freebsd \
1464 $(mydatadir)/profiles/configs/freebsd_i386.samhainrc; \
1465 test -f $(mydatadir)/profiles/configs/debian_i386.samhainrc || \
1466 $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
1467 $(mydatadir)/profiles/configs/debian_i386.samhainrc; \
1468 test -f $(mydatadir)/profiles/configs/gentoo_i386.samhainrc || \
1469 $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
1470 $(mydatadir)/profiles/configs/gentoo_i386.samhainrc; \
1471 test -f $(mydatadir)/profiles/configs/redhat_i386.samhainrc || \
1472 $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
1473 $(mydatadir)/profiles/configs/redhat_i386.samhainrc; \
1474 test -f $(mydatadir)/profiles/configs/linux_i386.samhainrc || \
1475 $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
1476 $(mydatadir)/profiles/configs/linux_i386.samhainrc; \
1477 test -f $(mydatadir)/profiles/configs/solaris.samhainrc || \
1478 $(INSTALL_DATA) $(srcdir)/samhainrc.solaris \
1479 $(mydatadir)/profiles/configs/solaris.samhainrc; \
1480 test -f $(mydatadir)/profiles/configs/aix.samhainrc || \
1481 $(INSTALL_DATA) $(srcdir)/samhainrc.aix5.2.0 \
1482 $(mydatadir)/profiles/configs/aix.samhainrc; \
1483 if test -f $(mydatadir)/profiles/configs/generic.configure; then \
1484 :; \
1485 else \
1486 SH_FQDN_SYSTEM=`uname -n`; \
1487 SH_FQDN_DOMAIN=`grep -i domain /etc/resolv.conf |grep -v "\#" |awk '{print $$2}' |head -1`; \
1488 if test -n "$${SH_FQDN_SYSTEM}" -a -n "$${SH_FQDN_DOMAIN}"; then \
1489 sh_thishost="$${SH_FQDN_SYSTEM}.$${SH_FQDN_DOMAIN}"; \
1490 else \
1491 sh_thishost="FQDN_MISSING"; \
1492 fi; \
1493 outfile=$(mydatadir)/profiles/configs/generic.configure; \
1494 echo "'--enable-network=client'" > $$outfile; \
1495 echo "'--with-logserver=$${sh_thishost}'" >> $$outfile; \
1496 echo "'--with-data-file=REQ_FROM_SERVER/var/lib/samhain/samhain_file'" >> $$outfile; \
1497 echo "'--with-config-file=REQ_FROM_SERVER/etc/samhainrc'" >> $$outfile; \
1498 echo "'--enable-base=@mykeybase@'" >> $$outfile; \
1499 fi; \
1500 $(INSTALL_SHELL) $(srcdir)/mkinstalldirs \
1501 $(mydatadir)/profiles/libexec; \
1502 $(INSTALL_SHELL) $(srcdir)/install-sh \
1503 $(mydatadir)/profiles/libexec; \
1504 for ff in $(EXECFILES); do \
1505 test -f $(srcdir)/dsys/$$ff && $(INSTALL_SHELL) $(srcdir)/dsys/$$ff \
1506 $(mydatadir)/profiles/libexec; \
1507 done; \
1508 $(INSTALL_SHELL) samhain_stealth $(mydatadir)/profiles/libexec; \
1509 test -f $(srcdir)/dsys/0F571F6C.asc && $(INSTALL_DATA) $(srcdir)/dsys/0F571F6C.asc \
1510 $(mydatadir)/profiles/private; \
1511 convert +compress $(srcdir)/stealth_template.jpg stealth_template.ps >/dev/null || \
1512 { 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 "*"; }; \
1513 if test -f stealth_template.ps; then \
1514 if test -f $(mydatadir)/profiles/private/stealth_template.ps; then \
1515 :; \
1516 else \
1517 $(INSTALL_DATA) stealth_template.ps $(mydatadir)/profiles/private; \
1518 fi; \
1519 fi; \
1520 if test -f $(sbindir)/deploy.sh; then \
1521 old_deploy=`grep 'VERSION2' $(sbindir)/deploy.sh >/dev/null 2>&1 || echo old`; \
1522 if test x"$$old_deploy" = xold; then \
1523 echo "*"; echo "* Version 1 of deploy.sh found"; echo "*"; \
1524 echo "* Installing $(sbindir)/deploy2.sh"; echo "*"; \
1525 $(INSTALL_SHELL) deploy.sh $(sbindir)/deploy2.sh; \
1526 else \
1527 echo "Installing $(sbindir)/deploy.sh"; \
1528 $(INSTALL_SHELL) deploy.sh $(sbindir)/deploy.sh; \
1529 fi; \
1530 else \
1531 echo "Installing $(sbindir)/deploy.sh"; \
1532 $(INSTALL_SHELL) deploy.sh $(sbindir)/deploy.sh; \
1533 fi
1534
1535
1536#----------------------------------------------------------
1537#
1538# DISTRIBUTION rules
1539#
1540#----------------------------------------------------------
1541
1542distdir = $(PACKAGE)-$(VERSION)
1543top_distdir = $(distdir)
1544
1545# This target untars the dist file and tries a VPATH configuration. Then
1546# it guarantees that the distribution is self-contained by making another
1547# tarfile.
1548
1549#
1550# 1) make distribution tarfile
1551# 2) unpack the tarfile into distdir
1552# 3) create build and install directories
1553# 4) do the build in the build dir, with sources from distdir
1554# 5) check (there are no subdirs, thus does nothing)
1555# 6) install
1556# 7) installcheck (equal to check, does nothing)
1557#
1558distcheck: dist
1559 -rm -rf $(distdir)
1560 GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
1561 mkdir $(distdir)/=build
1562 mkdir $(distdir)/=inst
1563 dc_install_base=`cd $(distdir)/=inst && pwd`; \
1564 cd $(distdir)/=build \
1565 && ../configure --srcdir=.. --prefix=$$dc_install_base \
1566 && $(MAKE) \
1567 && $(MAKE) install
1568 -rm -rf $(distdir)
1569 -rm -f $(distdir).tar.gz.asc
1570 @gpg -a --detach-sign $(distdir).tar.gz; \
1571 $(TAR) chof $(distdir).tar $(distdir).tar.gz $(distdir).tar.gz.asc; \
1572 rm -f $(distdir).tar.gz; \
1573 rm -f $(distdir).tar.gz.asc; \
1574 gzip --best $(distdir).tar
1575 mv $(distdir).tar.gz $(PACKAGE)_signed-$(VERSION).tar.gz
1576 @echo "========================"; \
1577 echo "$(PACKAGE)_signed-$(VERSION).tar.gz is ready for distribution"; \
1578 echo "========================"
1579
1580#
1581# create a tarfile for the distibution
1582#
1583distrpm: distdirrpm
1584 -chmod -R a+r $(distdir)
1585 -rm -rf $(distdir).tar.gz
1586 -rm -rf $(distdir).tar
1587 $(TAR) chof $(distdir).tar $(distdir)
1588 gzip -c --best $(distdir).tar > $(distdir).tar.gz
1589 -rm -rf $(distdir)
1590
1591dist: distdir
1592 -chmod -R a+r $(distdir)
1593 -rm -rf $(distdir).tar.gz
1594 -rm -rf $(distdir).tar
1595 $(TAR) chof $(distdir).tar $(distdir)
1596 gzip -c --best $(distdir).tar > $(distdir).tar.gz
1597 -rm -rf $(distdir)
1598
1599#
1600# create a tarfile for the distibution
1601#
1602dist-sign: distdir
1603 -rm -f $(distdir)/scripts/samhain.ebuild
1604 -rm -f $(distdir)/scripts/samhain.ebuild-light
1605 -chmod -R a+r $(distdir)
1606 -rm -rf $(distdir).tar.gz
1607 -rm -rf $(distdir).tar
1608 $(TAR) chof $(distdir).tar $(distdir)
1609 gzip --best $(distdir).tar
1610 -rm -rf $(distdir)
1611 -rm -f $(distdir).tar.gz.asc
1612 gpg -a --detach-sign $(distdir).tar.gz
1613 $(TAR) chof $(distdir).tar $(distdir).tar.gz $(distdir).tar.gz.asc
1614 -rm -f $(distdir).tar.gz
1615 -rm -f $(distdir).tar.gz.asc
1616 gzip --best $(distdir).tar
1617 mv $(distdir).tar.gz $(PACKAGE)_signed-$(VERSION).tar.gz
1618
1619
1620#
1621# same as dist
1622#
1623dist-all: distdir
1624 -chmod -R a+r $(distdir)
1625 GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
1626 -rm -rf $(distdir)
1627
1628#
1629# create distribution directory and copy files into it
1630#
1631INITFILES=samhain.startIRIX samhain.startFreeBSD samhain.startSolaris \
[71]1632samhain.startLSB samhain.startGentoo samhain.startLinux samhain.startHPUX \
[100]1633samhain.startIRIX samhain.startMACOSX
[1]1634
1635SCRIPTFILES=redhat_i386.client.spec check_samhain.pl samhainadmin.pl
1636
1637distdir: distfilecheck
1638 -rm -f $(top_srcdir)/init/*~
1639 -rm -f $(top_srcdir)/dsys/*~
1640 -rm -f $(top_srcdir)/docs/*~
1641 -rm -f $(top_srcdir)/include/*~
1642 -rm -f $(top_srcdir)/src/*~
1643 -rm -f $(top_srcdir)/test/*~
1644 -rm -f $(top_srcdir)/scripts/*~
1645 (cd $(top_srcdir)/init && rm -f $(INITFILES))
1646 (cd $(top_srcdir)/scripts && rm -f $(SCRIPTFILES))
1647 -rm -rf $(distdir)
1648 mkdir $(distdir)
1649 -chmod 777 $(distdir)
1650 @for file in $(DISTFILES); do \
1651 d=$(top_srcdir); \
1652 if test -f $$d/$$file || test -d $$d/$$file; then \
1653 cp -pr $$d/$$file $(distdir)/$$file; \
1654 fi; \
1655 done; \
1656 cp scripts/samhain.spec $(distdir)/samhain.spec; \
1657 rm -f $(distdir)/scripts/*.spec
1658
1659#
1660# as distdir, but don't copy spec file from scripts
1661#
1662distdirrpm: distfilecheck
1663 -rm -rf $(distdir)
1664 mkdir $(distdir)
1665 -chmod 777 $(distdir)
1666 @if test -f ./samhain.spec; then \
1667 :; \
1668 else \
1669 echo "Error: ./samhain.spec not found, please run configure"; \
1670 exit 1; \
1671 fi
1672 @cp -p samhain.spec $(distdir)/samhain.spec; \
1673 for file in $(DISTFILES); do \
1674 d=$(top_srcdir); \
1675 if test -f $$d/$$file || test -d $$d/$$file; then \
1676 if test x"$$file" = "xsamhain.spec"; then \
1677 :; \
1678 else \
1679 cp -pr $$d/$$file $(distdir)/$$file; \
1680 fi; \
1681 fi; \
1682 done; \
1683 rm -f $(distdir)/scripts/*.spec
1684
1685
1686distfilecheck: $(top_srcdir)/config.h.in $(top_srcdir)/depend.sum
1687 @for file in $(DISTFILES); do \
1688 d=$(top_srcdir); \
1689 if test -f $$d/$$file || test -d $$d/$$file; then \
1690 : \
1691 else \
1692 echo "File not found: $$d/$$file"; \
1693 fi; \
1694 done
1695 @for file in $(SOURCES); do \
1696 if test -f $$file; then \
1697 : \
1698 else \
1699 echo "File not found: $$file"; \
1700 fi; \
1701 done
1702
1703
1704# DO NOT DELETE THIS LINE
1705
1706
[367]1707samhain.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]1708sh_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]1709sh_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]1710sh_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]1711sh_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
1712sh_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
1713sh_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]1714sh_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]1715sh_tiger1.o: $(srcsrc)/sh_tiger1.c Makefile config_xor.h
1716sh_tiger2.o: $(srcsrc)/sh_tiger2.c Makefile config_xor.h
1717sh_tiger1_64.o: $(srcsrc)/sh_tiger1_64.c Makefile config_xor.h
1718sh_tiger2_64.o: $(srcsrc)/sh_tiger2_64.c Makefile config_xor.h
[149]1719sh_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]1720sh_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]1721sh_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]1722sh_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]1723sh_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]1724sh_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]1725sh_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]1726sh_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
1727sh_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]1728sh_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]1729sh_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]1730sh_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]1731sh_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
1732sh_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
1733sh_cat.o: $(srcsrc)/sh_cat.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_cat.h
[315]1734sh_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]1735sh_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]1736sh_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
1737sh_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
1738sh_err_console.o: $(srcsrc)/sh_err_console.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h
1739sh_err_syslog.o: $(srcsrc)/sh_err_syslog.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h
[23]1740sh_schedule.o: $(srcsrc)/sh_schedule.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_schedule.h
[1]1741bignum.o: $(srcsrc)/bignum.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/bignum.h
1742mkhdr.o: $(srcsrc)/mkhdr.c Makefile config.h
1743samhain_setpwd.o: $(srcsrc)/samhain_setpwd.c Makefile config_xor.h
1744samhain_stealth.o: $(srcsrc)/samhain_stealth.c Makefile config_xor.h
1745encode.o: $(srcsrc)/encode.c Makefile
[48]1746sstrip.o: $(srcsrc)/sstrip.c Makefile config.h
[138]1747trustfile.o: $(srcsrc)/trustfile.c Makefile config_xor.h $(srcinc)/sh_calls.h $(srcinc)/slib.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h
[1]1748exepack.o: $(srcsrc)/exepack.c Makefile config.h $(srcinc)/minilzo.h $(srcinc)/exepack.data
1749exepack_fill.o: $(srcsrc)/exepack_fill.c Makefile config.h config.h $(srcinc)/minilzo.h
1750exepack_mkdata.o: $(srcsrc)/exepack_mkdata.c Makefile config.h $(srcinc)/minilzo.h
1751minilzo.o: $(srcsrc)/minilzo.c Makefile $(srcinc)/minilzo.h
[167]1752slib.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]1753rijndael-alg-fst.o: $(srcsrc)/rijndael-alg-fst.c Makefile config_xor.h $(srcinc)/rijndael-alg-fst.h $(srcinc)/rijndael-boxes-fst.h
[230]1754rijndael-api-fst.o: $(srcsrc)/rijndael-api-fst.c Makefile config_xor.h $(srcinc)/rijndael-api-fst.h
[1]1755zAVLTree.o: $(srcsrc)/zAVLTree.c Makefile $(srcinc)/zAVLTree.h
1756sh_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]1757sh_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]1758yulectl.o: $(srcsrc)/yulectl.c Makefile config_xor.h
1759sh_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]1760sh_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
1761sh_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]1762kern_head.o: $(srcsrc)/kern_head.c Makefile config.h $(srcinc)/kern_head.h $(srcinc)/kern_head.h
1763sh_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]1764sh_static.o: $(srcsrc)/sh_static.c Makefile config_xor.h $(srcinc)/sh_pthread.h
[18]1765sh_async.o: $(srcsrc)/sh_async.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_calls.h $(srcinc)/sh_error.h
[143]1766sh_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]1767sh_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]1768sh_pthread.o: $(srcsrc)/sh_pthread.c Makefile config_xor.h $(srcinc)/sh_pthread.h $(srcinc)/sh_calls.h $(srcinc)/sh_modules.h
[169]1769sh_string.o: $(srcsrc)/sh_string.c Makefile config_xor.h $(srcinc)/sh_string.h $(srcinc)/sh_mem.h $(srcinc)/CuTest.h
[171]1770dnmalloc.o: $(srcsrc)/dnmalloc.c Makefile config.h
1771t-test1.o: $(srcsrc)/t-test1.c Makefile config.h $(srcinc)/malloc.h
[298]1772sh_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]1773sh_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
1774sh_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
1775sh_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]1776sh_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]1777sh_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]1778sh_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]1779sh_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
1780sh_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]1781sh_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]1782sh_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
1783sh_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
1784sh_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]1785sh_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]1786sh_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]1787sh_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
1788sh_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]1789sh_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]1790sh_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
1791sh_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]1792sh_sub.o: $(srcsrc)/sh_sub.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h
[367]1793sh_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.