[dc7c28]: Makefile.gnu  Maximize  Restore  History

Download this file

114 lines (94 with data), 4.0 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# This -*- Makefile -*- is intended for processing with GNU make.
THISMAKEFILE := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
main: library
include make.settings
SUBDIRS = algo common containers io lib mng stream utils
SUBDIRS-lib: $(SUBDIRS:%=lib-in-%)
SUBDIRS-tests: $(SUBDIRS:%=tests-in-%)
SUBDIRS-clean: $(SUBDIRS:%=clean-in-%)
# compute STXXL_CPPFLAGS/STXXL_LDLIBS for stxxl.mk
# don't include optimization, warning and debug flags
stxxl_mk_cppflags = $$(STXXL_CPPFLAGS_STXXL)
stxxl_mk_ldlibs = $$(STXXL_LDLIBS_STXXL)
ifeq ($(strip $(USE_MCSTL)),yes)
stxxl_mk_cppflags += $$(STXXL_CPPFLAGS_MCSTL)
stxxl_mk_ldlibs += $$(STXXL_LDLIBS_MCSTL)
endif
ifeq ($(strip $(USE_BOOST)),yes)
stxxl_mk_cppflags += $$(STXXL_CPPFLAGS_BOOST)
stxxl_mk_ldlibs += $$(STXXL_LDLIBS_BOOST)
endif
lib-in-lib:
@# nothing to compile
lib-in-%:
$(MAKE) -C $* lib
build-lib: SUBDIRS-lib
$(MAKE) -C lib
$(MAKE) -C utils create
$(LIBNAME).mk: build-lib
echo 'STXXL_CXX = $(COMPILER)' > $@
echo 'STXXL_CPPFLAGS = $(stxxl_mk_cppflags)' >> $@
echo 'STXXL_LDLIBS = $(stxxl_mk_ldlibs)' >> $@
echo 'STXXL_CPPFLAGS_STXXL = $(STXXL_SPECIFIC)' >> $@
echo 'STXXL_LDLIBS_STXXL = $(STXXL_LDLIBS)' >> $@
echo 'STXXL_LIBDEPS = $(STXXL_LIBDEPS)' >> $@
echo 'STXXL_CPPFLAGS_MCSTL = $(MCSTL_CPPFLAGS)' >> $@
echo 'STXXL_LDLIBS_MCSTL = $(MCSTL_LDFLAGS)' >> $@
echo 'STXXL_CPPFLAGS_BOOST = $(BOOST_COMPILER_OPTIONS)' >> $@
echo 'STXXL_LDLIBS_BOOST = $(BOOST_LINKER_OPTIONS)' >> $@
library: $(LIBNAME).mk
@echo ""
@echo "Building library is completed."
@echo "Use the following compiler options with programs using Stxxl: $(STXXL_COMPILER_OPTIONS)"
@echo "Use the following linker options with programs using Stxxl: $(STXXL_LINKER_OPTIONS)"
lib/lib$(LIBNAME).$(LIBEXT): make.settings
$(MAKE) -f $(THISMAKEFILE) library
ifneq (,$(wildcard .svn))
lib-in-common: common/version_svn.defs
ifeq (,$(strip $(shell svnversion . | tr -d 0-9)))
# clean checkout - use svn info
VERSION_DATE := $(shell LC_ALL=POSIX svn info . | sed -ne '/Last Changed Date/{s/.*: //;s/ .*//;s/-//gp}')
VERSION_SVN_REV := $(shell LC_ALL=POSIX svn info . | sed -ne '/Last Changed Rev/s/.*: //p')
else
# modified, mixed, ... checkout - use svnversion and today
VERSION_DATE := $(shell date "+%Y%m%d")
VERSION_SVN_REV := $(shell svnversion .)
endif
.PHONY: common/version_svn.defs
common/version_svn.defs:
echo '#define STXXL_VERSION_STRING_DATE "$(VERSION_DATE)"' > $@.tmp
echo '#define STXXL_VERSION_STRING_SVN_REVISION "$(VERSION_SVN_REV)"' >> $@.tmp
cmp -s $@ $@.tmp || mv $@.tmp $@
$(RM) $@.tmp
endif
VERSION ?= $(shell grep 'define *STXXL_VERSION_STRING_MA_MI_PL' common/version.cpp | cut -d'"' -f2)
PHASE ?= snapshot
DATE ?= $(shell date "+%Y%m%d")
REL_VERSION := $(VERSION)$(if $(strip $(DATE)),-$(DATE))
release:
$(RM) -r reltmp stxxl-$(REL_VERSION).tar.gz stxxl-$(REL_VERSION).zip
mkdir reltmp
svn export . reltmp/stxxl-$(REL_VERSION)
echo '#define STXXL_VERSION_STRING_PHASE "$(PHASE)"' > reltmp/stxxl-$(REL_VERSION)/common/version.defs
$(if $(strip $(DATE)),echo '#define STXXL_VERSION_STRING_DATE "$(DATE)"' >> reltmp/stxxl-$(REL_VERSION)/common/version.defs)
cd reltmp && tar cf - stxxl-$(REL_VERSION) | gzip -9 > ../stxxl-$(REL_VERSION).tar.gz && zip -r ../stxxl-$(REL_VERSION).zip stxxl-$(REL_VERSION)/*
$(RM) -r reltmp
@echo
@echo "Your release has been created in stxxl-$(REL_VERSION).tar.gz and stxxl-$(REL_VERSION).zip"
@echo "The following files are modified and not commited:"
@svn status -q
tests-in-%: lib/lib$(LIBNAME).$(LIBEXT)
$(MAKE) -C $* tests
tests: SUBDIRS-tests
@echo ""
@echo "Building tests is completed."
@echo "Use the following compiler options with programs using Stxxl: $(STXXL_COMPILER_OPTIONS)"
@echo "Use the following linker options with programs using Stxxl: $(STXXL_LINKER_OPTIONS)"
clean-in-%:
$(MAKE) -C $* clean
clean: SUBDIRS-clean
$(RM) common/version_svn.defs
$(RM) $(LIBNAME).mk
$(RM) compiler.options linker.options
@echo "Cleaning completed"
.PHONY: main library tests clean

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks