source: trunk/Makefile.in@ 518

Last change on this file since 518 was 518, checked in by katerina, 8 years ago

Fix for ticket #412 and ticket #413.

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