source: trunk/Makefile.in@ 58

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

Improved routine to find rpm after build.

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