source: trunk/Makefile.in@ 171

Last change on this file since 171 was 171, checked in by katerina, 16 years ago

Include dnmalloc (ticket #108) and fix bugs #106 (EINPROGRESS) and #107 (compressBound).

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