Marc Kupietz | 28cc53e | 2017-12-23 17:24:55 +0100 | [diff] [blame] | 1 | PLATFORM_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 |
| 2 | PLATFORM_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 |
| 3 | PLATFORM=OS_LINUX |
Marc Kupietz | d165976 | 2018-06-05 11:22:12 +0200 | [diff] [blame] | 4 | PLATFORM_LDFLAGS= -L/usr/local/lib -lpthread -lrt -lsnappy -lz -lbz2 -llz4 -lzstd |
Marc Kupietz | 28cc53e | 2017-12-23 17:24:55 +0100 | [diff] [blame] | 5 | |
Marc Kupietz | c8ddf45 | 2018-01-07 21:33:12 +0100 | [diff] [blame] | 6 | CXXFLAGS = -Wall -Wno-reorder -I/usr/local/include -g -std=c++11 -Ofast -march=k8 |
| 7 | CFLAGS = -Wall -I/usr/local/include -g -std=gnu99 -O2 -march=k8 |
Marc Kupietz | 4b799e9 | 2018-01-02 11:04:56 +0100 | [diff] [blame] | 8 | |
| 9 | ARFLAGS = ${EXTRA_ARFLAGS} rs |
Marc Kupietz | 18375e1 | 2017-12-24 10:11:18 +0100 | [diff] [blame] | 10 | |
Marc Kupietz | 28cc53e | 2017-12-23 17:24:55 +0100 | [diff] [blame] | 11 | ifneq ($(USE_RTTI), 1) |
| 12 | CXXFLAGS += -fno-rtti |
| 13 | endif |
| 14 | LIB_SOURCES = collocatordb.cc |
| 15 | |
| 16 | LIBOBJECTS = $(LIB_SOURCES:.cc=.o) |
Marc Kupietz | d165976 | 2018-06-05 11:22:12 +0200 | [diff] [blame] | 17 | INSTALL_PATH = /usr/local |
Marc Kupietz | 28cc53e | 2017-12-23 17:24:55 +0100 | [diff] [blame] | 18 | |
Marc Kupietz | 678185d | 2018-06-05 13:37:02 +0200 | [diff] [blame] | 19 | hello_world: hello_world.c collocatordb.h collocatordb.o Makefile |
| 20 | $(CC) $(CFLAGS) -L. -L/usr/local/lib $@.c -o$@ collocatordb.o /vol/work/kupietz/rocksdb/librocksdb.a -std=gnu99 -lstdc++ -lm $(PLATFORM_LDFLAGS) $(PLATFORM_CCFLAGS) $(EXEC_LDFLAGS) |
| 21 | |
Marc Kupietz | 4b799e9 | 2018-01-02 11:04:56 +0100 | [diff] [blame] | 22 | testcdb: testcdb.cc collocatordb.h collocatordb.o Makefile |
| 23 | $(CXX) $(CXXFLAGS) -L. -L/usr/local/lib $@.cc -o$@ collocatordb.o -lrocksdb $(PLATFORM_LDFLAGS) $(PLATFORM_CXXFLAGS) $(EXEC_LDFLAGS) |
| 24 | |
Marc Kupietz | 3400aa5 | 2018-06-05 10:28:55 +0200 | [diff] [blame] | 25 | dumpllr: dumpllr.cc collocatordb.h collocatordb.o Makefile |
| 26 | $(CXX) $(CXXFLAGS) -L. -L/usr/local/lib $@.cc -fopenmp -o$@ collocatordb.o /vol/work/kupietz/rocksdb/librocksdb.a $(PLATFORM_LDFLAGS) $(PLATFORM_CXXFLAGS) $(EXEC_LDFLAGS) |
| 27 | |
Marc Kupietz | b5bb194 | 2018-10-07 17:59:43 +0200 | [diff] [blame] | 28 | dumppmicubed: dumppmicubed.cc collocatordb.h collocatordb.o Makefile |
| 29 | $(CXX) $(CXXFLAGS) -L. -L/usr/local/lib $@.cc -fopenmp -o$@ collocatordb.o /vol/work/kupietz/rocksdb/librocksdb.a $(PLATFORM_LDFLAGS) $(PLATFORM_CXXFLAGS) $(EXEC_LDFLAGS) |
| 30 | |
Marc Kupietz | 06c9a9f | 2018-01-02 16:56:43 +0100 | [diff] [blame] | 31 | c_testcdb: c_testcdb.c collocatordb.h collocatordb.o Makefile |
Marc Kupietz | c8ddf45 | 2018-01-07 21:33:12 +0100 | [diff] [blame] | 32 | $(CC) $(CFLAGS) -L. -L/usr/local/lib $@.c -o$@ collocatordb.o -std=gnu99 -lstdc++ -lm -lrocksdb $(PLATFORM_LDFLAGS) $(PLATFORM_CCFLAGS) $(EXEC_LDFLAGS) |
| 33 | |
Marc Kupietz | 4b799e9 | 2018-01-02 11:04:56 +0100 | [diff] [blame] | 34 | collocatordb: collocatordb.cc Makefile |
Marc Kupietz | 18375e1 | 2017-12-24 10:11:18 +0100 | [diff] [blame] | 35 | $(CXX) $(CXXFLAGS) -L/usr/local/lib $@.cc -o$@ -lrocksdb $(PLATFORM_LDFLAGS) $(PLATFORM_CXXFLAGS) $(EXEC_LDFLAGS) |
Marc Kupietz | 28cc53e | 2017-12-23 17:24:55 +0100 | [diff] [blame] | 36 | |
| 37 | libcollocatordb.a: $(LIBOBJECTS) |
Marc Kupietz | 4b799e9 | 2018-01-02 11:04:56 +0100 | [diff] [blame] | 38 | $(AM_V_AR)rm -f $@ |
Marc Kupietz | 28cc53e | 2017-12-23 17:24:55 +0100 | [diff] [blame] | 39 | $(AM_V_at)$(AR) $(ARFLAGS) $@ $(LIBOBJECTS) |
| 40 | |
Marc Kupietz | 4b799e9 | 2018-01-02 11:04:56 +0100 | [diff] [blame] | 41 | libcollocatordb.so.1: collocatordb.cc |
Marc Kupietz | fe6ad80 | 2019-01-24 16:08:44 +0100 | [diff] [blame] | 42 | $(CXX) $(CXXFLAGS) -D_GLIBCXX_PARALLEL -march=native -Ofast -fopenmp -c collocatordb.cc -Wl,-soname=libcollocatordb.so.1 -Wl,--version-script=collocatordb.exmap -shared -fPIC -o libcollocatordb.so.1 |
Marc Kupietz | 4b799e9 | 2018-01-02 11:04:56 +0100 | [diff] [blame] | 43 | |
Marc Kupietz | 28cc53e | 2017-12-23 17:24:55 +0100 | [diff] [blame] | 44 | .cc.o: |
Marc Kupietz | 18375e1 | 2017-12-24 10:11:18 +0100 | [diff] [blame] | 45 | $(CXX) $(CXXFLAGS) -c $< -o$@ $(PLATFORM_CXXFLAGS) |
Marc Kupietz | d165976 | 2018-06-05 11:22:12 +0200 | [diff] [blame] | 46 | |
| 47 | install-static: libcollocatordb.a |
| 48 | install -C -m 755 libcollocatordb.a $(INSTALL_PATH)/lib |
| 49 | |
| 50 | install-shared: libcollocatordb.so.1 |
| 51 | install -C -m 755 libcollocatordb.so.1 $(INSTALL_PATH)/lib && \ |
| 52 | ln -fs $(INSTALL_PATH)/lib/libcollocatordb.so.1 $(INSTALL_PATH)/lib/libcollocatordb.so |