source: trunk/Makefile.in@ 540

Last change on this file since 540 was 534, checked in by katerina, 6 years ago

Version 4.3.0, support for /etc/subuid, /etc/subgid

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