source: trunk/Makefile.in@ 30

Last change on this file since 30 was 28, checked in by katerina, 19 years ago

Documentation update

File size: 66.6 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 testrun_1c.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_2.html.tar >> debian/docs; \
796 echo $(top_srcdir)/docs/MANUAL-2_2.pdf >> 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_sh_utils.c \
1093 $(srcsrc)/cutest_sh_unix.c \
1094 $(srcsrc)/cutest_slib.c \
1095 $(srcsrc)/cutest_zAVLTree.c \
1096 $(srcsrc)/cutest_sh_tiger0.c
1097
1098CUTEST_OBJECTS = cutest_sh_tools.o \
1099 cutest_sh_utils.o \
1100 cutest_sh_unix.o \
1101 cutest_slib.o \
1102 cutest_zAVLTree.o \
1103 cutest_sh_tiger0.o
1104
1105$(CUTEST_OBJECTS): $(CUTEST_SOURCES)
1106 @echo "./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c --> x_`echo $@ |sed 's%\.o$$%%'`.c"; \
1107 ./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c; \
1108 echo "$(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c"; \
1109 $(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c; \
1110 rm x_`echo $@ |sed 's%\.o$$%%'`.c
1111
1112cutest: internal.h $(OBJECTS) $(CUTEST_OBJECTS) sh_tiger_i.o $(srcsrc)/make-tests.sh
1113 cd $(srcsrc)/ && ./make-tests.sh >CuTestMain.c
1114 @$(COMPILE) -o CuTestMain.o -c $(srcsrc)/CuTestMain.c; \
1115 $(COMPILE) -o CuTest.o -c $(srcsrc)/CuTest.c; \
1116 rm -f samhain.o; \
1117 ./encode $(XOR_CODE) $(srcsrc)/samhain.c; \
1118 $(COMPILE) $(VFLAG) -DSH_CUTEST=1 -o samhain.o -c x_samhain.c; \
1119 rm x_samhain.c; \
1120 $(LINK) sh_tiger_i.o $(CUTEST_OBJECTS) CuTestMain.o CuTest.o $(OBJECTS) $(LIBS_TRY); \
1121 ./cutest
1122
1123samhain_hide.o: $(srcsrc)/samhain_hide.c samhain_erase.o
1124 gcc @lkm_inc@ -I. -Wall -O2 -c $(srcsrc)/samhain_hide.c
1125
1126samhain_erase.o: $(srcsrc)/samhain_erase.c
1127 gcc @lkm_inc@ -I. -Wall -O2 -c $(srcsrc)/samhain_erase.c
1128
1129# -- NEW --
1130samhain_hide.ko: $(srcsrc)/samhain_hide.c
1131 @test -d m_comp || mkdir m_comp; \
1132 echo "KVERSION := \$$(shell uname -r)" > m_comp/Makefile;\
1133 echo "KSOURCE ?= /lib/modules/\$$(KVERSION)/build" >> m_comp/Makefile;\
1134 echo "obj-m := samhain_hide.o" >> m_comp/Makefile;\
1135 echo ".PHONY: modules install clean modules_add" >> m_comp/Makefile;\
1136 echo "install : modules_add" >> m_comp/Makefile;\
1137 echo "modules modules_install clean:" >> m_comp/Makefile;\
1138 echo "T\$$(MAKE) -C \$$(KSOURCE) \$$@ SUBDIRS=\$$(CURDIR) KBUILD_VERBOSE=2" | tr T '\t' >> m_comp/Makefile;\
1139 cp config.h m_comp/; \
1140 cp $(srcsrc)/samhain_hide.c m_comp/; \
1141 cd m_comp && make modules
1142 @if test -f m_comp/samhain_hide.ko; then \
1143 cp -p m_comp/samhain_hide.ko samhain_hide.ko; \
1144 rm -rf m_comp/; \
1145 else \
1146 echo "Kernel module samhain_hide.ko not build"; \
1147 exit 1; \
1148 fi
1149
1150# -- NEW --
1151lkm: @sh_lkm@
1152
1153
1154
1155# For kernel syscall monitoring
1156kern_head: Makefile $(top_srcdir)/include/kern_head.h $(srcsrc)/kern_head.c
1157 @echo "$(COMPILE) -DSYSTEMMAP=\"@systemmap@\" -o kern_head $(srcsrc)/kern_head.c $(LIBS_KVM)"; \
1158 $(COMPILE) -DSYSTEMMAP=\"@systemmap@\" -o kern_head $(srcsrc)/kern_head.c $(LIBS_KVM)
1159
1160sh_ks.h: kern_head
1161 @sleep 1; \
1162 ./kern_head > sh_ks.h
1163
1164sh_ks_xor.h: encode sh_ks.h
1165 @echo 'encode $(XOR_CODE) sh_ks.h'; \
1166 sleep 1; \
1167 ./encode $(XOR_CODE) sh_ks.h; \
1168 mv x_sh_ks.h sh_ks_xor.h
1169
1170# For bignum
1171internal.h: mkhdr
1172 @sleep 1; \
1173 ./mkhdr
1174
1175bignum.o: internal.h
1176
1177# If your compiler can't handle long identifiers (> 6 chars), move the `#' to
1178# the other line.
1179
1180mkhdr: $(srcsrc)/mkhdr.c config.h
1181 @echo "$(COMPILE) -o mkhdr $(srcsrc)/mkhdr.c"; \
1182 sleep 1; \
1183 $(COMPILE) -o mkhdr $(srcsrc)/mkhdr.c
1184
1185# $(COMPILE) -DBIG_SHORT_NAMES -o mkhdr $(srcdir)/mkhdr.c
1186
1187#----------------------------------------------------------
1188#
1189# EXE PACKER rules
1190#
1191#----------------------------------------------------------
1192
1193minilzo.o: $(srcsrc)/minilzo.c $(srcinc)/lzoconf.h $(srcinc)/minilzo.h config.h
1194 @echo "$(COMPILE) -DMINILZO_HAVE_CONFIG_H -o minilzo.o -c $(srcsrc)/minilzo.c"; \
1195 $(COMPILE) -DMINILZO_HAVE_CONFIG_H -o minilzo.o -c $(srcsrc)/minilzo.c
1196
1197exepack_mkdata: $(srcsrc)/exepack_mkdata.c $(srcinc)/lzoconf.h $(srcinc)/minilzo.h minilzo.o
1198 @echo "$(COMPILE) -o exepack_mkdata.o -c $(srcsrc)/exepack_mkdata.c"; \
1199 $(COMPILE) -o exepack_mkdata.o -c $(srcsrc)/exepack_mkdata.c; \
1200 echo "$(LINK) exepack_mkdata.o minilzo.o"; \
1201 $(LINK) exepack_mkdata.o minilzo.o
1202
1203#
1204# prepare the data to be packed
1205#
1206exepack.data: $(SAMHAIN) exepack_mkdata sstrip
1207 @echo "cp ./$(SAMHAIN) ./samhain.pk.data"; \
1208 cp ./$(SAMHAIN) ./samhain.pk.data; \
1209 echo "strip ./samhain.pk.data"; \
1210 strip ./samhain.pk.data > /dev/null 2>&1 || echo "... is already stripped"; \
1211 echo "./sstrip ./samhain.pk.data"; \
1212 ./sstrip ./samhain.pk.data > /dev/null 2>&1 || echo "sstrip returned false"; \
1213 echo "./exepack_mkdata ./samhain.pk.data ./exepack.data 0"; \
1214 ./exepack_mkdata ./samhain.pk.data ./exepack.data 0; \
1215 echo "rm -f ./samhain.pk.data"; \
1216 rm -f ./samhain.pk.data;
1217
1218exepack: $(srcsrc)/exepack.c minilzo.o exepack.data
1219 @echo "$(COMPILE) -o exepack.o -c $(srcsrc)/exepack.c"; \
1220 $(COMPILE) -o exepack.o -c $(srcsrc)/exepack.c; \
1221 echo "$(LINK) exepack.o minilzo.o"; \
1222 $(LINK) exepack.o minilzo.o;
1223
1224#
1225# this program fills the data section with the binary
1226#
1227exepack_fill: $(srcsrc)/exepack_fill.c minilzo.o exepack
1228 @echo "$(COMPILE) -o exepack_fill.o -c $(srcsrc)/exepack_fill.c"; \
1229 $(COMPILE) -o exepack_fill.o -c $(srcsrc)/exepack_fill.c; \
1230 echo "$(LINK) exepack_fill.o minilzo.o"; \
1231 $(LINK) exepack_fill.o minilzo.o
1232
1233samhain.pk: $(SAMHAIN) exepack exepack_fill sstrip
1234 @echo "cp ./$(SAMHAIN) ./samhain.pk.data"; \
1235 cp ./$(SAMHAIN) ./samhain.pk.data; \
1236 echo "strip ./samhain.pk.data"; \
1237 strip ./samhain.pk.data > /dev/null 2>&1 || echo "... is already stripped"; \
1238 echo "./sstrip ./samhain.pk.data"; \
1239 ./sstrip ./samhain.pk.data > /dev/null 2>&1 || echo "sstrip returned false"; \
1240 test -f exepack.out && rm exepack.out; \
1241 echo "./exepack_fill exepack samhain.pk.data exepack.out"; \
1242 ./exepack_fill exepack samhain.pk.data exepack.out; \
1243 chmod +x exepack.out; \
1244 echo "strip exepack.out"; \
1245 strip exepack.out > /dev/null 2>&1 || echo "... is already stripped"; \
1246 ./sstrip exepack.out > /dev/null 2>&1 || echo "sstrip returned false"; \
1247 echo "mv exepack.out samhain.pk"; \
1248 rm -f samhain.pk; mv exepack.out samhain.pk
1249
1250samhain-packed: $(SAMHAIN) samhain_setpwd
1251 @echo "samhain_setpwd samhain new $(CLIENTPASSWD)"; \
1252 samhain_setpwd samhain new $(CLIENTPASSWD); \
1253 echo "rm -f samhain; mv samhain.new samhain"; \
1254 rm -f samhain; mv samhain.new samhain; \
1255 $(MAKE) samhain.pk; \
1256 echo "rm -f samhain; mv samhain.pk samhain"; \
1257 rm -f samhain; mv samhain.pk samhain
1258
1259#----------------------------------------------------------
1260#
1261# DEPLOY rules
1262#
1263#----------------------------------------------------------
1264
1265uninstall-deploy:
1266 rm -rf $(mydatadir)/profiles/source
1267 rm -rf $(mydatadir)/profiles/archpkg
1268 rm -rf $(mydatadir)/profiles/libexec
1269 rm -rf $(mydatadir)/profiles/tmp
1270 rm -rf $(mydatadir)/profiles/private
1271 @if test -f $(sbindir)/deploy.sh; then \
1272 old_deploy=`grep 'VERSION2' $(sbindir)/deploy.sh >/dev/null 2>&1 || echo old`; \
1273 if test x"$$old_deploy" = xold; then \
1274 echo "rm -f $(sbindir)/deploy2.sh"; \
1275 rm -f $(sbindir)/deploy2.sh; \
1276 else \
1277 echo "rm -f $(sbindir)/deploy.sh"; \
1278 rm -f $(sbindir)/deploy.sh; \
1279 fi; \
1280 fi
1281
1282EXECFILES= comCHECKSRC comDOWNLOAD comBUILD comCLEAN comINSTALL \
1283 funcDIALOG funcEXE funcPRINT funcSETUP funcBUILD funcINSTALL \
1284 funcDB comUNINSTALL \
1285 preinstall postinstall initscript
1286
1287# $(mydatadir)/profiles/
1288# |
1289# |
1290# |-- source -------------> (tarballs)
1291# |
1292# |-- configs ------------> (default configs)
1293# |
1294# |-- archpkg
1295# | |
1296# | |-- architecture -> (package, setup script)
1297# |
1298# |-- hosts
1299# | |
1300# | |-- hostname -----> (config)
1301# |
1302# |-- libexec ------------> (scripts)
1303# |
1304# |-- private ------------> (gpg key)
1305# |
1306# |-- tmp
1307#
1308install-deploy: deploy.sh samhain_stealth
1309 @echo "Creating directory tree under $(mydatadir)/profiles/"; \
1310 $(mkinstalldirs) $(sbindir); \
1311 $(mkinstalldirs) $(mydatadir)/profiles/source; \
1312 $(mkinstalldirs) $(mydatadir)/profiles/configs; \
1313 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/debian_i386; \
1314 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/gentoo_i386; \
1315 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/redhat_i386; \
1316 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/linux_i386; \
1317 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/freebsd_i386;\
1318 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/solaris; \
1319 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/aix; \
1320 $(mkinstalldirs) $(mydatadir)/profiles/hosts; \
1321 $(mkinstalldirs) $(mydatadir)/profiles/libexec; \
1322 $(mkinstalldirs) $(mydatadir)/profiles/private; \
1323 $(mkinstalldirs) $(mydatadir)/profiles/tmp; \
1324 if test -f $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz.asc; then \
1325 if test -f $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz; then \
1326 echo "Installing source tarball"; \
1327 $(INSTALL_DATA) $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz.asc \
1328 $(mydatadir)/profiles/source/$(PACKAGE)-$(VERSION).tar.gz.asc; \
1329 $(INSTALL_DATA) $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz \
1330 $(mydatadir)/profiles/source/$(PACKAGE)-$(VERSION).tar.gz; \
1331 fi; \
1332 fi; \
1333 echo "Installing default configs"; \
1334 test -f $(mydatadir)/profiles/configs/freebsd_i386.samhainrc || \
1335 $(INSTALL_DATA) $(srcdir)/samhainrc.freebsd \
1336 $(mydatadir)/profiles/configs/freebsd_i386.samhainrc; \
1337 test -f $(mydatadir)/profiles/configs/debian_i386.samhainrc || \
1338 $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
1339 $(mydatadir)/profiles/configs/debian_i386.samhainrc; \
1340 test -f $(mydatadir)/profiles/configs/gentoo_i386.samhainrc || \
1341 $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
1342 $(mydatadir)/profiles/configs/gentoo_i386.samhainrc; \
1343 test -f $(mydatadir)/profiles/configs/redhat_i386.samhainrc || \
1344 $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
1345 $(mydatadir)/profiles/configs/redhat_i386.samhainrc; \
1346 test -f $(mydatadir)/profiles/configs/linux_i386.samhainrc || \
1347 $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
1348 $(mydatadir)/profiles/configs/linux_i386.samhainrc; \
1349 test -f $(mydatadir)/profiles/configs/solaris.samhainrc || \
1350 $(INSTALL_DATA) $(srcdir)/samhainrc.solaris \
1351 $(mydatadir)/profiles/configs/solaris.samhainrc; \
1352 test -f $(mydatadir)/profiles/configs/aix.samhainrc || \
1353 $(INSTALL_DATA) $(srcdir)/samhainrc.aix5.2.0 \
1354 $(mydatadir)/profiles/configs/aix.samhainrc; \
1355 if test -f $(mydatadir)/profiles/configs/generic.configure; then \
1356 :; \
1357 else \
1358 SH_FQDN_SYSTEM=`uname -n`; \
1359 SH_FQDN_DOMAIN=`grep -i domain /etc/resolv.conf |grep -v "\#" |awk '{print $$2}' |head -1`; \
1360 if test -n "$${SH_FQDN_SYSTEM}" -a -n "$${SH_FQDN_DOMAIN}"; then \
1361 sh_thishost="$${SH_FQDN_SYSTEM}.$${SH_FQDN_DOMAIN}"; \
1362 else \
1363 sh_thishost="FQDN_MISSING"; \
1364 fi; \
1365 outfile=$(mydatadir)/profiles/configs/generic.configure; \
1366 echo "'--enable-network=client'" > $$outfile; \
1367 echo "'--with-logserver=$${sh_thishost}'" >> $$outfile; \
1368 echo "'--with-data-file=REQ_FROM_SERVER/var/lib/samhain/samhain_file'" >> $$outfile; \
1369 echo "'--with-config-file=REQ_FROM_SERVER/etc/samhainrc'" >> $$outfile; \
1370 echo "'--enable-base=@mykeybase@'" >> $$outfile; \
1371 fi; \
1372 $(INSTALL_SHELL) $(srcdir)/mkinstalldirs \
1373 $(mydatadir)/profiles/libexec; \
1374 $(INSTALL_SHELL) $(srcdir)/install-sh \
1375 $(mydatadir)/profiles/libexec; \
1376 for ff in $(EXECFILES); do \
1377 test -f $(srcdir)/dsys/$$ff && $(INSTALL_SHELL) $(srcdir)/dsys/$$ff \
1378 $(mydatadir)/profiles/libexec; \
1379 done; \
1380 $(INSTALL_SHELL) samhain_stealth $(mydatadir)/profiles/libexec; \
1381 test -f $(srcdir)/dsys/0F571F6C.asc && $(INSTALL_DATA) $(srcdir)/dsys/0F571F6C.asc \
1382 $(mydatadir)/profiles/private; \
1383 convert +compress $(srcdir)/stealth_template.jpg stealth_template.ps >/dev/null || \
1384 { 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 "*"; }; \
1385 if test -f stealth_template.ps; then \
1386 if test -f $(mydatadir)/profiles/private/stealth_template.ps; then \
1387 :; \
1388 else \
1389 $(INSTALL_DATA) stealth_template.ps $(mydatadir)/profiles/private; \
1390 fi; \
1391 fi; \
1392 if test -f $(sbindir)/deploy.sh; then \
1393 old_deploy=`grep 'VERSION2' $(sbindir)/deploy.sh >/dev/null 2>&1 || echo old`; \
1394 if test x"$$old_deploy" = xold; then \
1395 echo "*"; echo "* Version 1 of deploy.sh found"; echo "*"; \
1396 echo "* Installing $(sbindir)/deploy2.sh"; echo "*"; \
1397 $(INSTALL_SHELL) deploy.sh $(sbindir)/deploy2.sh; \
1398 else \
1399 echo "Installing $(sbindir)/deploy.sh"; \
1400 $(INSTALL_SHELL) deploy.sh $(sbindir)/deploy.sh; \
1401 fi; \
1402 else \
1403 echo "Installing $(sbindir)/deploy.sh"; \
1404 $(INSTALL_SHELL) deploy.sh $(sbindir)/deploy.sh; \
1405 fi
1406
1407
1408#----------------------------------------------------------
1409#
1410# DISTRIBUTION rules
1411#
1412#----------------------------------------------------------
1413
1414distdir = $(PACKAGE)-$(VERSION)
1415top_distdir = $(distdir)
1416
1417# This target untars the dist file and tries a VPATH configuration. Then
1418# it guarantees that the distribution is self-contained by making another
1419# tarfile.
1420
1421#
1422# 1) make distribution tarfile
1423# 2) unpack the tarfile into distdir
1424# 3) create build and install directories
1425# 4) do the build in the build dir, with sources from distdir
1426# 5) check (there are no subdirs, thus does nothing)
1427# 6) install
1428# 7) installcheck (equal to check, does nothing)
1429#
1430distcheck: dist
1431 -rm -rf $(distdir)
1432 GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
1433 mkdir $(distdir)/=build
1434 mkdir $(distdir)/=inst
1435 dc_install_base=`cd $(distdir)/=inst && pwd`; \
1436 cd $(distdir)/=build \
1437 && ../configure --srcdir=.. --prefix=$$dc_install_base \
1438 && $(MAKE) \
1439 && $(MAKE) install
1440 -rm -rf $(distdir)
1441 -rm -f $(distdir).tar.gz.asc
1442 @gpg -a --detach-sign $(distdir).tar.gz; \
1443 $(TAR) chof $(distdir).tar $(distdir).tar.gz $(distdir).tar.gz.asc; \
1444 rm -f $(distdir).tar.gz; \
1445 rm -f $(distdir).tar.gz.asc; \
1446 gzip --best $(distdir).tar
1447 mv $(distdir).tar.gz $(PACKAGE)_signed-$(VERSION).tar.gz
1448 @echo "========================"; \
1449 echo "$(PACKAGE)_signed-$(VERSION).tar.gz is ready for distribution"; \
1450 echo "========================"
1451
1452#
1453# create a tarfile for the distibution
1454#
1455distrpm: distdirrpm
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
1463dist: distdir
1464 -chmod -R a+r $(distdir)
1465 -rm -rf $(distdir).tar.gz
1466 -rm -rf $(distdir).tar
1467 $(TAR) chof $(distdir).tar $(distdir)
1468 gzip -c --best $(distdir).tar > $(distdir).tar.gz
1469 -rm -rf $(distdir)
1470
1471#
1472# create a tarfile for the distibution
1473#
1474dist-sign: distdir
1475 -rm -f $(distdir)/scripts/samhain.ebuild
1476 -rm -f $(distdir)/scripts/samhain.ebuild-light
1477 -chmod -R a+r $(distdir)
1478 -rm -rf $(distdir).tar.gz
1479 -rm -rf $(distdir).tar
1480 $(TAR) chof $(distdir).tar $(distdir)
1481 gzip --best $(distdir).tar
1482 -rm -rf $(distdir)
1483 -rm -f $(distdir).tar.gz.asc
1484 gpg -a --detach-sign $(distdir).tar.gz
1485 $(TAR) chof $(distdir).tar $(distdir).tar.gz $(distdir).tar.gz.asc
1486 -rm -f $(distdir).tar.gz
1487 -rm -f $(distdir).tar.gz.asc
1488 gzip --best $(distdir).tar
1489 mv $(distdir).tar.gz $(PACKAGE)_signed-$(VERSION).tar.gz
1490
1491
1492#
1493# same as dist
1494#
1495dist-all: distdir
1496 -chmod -R a+r $(distdir)
1497 GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
1498 -rm -rf $(distdir)
1499
1500#
1501# create distribution directory and copy files into it
1502#
1503INITFILES=samhain.startIRIX samhain.startFreeBSD samhain.startSolaris \
1504samhain.startLSB samhain.startGentoo samhain.startLinux samhain.startHPUX
1505
1506SCRIPTFILES=redhat_i386.client.spec check_samhain.pl samhainadmin.pl
1507
1508distdir: distfilecheck
1509 -rm -f $(top_srcdir)/init/*~
1510 -rm -f $(top_srcdir)/dsys/*~
1511 -rm -f $(top_srcdir)/docs/*~
1512 -rm -f $(top_srcdir)/include/*~
1513 -rm -f $(top_srcdir)/src/*~
1514 -rm -f $(top_srcdir)/test/*~
1515 -rm -f $(top_srcdir)/scripts/*~
1516 (cd $(top_srcdir)/init && rm -f $(INITFILES))
1517 (cd $(top_srcdir)/scripts && rm -f $(SCRIPTFILES))
1518 -rm -rf $(distdir)
1519 mkdir $(distdir)
1520 -chmod 777 $(distdir)
1521 @for file in $(DISTFILES); do \
1522 d=$(top_srcdir); \
1523 if test -f $$d/$$file || test -d $$d/$$file; then \
1524 cp -pr $$d/$$file $(distdir)/$$file; \
1525 fi; \
1526 done; \
1527 cp scripts/samhain.spec $(distdir)/samhain.spec; \
1528 rm -f $(distdir)/scripts/*.spec
1529
1530#
1531# as distdir, but don't copy spec file from scripts
1532#
1533distdirrpm: distfilecheck
1534 -rm -rf $(distdir)
1535 mkdir $(distdir)
1536 -chmod 777 $(distdir)
1537 @if test -f ./samhain.spec; then \
1538 :; \
1539 else \
1540 echo "Error: ./samhain.spec not found, please run configure"; \
1541 exit 1; \
1542 fi
1543 @cp -p samhain.spec $(distdir)/samhain.spec; \
1544 for file in $(DISTFILES); do \
1545 d=$(top_srcdir); \
1546 if test -f $$d/$$file || test -d $$d/$$file; then \
1547 if test x"$$file" = "xsamhain.spec"; then \
1548 :; \
1549 else \
1550 cp -pr $$d/$$file $(distdir)/$$file; \
1551 fi; \
1552 fi; \
1553 done; \
1554 rm -f $(distdir)/scripts/*.spec
1555
1556
1557distfilecheck: $(top_srcdir)/config.h.in $(top_srcdir)/depend.sum
1558 @for file in $(DISTFILES); do \
1559 d=$(top_srcdir); \
1560 if test -f $$d/$$file || test -d $$d/$$file; then \
1561 : \
1562 else \
1563 echo "File not found: $$d/$$file"; \
1564 fi; \
1565 done
1566 @for file in $(SOURCES); do \
1567 if test -f $$file; then \
1568 : \
1569 else \
1570 echo "File not found: $$file"; \
1571 fi; \
1572 done
1573
1574
1575# DO NOT DELETE THIS LINE
1576
1577
1578samhain.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
1579sh_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
1580sh_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
1581sh_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
1582sh_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
1583sh_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
1584sh_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
1585sh_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
1586sh_tiger1.o: $(srcsrc)/sh_tiger1.c Makefile config_xor.h
1587sh_tiger2.o: $(srcsrc)/sh_tiger2.c Makefile config_xor.h
1588sh_tiger1_64.o: $(srcsrc)/sh_tiger1_64.c Makefile config_xor.h
1589sh_tiger2_64.o: $(srcsrc)/sh_tiger2_64.c Makefile config_xor.h
1590sh_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
1591sh_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
1592sh_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
1593sh_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
1594sh_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
1595sh_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
1596sh_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
1597sh_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
1598sh_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
1599sh_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
1600sh_fifo.o: $(srcsrc)/sh_fifo.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_unix.h
1601sh_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
1602sh_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
1603sh_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
1604sh_cat.o: $(srcsrc)/sh_cat.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_cat.h
1605sh_calls.o: $(srcsrc)/sh_calls.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_calls.h
1606sh_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
1607sh_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
1608sh_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
1609sh_err_console.o: $(srcsrc)/sh_err_console.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h
1610sh_err_syslog.o: $(srcsrc)/sh_err_syslog.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h
1611sh_schedule.o: $(srcsrc)/sh_schedule.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_schedule.h
1612bignum.o: $(srcsrc)/bignum.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/bignum.h
1613mkhdr.o: $(srcsrc)/mkhdr.c Makefile config.h
1614samhain_setpwd.o: $(srcsrc)/samhain_setpwd.c Makefile config_xor.h
1615samhain_stealth.o: $(srcsrc)/samhain_stealth.c Makefile config_xor.h
1616encode.o: $(srcsrc)/encode.c Makefile
1617sstrip.o: $(srcsrc)/sstrip.c Makefile
1618trustfile.o: $(srcsrc)/trustfile.c Makefile config_xor.h $(srcinc)/sh_calls.h $(srcinc)/slib.h $(srcinc)/sh_static.h
1619exepack.o: $(srcsrc)/exepack.c Makefile config.h $(srcinc)/minilzo.h $(srcinc)/exepack.data
1620exepack_fill.o: $(srcsrc)/exepack_fill.c Makefile config.h config.h $(srcinc)/minilzo.h
1621exepack_mkdata.o: $(srcsrc)/exepack_mkdata.c Makefile config.h $(srcinc)/minilzo.h
1622minilzo.o: $(srcsrc)/minilzo.c Makefile $(srcinc)/minilzo.h
1623slib.o: $(srcsrc)/slib.c Makefile config_xor.h $(srcinc)/slib.h $(srcinc)/sh_calls.h $(srcinc)/sh_static.h
1624rijndael-alg-fst.o: $(srcsrc)/rijndael-alg-fst.c Makefile config_xor.h $(srcinc)/rijndael-alg-fst.h $(srcinc)/rijndael-boxes-fst.h
1625rijndael-api-fst.o: $(srcsrc)/rijndael-api-fst.c Makefile config_xor.h $(srcinc)/rijndael-alg-fst.h $(srcinc)/rijndael-api-fst.h
1626zAVLTree.o: $(srcsrc)/zAVLTree.c Makefile $(srcinc)/zAVLTree.h
1627sh_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
1628sh_ignore.o: $(srcsrc)/sh_ignore.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_error.h
1629yulectl.o: $(srcsrc)/yulectl.c Makefile config_xor.h
1630sh_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
1631sh_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
1632sh_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
1633kern_head.o: $(srcsrc)/kern_head.c Makefile config.h $(srcinc)/kern_head.h $(srcinc)/kern_head.h
1634sh_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
1635sh_static.o: $(srcsrc)/sh_static.c Makefile config_xor.h
1636sh_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
1637sh_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.