source: trunk/Makefile.in@ 569

Last change on this file since 569 was 567, checked in by katerina, 3 years ago

Fix for ticket #456 (vendor supplied optimize flags for Debian).

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