source: trunk/Makefile.in@ 96

Last change on this file since 96 was 95, checked in by rainer, 18 years ago

Add rule to create stamp-hdep in makefile

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