source: trunk/Makefile.in@ 139

Last change on this file since 139 was 138, checked in by rainer, 17 years ago

More fixes for compile and runtime errors.

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