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