source: trunk/Makefile.in@ 50

Last change on this file since 50 was 48, checked in by rainer, 18 years ago

Fix compile problem with sstrip.c

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