source: trunk/Makefile.in@ 133

Last change on this file since 133 was 126, checked in by rainer, 17 years ago

Check for /var/spool/pkg in 'make solaris-pkg'.

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