133 lines (91 with data), 4.3 kB
# Change this file according to your paths
# change this path, do not leave spaces at the end of the line
STXXL_ROOT = /home/dementiev/projects/stxxl#
USE_BOOST = no # set 'yes' to use Boost libraries or 'no' to not use Boost libraries
USE_LINUX = yes # set 'yes' if you run Linux, 'no' otherwise
# change this path, do not leave spaces at the end of the line
BOOST_INCLUDE = /usr/include/boost-1_33/#
MAKE = make # or gmake
COMPILER = g++
LINKER = g++
OPT = -O3 # compiler optimization level
DEBUG = # put here -g option to include the debug inormation into the binaries
#### BOOST OPTIONS ###############################################
BOOST_LINKER_OPTIONS = -lboost_thread-gcc-mt \
-lboost_date_time-gcc-mt
BOOST_COMPILER_OPTIONS = \
-DSTXXL_BOOST_TIMESTAMP \
-DSTXXL_BOOST_CONFIG \
-DSTXXL_BOOST_FILESYSTEM \
-DSTXXL_BOOST_THREADS \
-DSTXXL_BOOST_RANDOM \
-I$(BOOST_INCLUDE) \
-pthread
##################################################################
#### DEPENDENCIES ################################################
COMMON_FILES = ../common/aligned_alloc.h ../common/mutex.h ../common/perm.h \
../common/rand.h ../common/semaphore.h ../common/state.h ../common/timer.h \
../common/utils.h ../common/gprof.h ../common/rwlock.h ../common/simple_vector.h \
../common/switch.h ../common/tmeta.h ../make.settings
IO_LAYER_FILES = ../io/completion_handler.h ../io/io.h ../io/iobase.h \
../io/iostats.h ../io/mmap_file.h ../io/simdisk_file.h ../io/syscall_file.h \
../io/ufs_file.h
MNG_LAYER_FILES = ../mng/adaptor.h ../mng/async_schedule.h ../mng/block_prefetcher.h \
../mng/buf_istream.h ../mng/buf_ostream.h ../mng/buf_writer.h ../mng/mng.h \
../mng/write_pool.h ../mng/prefetch_pool.h
CONTAINER_MAP_FILES = # $(STXXL_ROOT)/containers/map.impl/*.h
CONTAINER_FILES = ../containers/pager.h ../containers/stack.h ../containers/vector.h \
../containers/priority_queue.h ../containers/queue.h $(CONTAINER_MAP_FILES)
ALGO_FILES = ../algo/adaptor.h ../algo/inmemsort.h ../algo/intksort.h ../algo/run_cursor.h \
../algo/sort.h ../algo/async_schedule.h ../algo/interleaved_alloc.h ../algo/ksort.h \
../algo/loosertree.h ../algo/scan.h ../algo/stable_ksort.h
STREAM_FILES = ../stream/stream.h ../stream/sort_stream.h
###################################################################
###### MISC #######################################################
OBJEXT = o # extension of object files
LIBEXT = a # static library file extension
EXEEXT = bin # executable file extension
RM = rm -f # remove file command
LIBGEN = ar cr # library generation
OUT = -o # output file option for the compiler and linker
###################################################################
ifeq ($(strip $(USE_LINUX)),yes)
POSIX_MEMALIGN = -DSTXXL_USE_POSIX_MEMALIGN_ALLOC
XOPEN_SOURCE = -D_XOPEN_SOURCE=600
endif
STXXL_SPECIFIC = \
-DSORT_OPT_PREFETCHING \
-DUSE_MALLOC_LOCK -DCOUNT_WAIT_TIME -I$(STXXL_ROOT)/ \
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE \
$(POSIX_MEMALIGN) $(XOPEN_SOURCE)
# switch the direct I/O off
# STXXL_SPECIFIC += -DSTXXL_DIRECT_IO_OFF
# STXXL_SPECIFIC += -DSTXXL_CHECK_ORDER_IN_SORTS
# STXXL_SPECIFIC += -DSTXXL_DEBUGMON
# WARNINGS = -Wall
STXXL_COMPILER_OPTIONS = $(STXXL_SPECIFIC) $(WARNINGS) \
$(DEBUG) $(OPT)
STXXL_LINKER_OPTIONS = -L$(STXXL_ROOT)/lib/ -lstxxl -lpthread
ifeq ($(strip $(USE_BOOST)),yes)
STXXL_COMPILER_OPTIONS += $(BOOST_COMPILER_OPTIONS)
STXXL_LINKER_OPTIONS += $(BOOST_LINKER_OPTIONS)
endif
#
# Troubleshooting
#
# For automatical checking of order of the output elements in
# the sorters: stxxl::stream::sort, stxxl::stream::merge_runs,
# stxxl::sort, and stxxl::ksort
# use -DSTXXL_CHECK_ORDER_IN_SORTS compile option
#
# if your program aborts with message "read/write: wrong parameter"
# or "Invalid argument"
# this could be that your kernel does not support direct I/O
# then try to set it off recompiling your code with option
# -DSTXXL_DIRECT_IO_OFF (the libs must be also recompiled)
# The best way for doing it is to modify the STXXL_SPECIFIC
# variable (see above).
# But for the best performance it is strongly recommended
# to reconfigure the kernel for the support of the direct I/O.
#
#