# # DO NOT EDIT THIS FILE # # SHELL = @SHELL@ top_srcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ @SET_MAKE@ CCDEPMODE = @CCDEPMODE@ BINEXEC = wraith@EXEEXT@ STATICMAKEFILES = lib/Makefile src/mod/Makefile src/crypto/Makefile src/compat/Makefile src/Makefile Makefile CONFIGFILES = config.cache config.log config.status config.h src/buildinfo.h DISTROFILES = README LICENSE config.h.in autotools doc scripts lib Makefile.in build.sh configure pack src EXCLUDES = pack/pack.cfg $(CONFIGFILES) $(STATICMAKEFILES) COMMIT_FULL := $(shell git log -1 --pretty=format:%H HEAD) COMMIT_SHORT := $(shell git log -1 --pretty=format:%h HEAD) BRANCH := $(shell git branch --no-color | grep "^*" | sed -e 's/^\* //') BUILDTS := $(shell git log -1 --pretty=format:%ct HEAD) VERSION := $(shell git describe) DISTRIB = wraith-$(VERSION) HELPFILE = doc/help.txt SETTINGSFILE = doc/settings.txt RESPONSESFILE = doc/responses.txt # defaults CXX = @CCACHE@ @DISTCC@ @CXX@ -static LD = @CXX@ -static CCDEBUG = @CCACHE@ @DISTCC@ @CCDEBUG@ LDDEBUG = @CCDEBUG@ STRIP = @STRIP@ DIFF = @DIFF@ #LIBS = @LIBS@ @ZLIB@ @SSL@ LIBS = @LIBS@ DEBCXXFLAGS = -DDEBUG -fno-inline -g3 -ggdb3 -O0 -Wshadow -Wpointer-arith -Wcast-align @GCC3DEB@ CFLGS = @GCC3@ _CFLGS = -fno-strict-aliasing -W -Wformat \ #-Wshadow -Wnested-externs -Wno-format-y2k \ #-Wlarger-than-6608 -Wpointer-arith -Wcast-align \ #-Waggrepate-return -Wbad-function-cast \ #-Wlong-long @GCC3@ #-Wmissing-noreturn #-Wunused-parameter #-Wwrite-strings #-Wconversion #-Wtraditional MAKEFLAGS = -s -j4 MAKE_BIN = $(MAKE) 'MAKE=$(MAKE)' 'CXX=$(CXX)' 'LD=$(LD)' \ 'CCDEPMODE=$(CCDEPMODE)' 'BRANCH=$(BRANCH)' 'COMMIT=$(COMMIT_SHORT)' 'BUILDTS=$(BUILDTS)' 'VERSION=$(VERSION)' \ 'STRIP=$(STRIP)' 'CFLGS=$(CFLGS)' \ 'LIBS=$(LIBS)' 'EGGEXEC=$(BINEXEC)' 'EGGBUILD=(wraith)' MAKE_DEBUG = $(MAKE) 'MAKE=$(MAKE)' 'CXX=$(CCDEBUG)' 'LD=$(LDDEBUG) -g' \ 'CCDEPMODE=$(CCDEPMODE)' 'BRANCH=$(BRANCH)' 'COMMIT=$(COMMIT_SHORT)' 'BUILDTS=$(BUILDTS)' 'VERSION=$(VERSION)' \ 'STRIP=touch' 'CFLGS=$(CFLGS) $(DEBCXXFLAGS)' \ 'LIBS=$(LIBS)' 'EGGEXEC=$(BINEXEC)' 'EGGBUILD=(debug)' MAKE_UTILS = $(MAKE) 'MAKE=$(MAKE)' 'CXX=$(CCDEBUG)' 'STRIP=touch' \ 'CCDEPMODE=$(CCDEPMODE)' \ 'CFLGS=$(CFLGS) $(DEBCXXFLAGS)' 'LIBS=$(LIBS)' 'LD=$(LDDEBUG) -g' MAKE_UTILS_NR = $(MAKE) 'CXX=$(CXX)' 'STRIP=touch' \ 'CCDEPMODE=$(CCDEPMODE)' \ 'CFLGS=$(CFLGS) $(DEBCXXFLAGS)' 'LIBS=$(LIBS)' 'LD=$(LD) -g' MAKE_CONFIG = $(MAKE) 'MAKE=$(MAKE)' default: wraith test: cleanutils: @rm -f src/stringfix@EXEEXT@ src/sorthelp@EXEEXT@ src/makehelp@EXEEXT@ src/makeres@EXEEXT@ src/makeset@EXEEXT@ clean: cleanutils +@cd src && $(MAKE) clean +@cd src/compat && $(MAKE) clean +@cd src/crypto && $(MAKE) clean +@cd src/mod && $(MAKE) distclean -+@cd lib && $(MAKE) clean @rm -f $(BINEXEC) stamp.* *~ src/*~ configure.temp .mangled @rm -f src/help.h src/response.h src/responses.h utctime@EXEEXT@ ts@EXEEXT@ distclean: clean @rm -rf *-$(VERSION)/ autom4te.cache/ autoscan.log configure.scan @rm -rf src/.deps/ src/compat/.deps/ src/strucutres/.deps/ src/mod/*.mod/.deps/ src/crypto/.deps -+@cd lib && $(MAKE) distclean @rm -f $(STATICMAKEFILES) $(CONFIGFILES) distrib: clean @rm -rf $(DISTRIB)/ @mkdir $(DISTRIB) && cp -r $(DISTROFILES) $(DISTRIB) @rm -rf `find $(DISTRIB)/ \( -name '*~' -o -name '*#' -o -name '*.orig' -o -name '*.rej' -o -name '*.bak' -o -name '.gitignore' -o -name '.*.swp' \) -type f -print` @rm -rf `find $(DISTRIB)/ \( -name '.git' -o -name '.deps' \) -type d -print` @for s in $(EXCLUDES); do \ rm -rf $(DISTRIB)/$$s; \ done; @sed \ -e 's/^COMMIT_FULL .*/COMMIT_FULL = $(COMMIT_FULL)/' \ -e 's/^COMMIT_SHORT .*/COMMIT_SHORT = $(COMMIT_SHORT)/' \ -e 's/^BRANCH .*/BRANCH = $(BRANCH)/' \ -e 's/^BUILDTS .*/BUILDTS = $(BUILDTS)/' \ -e 's/^VERSION .*/VERSION = $(VERSION)/' \ $(DISTRIB)/Makefile.in > Makefile.in.tmp && mv Makefile.in.tmp $(DISTRIB)/Makefile.in # @for s in `find $(DISTRIB)/src/ -name '*.h' -or -name '*.c'`; do mangle -rnw $$s > /dev/null 2>&1; done tar: distrib tar -czvf $(DISTRIB).tar.gz $(DISTRIB)/ ls -al $(DISTRIB).tar.gz # rm -rf $(DISTRIB)/ # cd ../ && rm -rf distrib/ indent: @ifiles="`find src -name '*.h' -or -name '*.c'`"; \ for s in $$ifiles; \ do \ INDENT_PROFILE=private/indent.pro indent $$s; \ done sort: sorthelp @(if test "x`tail -n 1 $(HELPFILE)`" != "x::end"; then \ echo "::end" >> $(HELPFILE); \ fi) # @(sed $(HELPFILE) -e "s/^$$/ /" > help~ && mv -f help~ $(HELPFILE)) || rm -f help~ @(sed -r -e :a -e 's/^$$/ /' -e '$$!N;s/^ \n:/:/;ta' -e 'P;D' $(HELPFILE) > help~ && mv -f help~ $(HELPFILE)) || rm -f help~ @cp -f $(HELPFILE) help.txt~ @(src/sorthelp@EXEEXT@ $(HELPFILE) $(HELPFILE) || (cp -f help.txt~ $(HELPFILE); echo "Sort failed, restoring backup.")) @rm -f help.txt~ help: makehelp stringfix @src/makehelp@EXEEXT@ $(HELPFILE) src/help.h.tmp~ @(if [ ! -f src/help.h ]; then \ touch src/help.h; \ fi) @src/stringfix@EXEEXT@ src/help.h.tmp~ src/help.h~ 1 @(if test "x`$(DIFF) -qurN src/help.h~ src/help.h`" != "x"; then \ cp -f src/help.h~ src/help.h; \ fi) set: makeset @src/makeset@EXEEXT@ $(SETTINGSFILE) src/set_default.h~ @(if [ ! -f src/set_default.h ]; then \ touch src/set_default.h; \ fi) @(if test "x`$(DIFF) -qurN src/set_default.h~ src/set_default.h`" != "x"; then \ cp -f src/set_default.h~ src/set_default.h; \ fi) res: makeres @src/makeres@EXEEXT@ $(RESPONSESFILE) src/ 1 @(if [ ! -f src/response.h ]; then \ touch src/response.h; \ fi) @(if [ ! -f src/responses.h ]; then \ touch src/responses.h; \ fi) @(if test "x`$(DIFF) -qurN src/response.h~ src/response.h`" != "x"; then \ cp -f src/response.h~ src/response.h; \ fi) @(if test "x`$(DIFF) -qurN src/responses.h~ src/responses.h`" != "x"; then \ cp -f src/responses.h~ src/responses.h; \ fi) stringfix: src/stringfix.c config.h +@cd src && ${MAKE_UTILS} stringfix makeres: src/makeres.c +@cd src && ${MAKE_UTILS} makeres makeset: src/makeset.c +@cd src && ${MAKE_UTILS} makeset makehelp: src/makehelp.c +@cd src && ${MAKE_UTILS} makehelp sorthelp: src/sorthelp.c +@cd src && ${MAKE_UTILS} sorthelp utils: stringfix makehelp crypto: +@cd src/crypto && ${MAKE_UTILS} crypto general: help res set check: wraith: general @echo "" @echo "Making binary" @echo "" @echo "" +@cd lib && $(MAKE) +@cd src/mod && $(MAKE_BIN) static +@cd src && $(MAKE_BIN) $(BINEXEC) @echo "" dwraith: debug debug: general @echo "" @echo "Making debug binary" @echo "" @echo "" +@cd lib && $(MAKE) debug +@cd src/mod && $(MAKE_DEBUG) static +@cd src && $(MAKE_DEBUG) $(BINEXEC) @echo "" #safety hash