source: trunk/Makefile.in@ 43

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

Fix for tickets #13, #14, #15, #16, #17

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