source: trunk/Makefile.in@ 246

Last change on this file since 246 was 245, checked in by katerina, 15 years ago

Patch submitted by Seph to add a build number, and define package maintainer without a gpg key (ticket #165).

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