| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268 |
- #
- # 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 src BSDmakefile
- EXCLUDES = $(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_DYNAMIC = @CXX@
- LD_STATIC = @CXX@ @STATIC@
- CCDEBUG = @CCACHE@ @DISTCC@ @CXX@
- LD_DEBUG = @CXX@
- STRIP = @STRIP@
- DIFF = @DIFF@
- #LIBS = @LIBS@ @ZLIB@
- LIBS = @LIBS@ @SSL_LIBS@
- DEBCXXFLAGS = -DDEBUG -fno-inline -g3 -ggdb3 -O0 -Wshadow -Wpointer-arith -Wcast-align @GCC3DEB@ @GCC4DEB@
- CFLGS = @GCC3@ -fno-rtti @SSL_INCLUDES@
- _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 @MAKEJOBS@
- MAKE_STATIC = $(MAKE) 'MAKE=$(MAKE)' 'CXX=$(CXX)' 'LD=$(LD_STATIC)' \
- 'CCDEPMODE=$(CCDEPMODE)' 'BRANCH=$(BRANCH)' 'COMMIT=$(COMMIT_SHORT)' 'BUILDTS=$(BUILDTS)' 'VERSION=$(VERSION)' \
- 'STRIP=$(STRIP)' 'CFLGS=$(CFLGS) -DBIN_TYPE_STATIC' \
- 'LIBS=$(LIBS)' 'EGGEXEC=$(BINEXEC)' 'EGGBUILD=(wraith)'
- MAKE_DYNAMIC = $(MAKE) 'MAKE=$(MAKE)' 'CXX=$(CXX)' 'LD=$(LD_DYNAMIC)' \
- 'CCDEPMODE=$(CCDEPMODE)' 'BRANCH=$(BRANCH)' 'COMMIT=$(COMMIT_SHORT)' 'BUILDTS=$(BUILDTS)' 'VERSION=$(VERSION)' \
- 'STRIP=$(STRIP)' 'CFLGS=$(CFLGS) -DBIN_TYPE_DYNAMIC' \
- 'LIBS=$(LIBS)' 'EGGEXEC=$(BINEXEC)' 'EGGBUILD=(wraith)'
- MAKE_DEBUG = $(MAKE) 'MAKE=$(MAKE)' 'CXX=$(CCDEBUG)' 'LD=$(LD_DEBUG) -g' \
- 'CCDEPMODE=$(CCDEPMODE)' 'BRANCH=$(BRANCH)' 'COMMIT=$(COMMIT_SHORT)' 'BUILDTS=$(BUILDTS)' 'VERSION=$(VERSION)' \
- 'STRIP=touch' 'CFLGS=$(CFLGS) $(DEBCXXFLAGS) -DBIN_TYPE_DYNAMIC' \
- 'LIBS=$(LIBS)' 'EGGEXEC=$(BINEXEC)' 'EGGBUILD=(debug)'
- MAKE_UTILS = $(MAKE) 'MAKE=$(MAKE)' 'CXX=$(CCDEBUG)' 'STRIP=touch' \
- 'CCDEPMODE=$(CCDEPMODE)' \
- 'CFLGS=$(CFLGS) $(DEBCXXFLAGS)' 'LIBS=$(LIBS)' 'LD=$(LD_DEBUG) -g'
- MAKE_UTILS_NR = $(MAKE) 'CXX=$(CXX)' 'STRIP=touch' \
- 'CCDEPMODE=$(CCDEPMODE)' \
- 'CFLGS=$(CFLGS) $(DEBCXXFLAGS)' 'LIBS=$(LIBS)' 'LD=$(LD) -g'
- MAKE_CONFIG = $(MAKE) 'MAKE=$(MAKE)'
- .PHONY: checkclean.static checkclean.dynamic checkclean.debug lib wraith dwraith lib.debug debug test general crypto utils sorthelp makehelp makeset makeres stringfix set res help sort indent tar distrib distclean clean cleanutils test all dynamic static
- all: dynamic
- 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)/
- -+@cd lib && $(MAKE) distclean
- @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
- @sed -e 's/GIT_REQUIRED=1/GIT_REQUIRED=0/' configure > $(DISTRIB)/configure
- # @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
- .NOTPARALLEL: checkclean.static checkclean.dynamic checkclean.debug
- checkclean.static:
- @(if test -f stamp.dynamic -o -f stamp.debug; then \
- echo "[*] Cleaning up alternate build"; \
- $(MAKE) MAKEFLAGS=-s clean; \
- fi)
- @touch stamp.static
- checkclean.dynamic:
- @(if test -f stamp.static -o -f stamp.debug; then \
- echo "[*] Cleaning up alternate build"; \
- $(MAKE) MAKEFLAGS=-s clean; \
- fi)
- @touch stamp.dynamic
- checkclean.debug:
- @(if test -f stamp.static -o -f stamp.dynamic; then \
- echo "[*] Cleaning up alternate build"; \
- $(MAKE) MAKEFLAGS=-s clean; \
- fi)
- @touch stamp.debug
- lib:
- +@cd lib && $(MAKE)
- dynamic: checkclean.dynamic lib general
- @echo ""
- @echo "Making dynamic binary"
- @echo ""
- @echo ""
- +@cd src/mod && $(MAKE_DYNAMIC) static
- +@cd src && $(MAKE_DYNAMIC) $(BINEXEC)
- @echo ""
- static: checkclean.static lib general
- @echo ""
- @echo "Making static binary"
- @echo ""
- @echo ""
- +@cd src/mod && $(MAKE_STATIC) static
- +@cd src && $(MAKE_STATIC) $(BINEXEC)
- @echo ""
- dwraith: debug
- lib.debug:
- +@cd lib && $(MAKE) debug
- debug: checkclean.debug lib.debug general
- @echo ""
- @echo "Making debug binary"
- @echo ""
- @echo ""
- +@cd src/mod && $(MAKE_DEBUG) static
- +@cd src && $(MAKE_DEBUG) $(BINEXEC)
- @echo ""
- #safety hash
|