blob: b6d02277ede178d856c9a03ff2d90e09b8083eee [file] [log] [blame]
Marc Kupietz28cc53e2017-12-23 17:24:55 +01001PLATFORM_CCFLAGS= -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -march=native -DROCKSDB_SUPPORT_THREAD_LOCAL
2PLATFORM_CXXFLAGS=-std=c++11 -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -march=native -DROCKSDB_SUPPORT_THREAD_LOCAL
3PLATFORM=OS_LINUX
Marc Kupietzc8ddf452018-01-07 21:33:12 +01004PLATFORM_LDFLAGS= -lpthread -lrt -lsnappy -lz -lbz2 -llz4 -lzstd
Marc Kupietz28cc53e2017-12-23 17:24:55 +01005
Marc Kupietzc8ddf452018-01-07 21:33:12 +01006CXXFLAGS = -Wall -Wno-reorder -I/usr/local/include -g -std=c++11 -Ofast -march=k8
7CFLAGS = -Wall -I/usr/local/include -g -std=gnu99 -O2 -march=k8
Marc Kupietz4b799e92018-01-02 11:04:56 +01008
9ARFLAGS = ${EXTRA_ARFLAGS} rs
Marc Kupietz18375e12017-12-24 10:11:18 +010010
Marc Kupietz28cc53e2017-12-23 17:24:55 +010011ifneq ($(USE_RTTI), 1)
12 CXXFLAGS += -fno-rtti
13endif
14LIB_SOURCES = collocatordb.cc
15
16LIBOBJECTS = $(LIB_SOURCES:.cc=.o)
17
Marc Kupietz4b799e92018-01-02 11:04:56 +010018testcdb: testcdb.cc collocatordb.h collocatordb.o Makefile
19 $(CXX) $(CXXFLAGS) -L. -L/usr/local/lib $@.cc -o$@ collocatordb.o -lrocksdb $(PLATFORM_LDFLAGS) $(PLATFORM_CXXFLAGS) $(EXEC_LDFLAGS)
20
Marc Kupietz3400aa52018-06-05 10:28:55 +020021dumpllr: dumpllr.cc collocatordb.h collocatordb.o Makefile
22 $(CXX) $(CXXFLAGS) -L. -L/usr/local/lib $@.cc -fopenmp -o$@ collocatordb.o /vol/work/kupietz/rocksdb/librocksdb.a $(PLATFORM_LDFLAGS) $(PLATFORM_CXXFLAGS) $(EXEC_LDFLAGS)
23
Marc Kupietz06c9a9f2018-01-02 16:56:43 +010024c_testcdb: c_testcdb.c collocatordb.h collocatordb.o Makefile
Marc Kupietzc8ddf452018-01-07 21:33:12 +010025 $(CC) $(CFLAGS) -L. -L/usr/local/lib $@.c -o$@ collocatordb.o -std=gnu99 -lstdc++ -lm -lrocksdb $(PLATFORM_LDFLAGS) $(PLATFORM_CCFLAGS) $(EXEC_LDFLAGS)
26
27c_testanalysis: c_testanalysis.c collocatordb.h collocatordb.o Makefile
28 $(CC) $(CFLAGS) -L. -L/usr/local/lib $@.c -o$@ collocatordb.o -std=gnu99 -lstdc++ -lm -lrocksdb $(PLATFORM_LDFLAGS) $(PLATFORM_CCFLAGS) $(EXEC_LDFLAGS)
Marc Kupietz06c9a9f2018-01-02 16:56:43 +010029
Marc Kupietz4b799e92018-01-02 11:04:56 +010030collocatordb: collocatordb.cc Makefile
Marc Kupietz18375e12017-12-24 10:11:18 +010031 $(CXX) $(CXXFLAGS) -L/usr/local/lib $@.cc -o$@ -lrocksdb $(PLATFORM_LDFLAGS) $(PLATFORM_CXXFLAGS) $(EXEC_LDFLAGS)
Marc Kupietz28cc53e2017-12-23 17:24:55 +010032
33libcollocatordb.a: $(LIBOBJECTS)
Marc Kupietz4b799e92018-01-02 11:04:56 +010034 $(AM_V_AR)rm -f $@
Marc Kupietz28cc53e2017-12-23 17:24:55 +010035 $(AM_V_at)$(AR) $(ARFLAGS) $@ $(LIBOBJECTS)
36
Marc Kupietz4b799e92018-01-02 11:04:56 +010037libcollocatordb.so.1: collocatordb.cc
38 $(CXX) $(CXXFLAGS) -c collocatordb.cc -Wl,-soname=libcollocatordb.so.1 -Wl,--version-script=collocatordb.exmap -shared -fPIC -o libcollocatordb.so.1
39
Marc Kupietz28cc53e2017-12-23 17:24:55 +010040.cc.o:
Marc Kupietz18375e12017-12-24 10:11:18 +010041 $(CXX) $(CXXFLAGS) -c $< -o$@ $(PLATFORM_CXXFLAGS)