source: trunk/Makefile.in@ 23

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

Fixed makefile.

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_0.html.tar >> debian/docs; \
796 echo $(top_srcdir)/docs/MANUAL-2_0.ps >> debian/docs; \
797 echo $(top_srcdir)/docs/README.gcc_bug >> debian/docs; \
798 echo $(top_srcdir)/docs/README.LZO >> debian/docs; \
799 echo $(top_srcdir)/docs/README.sstrip >> debian/docs; \
800 echo $(top_srcdir)/docs/README.UPGRADE >> debian/docs; \
801 echo $(top_srcdir)/docs/README.win2K >> debian/docs; \
802 echo $(top_srcdir)/docs/TODO >> debian/docs; \
803 $(MAKE) deb-run
804
805deb-run:
806 @maintainer=`gpg --list-secret-keys | grep 'sec ' | cut -d" " -f 5-`;\
807 if test "x$$maintainer" = x; then \
808 maintainer="Nobody Nowhere <nobody@example.com>"; \
809 fi; \
810 echo "$(PACKAGE) ($(VERSION)-1) stable; urgency=low" > debian/changelog; \
811 echo >> debian/changelog; \
812 echo " * Initial release." >> debian/changelog; \
813 echo >> debian/changelog; \
814 echo " -- $$maintainer `date -R`" >> debian/changelog; \
815 echo >> debian/changelog; \
816 echo "Local variables:" >> debian/changelog; \
817 echo "mode: debian-changelog" >> debian/changelog; \
818 echo "End:" >> debian/changelog; \
819 cp $(top_srcdir)/COPYING debian/copyright; \
820 touch debian/README.debian; \
821 echo "Document: @install_name@-manual" > debian/@install_name@.doc-base; \
822 echo "Title: @install_name@ Manual" >> debian/@install_name@.doc-base; \
823 echo "Author: Rainer Wichmann" >> debian/@install_name@.doc-base; \
824 echo "Abstract: This manual describes what @install_name@ is" >> debian/@install_name@.doc-base; \
825 echo " and how it can be used to check the file integrity of your" >> debian/@install_name@.doc-base; \
826 echo " server." >> debian/@install_name@.doc-base; \
827 echo "Section: admin" >> debian/@install_name@.doc-base; \
828 echo >> debian/@install_name@.doc-base; \
829 echo >> debian/@install_name@.doc-base; \
830 echo "Format: Postscript" >> debian/@install_name@.doc-base; \
831 echo "Files: /usr/share/doc/@install_name@/manual.ps.gz" >> debian/@install_name@.doc-base; \
832 echo >> debian/@install_name@.doc-base; \
833 echo "Format: HTML" >> debian/@install_name@.doc-base; \
834 echo "Index: /usr/share/doc/@install_name@/manual.html/index.html" >> debian/@install_name@.doc-base; \
835 echo "Files: /usr/share/doc/@install_name@/manual.html/*.html" >> debian/@install_name@.doc-base; \
836 echo $(sysconfdir)/@install_name@rc > debian/conffiles; \
837 echo /etc/init.d/@install_name@ >> debian/conffiles; \
838 cp init/samhain.startLinux debian/@install_name@.init; \
839 echo "Source: samhain" > debian/control; \
840 echo "Section: admin" >> debian/control; \
841 echo "Priority: optional" >> debian/control; \
842 echo "Maintainer: $$maintainer" >> debian/control; \
843 echo "Standards-Version: 3.2.1" >> debian/control; \
844 echo >> debian/control; \
845 echo "Package: @install_name@" >> debian/control; \
846 echo "Architecture: any" >> debian/control; \
847 echo "Depends: \$${shlibs:Depends}" >> debian/control; \
848 echo "Description: File integrity checker" >> debian/control; \
849 echo " A file integrity checker" >> debian/control; \
850 echo "running debuild -us -uc"; \
851 debuild -us -uc; \
852 DEBFILE=`find ../ -follow -maxdepth 1 -cnewer ./debian/control 2>/dev/null | grep '@install_name@_$(VERSION)' | grep '\.deb'`; \
853 if test x"$$DEBFILE" = x; then \
854 echo "Error ... cannot find package file"; \
855 exit 1; \
856 else \
857 echo "Package $$DEBFILE built."; \
858 cp $$DEBFILE ./$(PACKAGE)-$(VERSION).deb; \
859 fi; \
860 echo
861
862#
863# Check samhain.spec
864#
865rpmspec-full:
866 @grep 'install-light' samhain.spec >/dev/null 2>&1; \
867 if test x"$$?" = "x0"; then \
868 echo "Your samhain.spec is from rpm-light. Please run"; \
869 echo " .config.status to re-create the original samhain.spec"; \
870 exit 1; \
871 fi
872
873# when editing the spec file, make an additional blank after 'make'
874# to avoid that it matches on a second processing
875#
876rpmspec-light: samhain.spec
877 @echo "Stripping docs from samhain.spec"; \
878 cat samhain.spec | sed 's,make DESTDIR=$${RPM_BUILD_ROOT} install,make DESTDIR=$${RPM_BUILD_ROOT} install-light,' | sed s,shkeep=yes,shkeep=no, | sed s,%doc.*,, | sed s,%attr.*,, > samhain.spec-light; \
879 mv samhain.spec-light samhain.spec
880
881rpm-light: rpmspec-light distrpm
882 rpmbuild -ta ./$(PACKAGE)-$(VERSION).tar.gz;
883 @echo "Searching the RPM package ..."; \
884 RPMFILE=`find /usr/src -follow -maxdepth 4 -cnewer ./samhain.spec 2>/dev/null | grep '@install_name@-$(VERSION)' | grep '\.rpm' | grep -v '\.src\.'`; \
885 echo; \
886 if test x"$$RPMFILE" = x; then \
887 echo "Error ... cannot find package file"; \
888 exit 1; \
889 else \
890 echo "Package $$RPMFILE built."; \
891 cp $$RPMFILE ./$(PACKAGE)-$(VERSION).rpm; \
892 fi; \
893 echo
894
895rpm: rpmspec-full distrpm
896 rpmbuild -ta ./$(PACKAGE)-$(VERSION).tar.gz;
897 @echo "Searching the RPM package ..."; \
898 RPMFILE=`find /usr/src -follow -maxdepth 4 -cnewer ./samhain.spec 2>/dev/null | grep '@install_name@-$(VERSION)' | grep '\.rpm' | grep -v '\.src\.'`; \
899 echo; \
900 if test x"$$RPMFILE" = x; then \
901 echo "Error ... cannot find package file"; \
902 exit 1; \
903 else \
904 echo "Package $$RPMFILE built."; \
905 cp $$RPMFILE ./$(PACKAGE)-$(VERSION).rpm; \
906 fi; \
907 echo
908
909srpm-dist: rpmspec-full samhain.spec
910 @cat samhain.spec | \
911 sed s%\-\-with\-base=.*\,[0123456789]*%% | \
912 sed s%\'\'%% > samhain.spec.m; \
913 mv samhain.spec.m samhain.spec
914 $(MAKE) distrpm
915 rpmbuild -ts ./$(PACKAGE)-$(VERSION).tar.gz
916
917
918srpm: rpmspec-full distrpm
919 rpmbuild -ts ./$(PACKAGE)-$(VERSION).tar.gz
920
921solaris-pkg-light: all
922 @STAGE=/tmp/samhain-pkg-staging; \
923 mkdir $$STAGE; \
924 if test x"$$?" != x0; then \
925 echo "ERROR ... mkdir $$STAGE failed"; \
926 exit 1; \
927 fi; \
928 make DESTDIR=$$STAGE install-light;
929 $(MAKE) solaris-pkg-finish
930
931solaris-pkg: all
932 @STAGE=/tmp/samhain-pkg-staging; \
933 mkdir $$STAGE; \
934 if test x"$$?" != x0; then \
935 echo "ERROR ... mkdir $$STAGE failed"; \
936 exit 1; \
937 fi; \
938 make DESTDIR=$$STAGE install;
939 $(MAKE) solaris-pkg-finish
940
941solaris-pkg-finish:
942 @STAGE=/tmp/samhain-pkg-staging; \
943 $(mkinstalldirs) $$STAGE/etc/init.d; \
944 $(INSTALL_SHELL) init/samhain.startSolaris $$STAGE/etc/init.d/@install_name@; \
945 (echo 'i pkginfo'; pkgproto $$STAGE=/ ) >prototype; \
946 user=`id | sed s,uid=[0123456789]*\(,, | sed s,\).*,,`; \
947 group=`id | sed s,.*gid=[0123456789]*\(,, | sed s,\).*,,`; \
948 cat prototype | grep -v 'none / ' | grep -v 'none /usr ' | \
949 grep -v 'none /usr/local ' | grep -v 'none /usr/bin ' | \
950 grep -v 'none /usr/local/bin ' | grep -v 'none /usr/local/sbin ' | \
951 grep -v 'none /var ' | grep -v 'none /usr/sbin ' | \
952 sed s,$$user\ $$group,root\ sys,g > prototype.1; \
953 rm -f prototype && mv prototype.1 prototype; \
954 echo "d none /var ? ? ?" >> prototype; \
955 echo "d none /etc/rc0.d ? ? ?" >> prototype; \
956 echo "d none /etc/rc1.d ? ? ?" >> prototype; \
957 echo "d none /etc/rc3.d ? ? ?" >> prototype; \
958 echo "l none /etc/rc3.d/S99@install_name@=/etc/init.d/@install_name@" >> prototype; \
959 echo "l none /etc/rc0.d/K10@install_name@=/etc/init.d/@install_name@" >> prototype; \
960 echo "l none /etc/rc1.d/K10@install_name@=/etc/init.d/@install_name@" >> prototype; \
961 ARCH=`uname -p`; \
962 PSTAMP=`date '+%cc%yy%mm%dd%HH%MM%SS'`; \
963 echo "PKG=@install_name@" > pkginfo; \
964 echo "NAME=file integrity check" >> pkginfo; \
965 echo "VERSION=$(VERSION)" >> pkginfo; \
966 echo "CATEGORY=system" >> pkginfo; \
967 echo "CLASSES=none" >> pkginfo; \
968 echo "VENDOR=http://la-samhna.de/samhain" >> pkginfo; \
969 echo "EMAIL=support@la-samhna.de" >> pkginfo; \
970 echo "ARCH=$$ARCH" >> pkginfo; \
971 echo "PSTAMP=$$PSTAMP" >> pkginfo; \
972 pkgmk -o; \
973 pkgtrans -s /var/spool/pkg /tmp/samhain-pkg-staging/@install_name@.pkg @install_name@; \
974 if test -f /tmp/samhain-pkg-staging/@install_name@.pkg; then \
975 echo; \
976 cp /tmp/samhain-pkg-staging/@install_name@.pkg $(PACKAGE)-$(VERSION).pkg; \
977 echo "Package @install_name@.pkg is ready for installation"; \
978 echo; \
979 rm -r /var/spool/pkg/@install_name@ /tmp/samhain-pkg-staging; \
980 else \
981 echo; \
982 echo "Error ... cannot find /tmp/samhain-pkg-staging/@install_name@.pkg."; \
983 echo "Keeping /var/spool/pkg/@install_name@ /tmp/samhain-pkg-staging"; \
984 echo; \
985 exit 1; \
986 fi
987
988depot-prep: all
989 STAGE=/tmp/samhain-pkg-staging; \
990 mkdir $$STAGE; \
991 if test x"$$?" != x0; then \
992 echo "ERROR ... mkdir $$STAGE failed"; \
993 exit 1; \
994 fi; \
995 make DESTDIR=$$STAGE install; \
996 make DESTDIR=$$STAGE install-boot; \
997 cp hp_ux.psf $$STAGE; \
998 mkdir $$STAGE/sc; \
999 echo "#!/sbin/sh" > $$STAGE/sc/configure; \
1000 echo "PATH=\$$SW_PATH; export PATH" >> $$STAGE/sc/configure; \
1001 echo "chmod 555 /sbin/init.d/samhain; chown bin:bin /sbin/init.d/@install_name@; (cd /sbin; ln -f -s /sbin/init.d/@install_name@ rc2.d/S900@install_name@; ln -f -s /sbin/init.d/@install_name@ rc1.d/K100@install_name@; )" >> $$STAGE/sc/configure; \
1002 chmod +x $$STAGE/sc/configure; \
1003 echo "#!/sbin/sh" > $$STAGE/sc/unconfigure; \
1004 echo "PATH=\$$SW_PATH; export PATH" >> $$STAGE/sc/unconfigure; \
1005 echo "rm -f /sbin/rc2.d/S900@install_name@; rm -f /sbin/rc1.d/K100@install_name@" >> $$STAGE/sc/unconfigure; \
1006 chmod +x $$STAGE/sc/unconfigure; \
1007 echo "#!/sbin/sh" > $$STAGE/sc/preremove; \
1008 echo "PATH=\$$SW_PATH; export PATH" >> $$STAGE/sc/preremove; \
1009 echo "/sbin/init.d/@install_name@ stop" >> $$STAGE/sc/preremove; \
1010 echo "exit 0" >> $$STAGE/sc/preremove; \
1011 chmod +x $$STAGE/sc/preremove;
1012
1013depot: depot-prep
1014 (cd /tmp/samhain-pkg-staging && /usr/sbin/swpackage -v -s ./hp_ux.psf -x media_type=tape @ $(PACKAGE)-$(VERSION).depot)
1015 cp /tmp/samhain-pkg-staging/$(PACKAGE)-$(VERSION).depot .
1016 rm -rf /tmp/samhain-pkg-staging
1017
1018depot-light: depot
1019
1020#---------------------------------------------------------------
1021
1022
1023trustfile: $(srcsrc)/trustfile.c config.h
1024 $(COMPILE) $(VFLAG) -DSH_IDENT=\"@myident@\" -DTRUST_MAIN -DSL_ALWAYS_TRUSTED=@mytrust@ -o trustfile $(srcsrc)/trustfile.c
1025
1026sh_MK.h: config.h
1027 @echo "creating sh_MK.h"; \
1028 echo "#ifndef SH_MK_H" > sh_MK.h; \
1029 echo "#define SH_MK_H" >> sh_MK.h; \
1030 $(top_srcdir)/c_bits.sh @my_key_1@ MKB >> sh_MK.h; \
1031 $(top_srcdir)/c_bits.sh @my_key_2@ MKA >> sh_MK.h; \
1032 $(top_srcdir)/c_bits.sh @my_key_3@ MKC >> sh_MK.h; \
1033 $(top_srcdir)/c_bits.sh @my_key_4@ MKD >> sh_MK.h; \
1034 echo "#endif" >> sh_MK.h
1035
1036
1037sstrip: $(srcsrc)/sstrip.c Makefile
1038 $(COMPILE) -o sstrip $(srcsrc)/sstrip.c
1039
1040encode: $(srcsrc)/encode.c Makefile
1041 $(COMPILE) -o encode $(srcsrc)/encode.c
1042
1043config_xor.h: config.h encode
1044 @echo 'encode $(XOR_CODE) config.h'; \
1045 sleep 1; \
1046 ./encode $(XOR_CODE) config.h; \
1047 mv x_config.h config_xor.h
1048
1049#.c.o:
1050# @echo "./encode $(XOR_CODE) $< --> x_`echo $< |sed 's%.*/%%'`"; \
1051# ./encode $(XOR_CODE) $<; \
1052# echo "$(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $< |sed 's%.*/%%'`"; \
1053# $(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $< |sed 's%.*/%%'`; \
1054# rm x_`echo $< |sed 's%.*/%%'`
1055
1056$(OBJECTS):
1057 @echo "./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c --> x_`echo $@ |sed 's%\.o$$%%'`.c"; \
1058 ./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c; \
1059 echo "$(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c"; \
1060 $(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c; \
1061 rm x_`echo $@ |sed 's%\.o$$%%'`.c
1062
1063sh_tiger_i.o: $(srcsrc)/$(TIGER_SRC) Makefile config_xor.h
1064 @echo "$(COMPILE) $(VFLAG) -o sh_tiger_i.o -c $(srcsrc)/$(TIGER_SRC)";\
1065 $(COMPILE) $(VFLAG) -o sh_tiger_i.o -c $(srcsrc)/$(TIGER_SRC);
1066
1067samhain_setpwd: encode config_xor.h $(srcsrc)/samhain_setpwd.c
1068 @echo '$(COMPILE) -o samhain_setpwd $(srcsrc)/samhain_setpwd.c'; \
1069 ./encode $(XOR_CODE) $(srcsrc)/samhain_setpwd.c; \
1070 $(COMPILE) -o samhain_setpwd x_samhain_setpwd.c; \
1071 rm x_samhain_setpwd.c
1072
1073samhain_stealth: encode config_xor.h $(srcsrc)/samhain_stealth.c
1074 @echo '$(COMPILE) -o samhain_stealth $(srcsrc)/samhain_stealth.c'; \
1075 ./encode $(XOR_CODE) $(srcsrc)/samhain_stealth.c; \
1076 $(COMPILE) -o samhain_stealth x_samhain_stealth.c; \
1077 rm x_samhain_stealth.c
1078
1079yulectl: encode config_xor.h $(srcsrc)/yulectl.c
1080 @echo '$(COMPILE) -o yulectl $(srcsrc)/yulectl.c $(LIBS_SOCK)'; \
1081 ./encode $(XOR_CODE) $(srcsrc)/yulectl.c; \
1082 $(COMPILE) -o yulectl x_yulectl.c $(LIBS_SOCK); \
1083 rm x_yulectl.c
1084
1085$(SAMHAIN): internal.h $(OBJECTS) sh_tiger_i.o
1086 @-rm -f $(SAMHAIN)
1087 @echo "$(LINK) sh_tiger_i.o $(OBJECTS) $(LIBS_TRY)"; \
1088 $(LINK) sh_tiger_i.o $(OBJECTS) $(LIBS_TRY)
1089
1090
1091CUTEST_SOURCES = $(srcsrc)/cutest_sh_tools.c \
1092 $(srcsrc)/cutest_sh_utils.c \
1093 $(srcsrc)/cutest_slib.c \
1094 $(srcsrc)/cutest_zAVLTree.c \
1095 $(srcsrc)/cutest_sh_tiger0.c
1096
1097CUTEST_OBJECTS = cutest_sh_tools.o \
1098 cutest_sh_utils.o \
1099 cutest_slib.o \
1100 cutest_zAVLTree.o \
1101 cutest_sh_tiger0.o
1102
1103$(CUTEST_OBJECTS): $(CUTEST_SOURCES)
1104 @echo "./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c --> x_`echo $@ |sed 's%\.o$$%%'`.c"; \
1105 ./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c; \
1106 echo "$(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c"; \
1107 $(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c; \
1108 rm x_`echo $@ |sed 's%\.o$$%%'`.c
1109
1110cutest: internal.h $(OBJECTS) $(CUTEST_OBJECTS) sh_tiger_i.o $(srcsrc)/make-tests.sh
1111 cd $(srcsrc)/ && ./make-tests.sh >CuTestMain.c
1112 @$(COMPILE) -o CuTestMain.o -c $(srcsrc)/CuTestMain.c; \
1113 $(COMPILE) -o CuTest.o -c $(srcsrc)/CuTest.c; \
1114 rm -f samhain.o; \
1115 ./encode $(XOR_CODE) $(srcsrc)/samhain.c; \
1116 $(COMPILE) $(VFLAG) -DSH_CUTEST=1 -o samhain.o -c x_samhain.c; \
1117 rm x_samhain.c; \
1118 $(LINK) sh_tiger_i.o $(CUTEST_OBJECTS) CuTestMain.o CuTest.o $(OBJECTS) $(LIBS_TRY); \
1119 ./cutest
1120
1121samhain_hide.o: $(srcsrc)/samhain_hide.c samhain_erase.o
1122 gcc @lkm_inc@ -I. -Wall -O2 -c $(srcsrc)/samhain_hide.c
1123
1124samhain_erase.o: $(srcsrc)/samhain_erase.c
1125 gcc @lkm_inc@ -I. -Wall -O2 -c $(srcsrc)/samhain_erase.c
1126
1127# -- NEW --
1128samhain_hide.ko: $(srcsrc)/samhain_hide.c
1129 @test -d m_comp || mkdir m_comp; \
1130 echo "KVERSION := \$$(shell uname -r)" > m_comp/Makefile;\
1131 echo "KSOURCE ?= /lib/modules/\$$(KVERSION)/build" >> m_comp/Makefile;\
1132 echo "obj-m := samhain_hide.o" >> m_comp/Makefile;\
1133 echo ".PHONY: modules install clean modules_add" >> m_comp/Makefile;\
1134 echo "install : modules_add" >> m_comp/Makefile;\
1135 echo "modules modules_install clean:" >> m_comp/Makefile;\
1136 echo "T\$$(MAKE) -C \$$(KSOURCE) \$$@ SUBDIRS=\$$(CURDIR) KBUILD_VERBOSE=2" | tr T '\t' >> m_comp/Makefile;\
1137 cp config.h m_comp/; \
1138 cp $(srcsrc)/samhain_hide.c m_comp/; \
1139 cd m_comp && make modules
1140 @if test -f m_comp/samhain_hide.ko; then \
1141 cp -p m_comp/samhain_hide.ko samhain_hide.ko; \
1142 rm -rf m_comp/; \
1143 else \
1144 echo "Kernel module samhain_hide.ko not build"; \
1145 exit 1; \
1146 fi
1147
1148# -- NEW --
1149lkm: @sh_lkm@
1150
1151
1152
1153# For kernel syscall monitoring
1154kern_head: Makefile $(top_srcdir)/include/kern_head.h $(srcsrc)/kern_head.c
1155 @echo "$(COMPILE) -DSYSTEMMAP=\"@systemmap@\" -o kern_head $(srcsrc)/kern_head.c $(LIBS_KVM)"; \
1156 $(COMPILE) -DSYSTEMMAP=\"@systemmap@\" -o kern_head $(srcsrc)/kern_head.c $(LIBS_KVM)
1157
1158sh_ks.h: kern_head
1159 @sleep 1; \
1160 ./kern_head > sh_ks.h
1161
1162sh_ks_xor.h: encode sh_ks.h
1163 @echo 'encode $(XOR_CODE) sh_ks.h'; \
1164 sleep 1; \
1165 ./encode $(XOR_CODE) sh_ks.h; \
1166 mv x_sh_ks.h sh_ks_xor.h
1167
1168# For bignum
1169internal.h: mkhdr
1170 @sleep 1; \
1171 ./mkhdr
1172
1173bignum.o: internal.h
1174
1175# If your compiler can't handle long identifiers (> 6 chars), move the `#' to
1176# the other line.
1177
1178mkhdr: $(srcsrc)/mkhdr.c config.h
1179 @echo "$(COMPILE) -o mkhdr $(srcsrc)/mkhdr.c"; \
1180 sleep 1; \
1181 $(COMPILE) -o mkhdr $(srcsrc)/mkhdr.c
1182
1183# $(COMPILE) -DBIG_SHORT_NAMES -o mkhdr $(srcdir)/mkhdr.c
1184
1185#----------------------------------------------------------
1186#
1187# EXE PACKER rules
1188#
1189#----------------------------------------------------------
1190
1191minilzo.o: $(srcsrc)/minilzo.c $(srcinc)/lzoconf.h $(srcinc)/minilzo.h config.h
1192 @echo "$(COMPILE) -DMINILZO_HAVE_CONFIG_H -o minilzo.o -c $(srcsrc)/minilzo.c"; \
1193 $(COMPILE) -DMINILZO_HAVE_CONFIG_H -o minilzo.o -c $(srcsrc)/minilzo.c
1194
1195exepack_mkdata: $(srcsrc)/exepack_mkdata.c $(srcinc)/lzoconf.h $(srcinc)/minilzo.h minilzo.o
1196 @echo "$(COMPILE) -o exepack_mkdata.o -c $(srcsrc)/exepack_mkdata.c"; \
1197 $(COMPILE) -o exepack_mkdata.o -c $(srcsrc)/exepack_mkdata.c; \
1198 echo "$(LINK) exepack_mkdata.o minilzo.o"; \
1199 $(LINK) exepack_mkdata.o minilzo.o
1200
1201#
1202# prepare the data to be packed
1203#
1204exepack.data: $(SAMHAIN) exepack_mkdata sstrip
1205 @echo "cp ./$(SAMHAIN) ./samhain.pk.data"; \
1206 cp ./$(SAMHAIN) ./samhain.pk.data; \
1207 echo "strip ./samhain.pk.data"; \
1208 strip ./samhain.pk.data > /dev/null 2>&1 || echo "... is already stripped"; \
1209 echo "./sstrip ./samhain.pk.data"; \
1210 ./sstrip ./samhain.pk.data > /dev/null 2>&1 || echo "sstrip returned false"; \
1211 echo "./exepack_mkdata ./samhain.pk.data ./exepack.data 0"; \
1212 ./exepack_mkdata ./samhain.pk.data ./exepack.data 0; \
1213 echo "rm -f ./samhain.pk.data"; \
1214 rm -f ./samhain.pk.data;
1215
1216exepack: $(srcsrc)/exepack.c minilzo.o exepack.data
1217 @echo "$(COMPILE) -o exepack.o -c $(srcsrc)/exepack.c"; \
1218 $(COMPILE) -o exepack.o -c $(srcsrc)/exepack.c; \
1219 echo "$(LINK) exepack.o minilzo.o"; \
1220 $(LINK) exepack.o minilzo.o;
1221
1222#
1223# this program fills the data section with the binary
1224#
1225exepack_fill: $(srcsrc)/exepack_fill.c minilzo.o exepack
1226 @echo "$(COMPILE) -o exepack_fill.o -c $(srcsrc)/exepack_fill.c"; \
1227 $(COMPILE) -o exepack_fill.o -c $(srcsrc)/exepack_fill.c; \
1228 echo "$(LINK) exepack_fill.o minilzo.o"; \
1229 $(LINK) exepack_fill.o minilzo.o
1230
1231samhain.pk: $(SAMHAIN) exepack exepack_fill sstrip
1232 @echo "cp ./$(SAMHAIN) ./samhain.pk.data"; \
1233 cp ./$(SAMHAIN) ./samhain.pk.data; \
1234 echo "strip ./samhain.pk.data"; \
1235 strip ./samhain.pk.data > /dev/null 2>&1 || echo "... is already stripped"; \
1236 echo "./sstrip ./samhain.pk.data"; \
1237 ./sstrip ./samhain.pk.data > /dev/null 2>&1 || echo "sstrip returned false"; \
1238 test -f exepack.out && rm exepack.out; \
1239 echo "./exepack_fill exepack samhain.pk.data exepack.out"; \
1240 ./exepack_fill exepack samhain.pk.data exepack.out; \
1241 chmod +x exepack.out; \
1242 echo "strip exepack.out"; \
1243 strip exepack.out > /dev/null 2>&1 || echo "... is already stripped"; \
1244 ./sstrip exepack.out > /dev/null 2>&1 || echo "sstrip returned false"; \
1245 echo "mv exepack.out samhain.pk"; \
1246 rm -f samhain.pk; mv exepack.out samhain.pk
1247
1248samhain-packed: $(SAMHAIN) samhain_setpwd
1249 @echo "samhain_setpwd samhain new $(CLIENTPASSWD)"; \
1250 samhain_setpwd samhain new $(CLIENTPASSWD); \
1251 echo "rm -f samhain; mv samhain.new samhain"; \
1252 rm -f samhain; mv samhain.new samhain; \
1253 $(MAKE) samhain.pk; \
1254 echo "rm -f samhain; mv samhain.pk samhain"; \
1255 rm -f samhain; mv samhain.pk samhain
1256
1257#----------------------------------------------------------
1258#
1259# DEPLOY rules
1260#
1261#----------------------------------------------------------
1262
1263uninstall-deploy:
1264 rm -rf $(mydatadir)/profiles/source
1265 rm -rf $(mydatadir)/profiles/archpkg
1266 rm -rf $(mydatadir)/profiles/libexec
1267 rm -rf $(mydatadir)/profiles/tmp
1268 rm -rf $(mydatadir)/profiles/private
1269 @if test -f $(sbindir)/deploy.sh; then \
1270 old_deploy=`grep 'VERSION2' $(sbindir)/deploy.sh >/dev/null 2>&1 || echo old`; \
1271 if test x"$$old_deploy" = xold; then \
1272 echo "rm -f $(sbindir)/deploy2.sh"; \
1273 rm -f $(sbindir)/deploy2.sh; \
1274 else \
1275 echo "rm -f $(sbindir)/deploy.sh"; \
1276 rm -f $(sbindir)/deploy.sh; \
1277 fi; \
1278 fi
1279
1280EXECFILES= comCHECKSRC comDOWNLOAD comBUILD comCLEAN comINSTALL \
1281 funcDIALOG funcEXE funcPRINT funcSETUP funcBUILD funcINSTALL \
1282 funcDB comUNINSTALL \
1283 preinstall postinstall initscript
1284
1285# $(mydatadir)/profiles/
1286# |
1287# |
1288# |-- source -------------> (tarballs)
1289# |
1290# |-- configs ------------> (default configs)
1291# |
1292# |-- archpkg
1293# | |
1294# | |-- architecture -> (package, setup script)
1295# |
1296# |-- hosts
1297# | |
1298# | |-- hostname -----> (config)
1299# |
1300# |-- libexec ------------> (scripts)
1301# |
1302# |-- private ------------> (gpg key)
1303# |
1304# |-- tmp
1305#
1306install-deploy: deploy.sh samhain_stealth
1307 @echo "Creating directory tree under $(mydatadir)/profiles/"; \
1308 $(mkinstalldirs) $(sbindir); \
1309 $(mkinstalldirs) $(mydatadir)/profiles/source; \
1310 $(mkinstalldirs) $(mydatadir)/profiles/configs; \
1311 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/debian_i386; \
1312 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/gentoo_i386; \
1313 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/redhat_i386; \
1314 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/linux_i386; \
1315 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/freebsd_i386;\
1316 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/solaris; \
1317 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/aix; \
1318 $(mkinstalldirs) $(mydatadir)/profiles/hosts; \
1319 $(mkinstalldirs) $(mydatadir)/profiles/libexec; \
1320 $(mkinstalldirs) $(mydatadir)/profiles/private; \
1321 $(mkinstalldirs) $(mydatadir)/profiles/tmp; \
1322 if test -f $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz.asc; then \
1323 if test -f $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz; then \
1324 echo "Installing source tarball"; \
1325 $(INSTALL_DATA) $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz.asc \
1326 $(mydatadir)/profiles/source/$(PACKAGE)-$(VERSION).tar.gz.asc; \
1327 $(INSTALL_DATA) $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz \
1328 $(mydatadir)/profiles/source/$(PACKAGE)-$(VERSION).tar.gz; \
1329 fi; \
1330 fi; \
1331 echo "Installing default configs"; \
1332 test -f $(mydatadir)/profiles/configs/freebsd_i386.samhainrc || \
1333 $(INSTALL_DATA) $(srcdir)/samhainrc.freebsd \
1334 $(mydatadir)/profiles/configs/freebsd_i386.samhainrc; \
1335 test -f $(mydatadir)/profiles/configs/debian_i386.samhainrc || \
1336 $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
1337 $(mydatadir)/profiles/configs/debian_i386.samhainrc; \
1338 test -f $(mydatadir)/profiles/configs/gentoo_i386.samhainrc || \
1339 $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
1340 $(mydatadir)/profiles/configs/gentoo_i386.samhainrc; \
1341 test -f $(mydatadir)/profiles/configs/redhat_i386.samhainrc || \
1342 $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
1343 $(mydatadir)/profiles/configs/redhat_i386.samhainrc; \
1344 test -f $(mydatadir)/profiles/configs/linux_i386.samhainrc || \
1345 $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
1346 $(mydatadir)/profiles/configs/linux_i386.samhainrc; \
1347 test -f $(mydatadir)/profiles/configs/solaris.samhainrc || \
1348 $(INSTALL_DATA) $(srcdir)/samhainrc.solaris \
1349 $(mydatadir)/profiles/configs/solaris.samhainrc; \
1350 test -f $(mydatadir)/profiles/configs/aix.samhainrc || \
1351 $(INSTALL_DATA) $(srcdir)/samhainrc.aix5.2.0 \
1352 $(mydatadir)/profiles/configs/aix.samhainrc; \
1353 if test -f $(mydatadir)/profiles/configs/generic.configure; then \
1354 :; \
1355 else \
1356 SH_FQDN_SYSTEM=`uname -n`; \
1357 SH_FQDN_DOMAIN=`grep -i domain /etc/resolv.conf |grep -v "\#" |awk '{print $$2}' |head -1`; \
1358 if test -n "$${SH_FQDN_SYSTEM}" -a -n "$${SH_FQDN_DOMAIN}"; then \
1359 sh_thishost="$${SH_FQDN_SYSTEM}.$${SH_FQDN_DOMAIN}"; \
1360 else \
1361 sh_thishost="FQDN_MISSING"; \
1362 fi; \
1363 outfile=$(mydatadir)/profiles/configs/generic.configure; \
1364 echo "'--enable-network=client'" > $$outfile; \
1365 echo "'--with-logserver=$${sh_thishost}'" >> $$outfile; \
1366 echo "'--with-data-file=REQ_FROM_SERVER/var/lib/samhain/samhain_file'" >> $$outfile; \
1367 echo "'--with-config-file=REQ_FROM_SERVER/etc/samhainrc'" >> $$outfile; \
1368 echo "'--enable-base=@mykeybase@'" >> $$outfile; \
1369 fi; \
1370 $(INSTALL_SHELL) $(srcdir)/mkinstalldirs \
1371 $(mydatadir)/profiles/libexec; \
1372 $(INSTALL_SHELL) $(srcdir)/install-sh \
1373 $(mydatadir)/profiles/libexec; \
1374 for ff in $(EXECFILES); do \
1375 test -f $(srcdir)/dsys/$$ff && $(INSTALL_SHELL) $(srcdir)/dsys/$$ff \
1376 $(mydatadir)/profiles/libexec; \
1377 done; \
1378 $(INSTALL_SHELL) samhain_stealth $(mydatadir)/profiles/libexec; \
1379 test -f $(srcdir)/dsys/0F571F6C.asc && $(INSTALL_DATA) $(srcdir)/dsys/0F571F6C.asc \
1380 $(mydatadir)/profiles/private; \
1381 convert +compress $(srcdir)/stealth_template.jpg stealth_template.ps >/dev/null || \
1382 { 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 "*"; }; \
1383 if test -f stealth_template.ps; then \
1384 if test -f $(mydatadir)/profiles/private/stealth_template.ps; then \
1385 :; \
1386 else \
1387 $(INSTALL_DATA) stealth_template.ps $(mydatadir)/profiles/private; \
1388 fi; \
1389 fi; \
1390 if test -f $(sbindir)/deploy.sh; then \
1391 old_deploy=`grep 'VERSION2' $(sbindir)/deploy.sh >/dev/null 2>&1 || echo old`; \
1392 if test x"$$old_deploy" = xold; then \
1393 echo "*"; echo "* Version 1 of deploy.sh found"; echo "*"; \
1394 echo "* Installing $(sbindir)/deploy2.sh"; echo "*"; \
1395 $(INSTALL_SHELL) deploy.sh $(sbindir)/deploy2.sh; \
1396 else \
1397 echo "Installing $(sbindir)/deploy.sh"; \
1398 $(INSTALL_SHELL) deploy.sh $(sbindir)/deploy.sh; \
1399 fi; \
1400 else \
1401 echo "Installing $(sbindir)/deploy.sh"; \
1402 $(INSTALL_SHELL) deploy.sh $(sbindir)/deploy.sh; \
1403 fi
1404
1405
1406#----------------------------------------------------------
1407#
1408# DISTRIBUTION rules
1409#
1410#----------------------------------------------------------
1411
1412distdir = $(PACKAGE)-$(VERSION)
1413top_distdir = $(distdir)
1414
1415# This target untars the dist file and tries a VPATH configuration. Then
1416# it guarantees that the distribution is self-contained by making another
1417# tarfile.
1418
1419#
1420# 1) make distribution tarfile
1421# 2) unpack the tarfile into distdir
1422# 3) create build and install directories
1423# 4) do the build in the build dir, with sources from distdir
1424# 5) check (there are no subdirs, thus does nothing)
1425# 6) install
1426# 7) installcheck (equal to check, does nothing)
1427#
1428distcheck: dist
1429 -rm -rf $(distdir)
1430 GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
1431 mkdir $(distdir)/=build
1432 mkdir $(distdir)/=inst
1433 dc_install_base=`cd $(distdir)/=inst && pwd`; \
1434 cd $(distdir)/=build \
1435 && ../configure --srcdir=.. --prefix=$$dc_install_base \
1436 && $(MAKE) \
1437 && $(MAKE) install
1438 -rm -rf $(distdir)
1439 -rm -f $(distdir).tar.gz.asc
1440 @gpg -a --detach-sign $(distdir).tar.gz; \
1441 $(TAR) chof $(distdir).tar $(distdir).tar.gz $(distdir).tar.gz.asc; \
1442 rm -f $(distdir).tar.gz; \
1443 rm -f $(distdir).tar.gz.asc; \
1444 gzip --best $(distdir).tar
1445 mv $(distdir).tar.gz $(PACKAGE)_signed-$(VERSION).tar.gz
1446 @echo "========================"; \
1447 echo "$(PACKAGE)_signed-$(VERSION).tar.gz is ready for distribution"; \
1448 echo "========================"
1449
1450#
1451# create a tarfile for the distibution
1452#
1453distrpm: distdirrpm
1454 -chmod -R a+r $(distdir)
1455 -rm -rf $(distdir).tar.gz
1456 -rm -rf $(distdir).tar
1457 $(TAR) chof $(distdir).tar $(distdir)
1458 gzip -c --best $(distdir).tar > $(distdir).tar.gz
1459 -rm -rf $(distdir)
1460
1461dist: distdir
1462 -chmod -R a+r $(distdir)
1463 -rm -rf $(distdir).tar.gz
1464 -rm -rf $(distdir).tar
1465 $(TAR) chof $(distdir).tar $(distdir)
1466 gzip -c --best $(distdir).tar > $(distdir).tar.gz
1467 -rm -rf $(distdir)
1468
1469#
1470# create a tarfile for the distibution
1471#
1472dist-sign: distdir
1473 -rm -f $(distdir)/scripts/samhain.ebuild
1474 -rm -f $(distdir)/scripts/samhain.ebuild-light
1475 -chmod -R a+r $(distdir)
1476 -rm -rf $(distdir).tar.gz
1477 -rm -rf $(distdir).tar
1478 $(TAR) chof $(distdir).tar $(distdir)
1479 gzip --best $(distdir).tar
1480 -rm -rf $(distdir)
1481 -rm -f $(distdir).tar.gz.asc
1482 gpg -a --detach-sign $(distdir).tar.gz
1483 $(TAR) chof $(distdir).tar $(distdir).tar.gz $(distdir).tar.gz.asc
1484 -rm -f $(distdir).tar.gz
1485 -rm -f $(distdir).tar.gz.asc
1486 gzip --best $(distdir).tar
1487 mv $(distdir).tar.gz $(PACKAGE)_signed-$(VERSION).tar.gz
1488
1489
1490#
1491# same as dist
1492#
1493dist-all: distdir
1494 -chmod -R a+r $(distdir)
1495 GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
1496 -rm -rf $(distdir)
1497
1498#
1499# create distribution directory and copy files into it
1500#
1501INITFILES=samhain.startIRIX samhain.startFreeBSD samhain.startSolaris \
1502samhain.startLSB samhain.startGentoo samhain.startLinux samhain.startHPUX
1503
1504SCRIPTFILES=redhat_i386.client.spec check_samhain.pl samhainadmin.pl
1505
1506distdir: distfilecheck
1507 -rm -f $(top_srcdir)/init/*~
1508 -rm -f $(top_srcdir)/dsys/*~
1509 -rm -f $(top_srcdir)/docs/*~
1510 -rm -f $(top_srcdir)/include/*~
1511 -rm -f $(top_srcdir)/src/*~
1512 -rm -f $(top_srcdir)/test/*~
1513 -rm -f $(top_srcdir)/scripts/*~
1514 (cd $(top_srcdir)/init && rm -f $(INITFILES))
1515 (cd $(top_srcdir)/scripts && rm -f $(SCRIPTFILES))
1516 -rm -rf $(distdir)
1517 mkdir $(distdir)
1518 -chmod 777 $(distdir)
1519 @for file in $(DISTFILES); do \
1520 d=$(top_srcdir); \
1521 if test -f $$d/$$file || test -d $$d/$$file; then \
1522 cp -pr $$d/$$file $(distdir)/$$file; \
1523 fi; \
1524 done; \
1525 cp scripts/samhain.spec $(distdir)/samhain.spec; \
1526 rm -f $(distdir)/scripts/*.spec
1527
1528#
1529# as distdir, but don't copy spec file from scripts
1530#
1531distdirrpm: distfilecheck
1532 -rm -rf $(distdir)
1533 mkdir $(distdir)
1534 -chmod 777 $(distdir)
1535 @if test -f ./samhain.spec; then \
1536 :; \
1537 else \
1538 echo "Error: ./samhain.spec not found, please run configure"; \
1539 exit 1; \
1540 fi
1541 @cp -p samhain.spec $(distdir)/samhain.spec; \
1542 for file in $(DISTFILES); do \
1543 d=$(top_srcdir); \
1544 if test -f $$d/$$file || test -d $$d/$$file; then \
1545 if test x"$$file" = "xsamhain.spec"; then \
1546 :; \
1547 else \
1548 cp -pr $$d/$$file $(distdir)/$$file; \
1549 fi; \
1550 fi; \
1551 done; \
1552 rm -f $(distdir)/scripts/*.spec
1553
1554
1555distfilecheck: $(top_srcdir)/config.h.in $(top_srcdir)/depend.sum
1556 @for file in $(DISTFILES); do \
1557 d=$(top_srcdir); \
1558 if test -f $$d/$$file || test -d $$d/$$file; then \
1559 : \
1560 else \
1561 echo "File not found: $$d/$$file"; \
1562 fi; \
1563 done
1564 @for file in $(SOURCES); do \
1565 if test -f $$file; then \
1566 : \
1567 else \
1568 echo "File not found: $$file"; \
1569 fi; \
1570 done
1571
1572
1573# DO NOT DELETE THIS LINE
1574
1575
1576samhain.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
1577sh_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
1578sh_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
1579sh_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
1580sh_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
1581sh_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
1582sh_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
1583sh_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
1584sh_tiger1.o: $(srcsrc)/sh_tiger1.c Makefile config_xor.h
1585sh_tiger2.o: $(srcsrc)/sh_tiger2.c Makefile config_xor.h
1586sh_tiger1_64.o: $(srcsrc)/sh_tiger1_64.c Makefile config_xor.h
1587sh_tiger2_64.o: $(srcsrc)/sh_tiger2_64.c Makefile config_xor.h
1588sh_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
1589sh_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
1590sh_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
1591sh_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
1592sh_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
1593sh_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
1594sh_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
1595sh_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
1596sh_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
1597sh_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
1598sh_fifo.o: $(srcsrc)/sh_fifo.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_unix.h
1599sh_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
1600sh_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
1601sh_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
1602sh_cat.o: $(srcsrc)/sh_cat.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_cat.h
1603sh_calls.o: $(srcsrc)/sh_calls.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_calls.h
1604sh_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
1605sh_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
1606sh_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
1607sh_err_console.o: $(srcsrc)/sh_err_console.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h
1608sh_err_syslog.o: $(srcsrc)/sh_err_syslog.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h
1609sh_schedule.o: $(srcsrc)/sh_schedule.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_schedule.h
1610bignum.o: $(srcsrc)/bignum.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/bignum.h
1611mkhdr.o: $(srcsrc)/mkhdr.c Makefile config.h
1612samhain_setpwd.o: $(srcsrc)/samhain_setpwd.c Makefile config_xor.h
1613samhain_stealth.o: $(srcsrc)/samhain_stealth.c Makefile config_xor.h
1614encode.o: $(srcsrc)/encode.c Makefile
1615sstrip.o: $(srcsrc)/sstrip.c Makefile
1616trustfile.o: $(srcsrc)/trustfile.c Makefile config_xor.h $(srcinc)/sh_calls.h $(srcinc)/slib.h $(srcinc)/sh_static.h
1617exepack.o: $(srcsrc)/exepack.c Makefile config.h $(srcinc)/minilzo.h $(srcinc)/exepack.data
1618exepack_fill.o: $(srcsrc)/exepack_fill.c Makefile config.h config.h $(srcinc)/minilzo.h
1619exepack_mkdata.o: $(srcsrc)/exepack_mkdata.c Makefile config.h $(srcinc)/minilzo.h
1620minilzo.o: $(srcsrc)/minilzo.c Makefile $(srcinc)/minilzo.h
1621slib.o: $(srcsrc)/slib.c Makefile config_xor.h $(srcinc)/slib.h $(srcinc)/sh_calls.h $(srcinc)/sh_static.h
1622rijndael-alg-fst.o: $(srcsrc)/rijndael-alg-fst.c Makefile config_xor.h $(srcinc)/rijndael-alg-fst.h $(srcinc)/rijndael-boxes-fst.h
1623rijndael-api-fst.o: $(srcsrc)/rijndael-api-fst.c Makefile config_xor.h $(srcinc)/rijndael-alg-fst.h $(srcinc)/rijndael-api-fst.h
1624zAVLTree.o: $(srcsrc)/zAVLTree.c Makefile $(srcinc)/zAVLTree.h
1625sh_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
1626sh_ignore.o: $(srcsrc)/sh_ignore.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_error.h
1627yulectl.o: $(srcsrc)/yulectl.c Makefile config_xor.h
1628sh_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
1629sh_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
1630sh_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
1631kern_head.o: $(srcsrc)/kern_head.c Makefile config.h $(srcinc)/kern_head.h $(srcinc)/kern_head.h
1632sh_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
1633sh_static.o: $(srcsrc)/sh_static.c Makefile config_xor.h
1634sh_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
1635sh_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.