source: trunk/Makefile.in@ 170

Last change on this file since 170 was 170, checked in by katerina, 17 years ago

Plenty of compiler warnings fixed, SQL query length fixed, doc update.

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