source: trunk/Makefile.in@ 265

Last change on this file since 265 was 265, checked in by katerina, 15 years ago

Enhance logfile monitoring (tickets #183, #184, #185).

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