source: trunk/Makefile.in@ 22

Last change on this file since 22 was 19, checked in by rainer, 19 years ago

Rewrite of test suite, checksum for growing logs, fix for minor bug with dead client detection.

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