source: trunk/Makefile.in@ 207

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

Rewrite of code for conditionals in configuration file, supports more tests now (ticket #129).

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