Permalink
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (29 sloc) 1.1 KB
CC = g++
OPT ?= -O2 -fPIC
# detect what platform we're building on
$(shell sh ./build_detect_platform.sh)
# this file is generated by build_detect_platform to set build flags
include build_config.mk
CFLAGS = -c -I$$JAVA_HOME/include $(PORT_CFLAGS) $(PLATFORM_CFLAGS) $(OPT)
LDFLAGS = $(PLATFORM_LDFLAGS)
LIBOBJECTS = \
./src/main/cpp/voldemort_store_leveldb_leveldbjni_DB.o \
./src/main/cpp/voldemort_store_leveldb_leveldbjni_DbIterator.o \
./src/main/cpp/voldemort_store_leveldb_leveldbjni_DbOptions.o \
./src/main/cpp/voldemort_store_leveldb_leveldbjni_ReadOptions.o \
./src/main/cpp/voldemort_store_leveldb_leveldbjni_WriteOptions.o
# ./src/main/cpp/voldemort_store_leveldb_leveldbjni_WriteBatch.o \
# kind of useless ...
LIBRARY = libldbjni.a
JNILIB = native/$(PLATFORM)/libldb.$(PLATFORM_JNIEXT)
$(JNILIB) : $(LIBRARY)
$(CC) $(LDFLAGS) $(LIBOBJECTS) -o $@
all: $(JNILIB)
$(LIBRARY): $(LIBOBJECTS)
rm -f $@
$(AR) -rs $@ $(LIBOBJECTS)
clean:
-rm -f $(JNILIB) $(LIBRARY) */*.o src/main/cpp/*.o
-rm -f build_config.mk
.cc.o:
$(CC) $(CFLAGS) $< -o $@