source: branches/samhain-2_2-branch/Makefile.in@ 166

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

Support installation of init scripts on MaxOS X.

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