source: trunk/Makefile.in@ 183

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

Support for logfile monitoring (ticket #122). Also improved some configure error messages.

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