Commit 58917535 authored by Yoni Fogel's avatar Yoni Fogel

Makefile modified to support OSX via make OSX=OSX

git-svn-id: file:///svn/tokudb@440 c7de825b-a66e-492c-adef-691d508d4ae1
parent 437fc36b
# On OSX do:
# make OSX=OSX
CFLAGS = -W -Wall -Wno-unused -g -fPIC -O2
CPPFLAGS = -I../include -I../newbrt
install: libdb.so
cp libdb.so ../lib/
ifeq ($(OSX),OSX)
LIBEXT=dylib
SHARED=-dynamiclib
CFLAGS+=-fno-common
else
LIBEXT=so
SHARED=-shared
endif
LIBNAME=libdb.$(LIBEXT)
install: $(LIBNAME)
cp $(LIBNAME) ../lib/
clean:
rm -rf *.so *.o
rm -rf *.$(LIBEXT) *.o
ydb.o: ../include/db.h ../newbrt/cachetable.h ../newbrt/brt.h
DBBINS = ydb.o ../newbrt/brt.o ../newbrt/brt-serialize.o ../newbrt/cachetable.o ../newbrt/hashtable.o ../newbrt/header-io.o ../newbrt/key.o ../newbrt/memory.o ../newbrt/pma.o ../newbrt/ybt.o ../newbrt/primes.o ../newbrt/log.o
libdb.so: $(DBBINS)
cc $(CPPFLAGS) $(DBBINS) -shared -o libdb.so $(CFLAGS)
$(LIBNAME): $(DBBINS)
cc $(CPPFLAGS) $(DBBINS) $(SHARED) -o $@ $(CFLAGS)
libdb.a(ydb.o): ydb.o
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment