(issue #7324, with mods) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
83 lines
1.8 KiB
Makefile
83 lines
1.8 KiB
Makefile
# @(#)Makefile 8.9 (Berkeley) 7/14/94
|
|
|
|
LIBDB= libdb1.a
|
|
ARCH=$(shell uname -m)
|
|
ifeq ($(ARCH),alpha)
|
|
SOVER=2.1
|
|
else
|
|
SOVER=2
|
|
endif
|
|
#Added support for UltraSparc - Belgarath
|
|
ifeq ($(ARCH),sparc64)
|
|
PROC=ultrasparc
|
|
CFLAGS += -mtune=$(PROC) -pipe -fomit-frame-pointer -mcpu=v8
|
|
endif
|
|
|
|
ifeq ($(OSARCH),Darwin)
|
|
OSARCH_DEFINE+=-D__Darwin__
|
|
endif
|
|
|
|
LIBDBSO=libdb.so.$(SOVER)
|
|
PROG= db_dump185
|
|
OBJ1= hash.o hash_bigkey.o hash_buf.o hash_func.o hash_log2.o hash_page.o \
|
|
ndbm.o
|
|
OBJ2= bt_close.o bt_conv.o bt_debug.o bt_delete.o bt_get.o bt_open.o \
|
|
bt_overflow.o bt_page.o bt_put.o bt_search.o bt_seq.o bt_split.o \
|
|
bt_utils.o
|
|
OBJ3= db.o
|
|
OBJ4= mpool.o
|
|
OBJ5= rec_close.o rec_delete.o rec_get.o rec_open.o rec_put.o rec_search.o \
|
|
rec_seq.o rec_utils.o
|
|
MISC=
|
|
OBJS= $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(MISC)
|
|
SHOBJS= $(patsubst %.o,%.os,$(OBJS))
|
|
|
|
all: $(LIBDB) #$(LIBDBSO) $(PROG)
|
|
|
|
$(LIBDB): $(OBJS)
|
|
rm -f $@
|
|
ar cq $@ $(OBJS)
|
|
ranlib $@
|
|
|
|
$(LIBDBSO): $(SHOBJS)
|
|
$(CC) -Wl,-O1 -Wl,--version-script=libdb.map -Wl,-soname=$(LIBDBSO) -shared -o $@ $^
|
|
ln -sf $@ libdb.so
|
|
|
|
$(PROG): db_dump185.o $(LIBDBSO)
|
|
$(CC) -o $@ db_dump185.o -L. -ldb
|
|
|
|
clean-depend:
|
|
|
|
clean:
|
|
rm -f $(LIBDB) $(LIBDBSO) $(OBJS) $(SHOBJS)
|
|
|
|
CL= $(CC) $(CFLAGS) -Wall -c -D__DBINTERFACE_PRIVATE -I. -I.. -Iinclude
|
|
|
|
OSTYPE=$(shell uname -s)
|
|
ifeq ($(OSTYPE),SunOS)
|
|
CL+=-I../include -I../include/solaris-compat -DSOLARIS
|
|
endif
|
|
|
|
db_dump185.o: db_dump185.c
|
|
$(CL) -o $@ $<
|
|
%.o: hash/%.c
|
|
$(CL) -Ihash $(OSARCH_DEFINE) -o $@ $<
|
|
%.os: hash/%.c
|
|
$(CL) -Ihash -fPIC -o $@ $<
|
|
%.o: btree/%.c
|
|
$(CL) -Ibtree -o $@ $<
|
|
%.os: btree/%.c
|
|
$(CL) -Ibtree -fPIC -o $@ $<
|
|
db.o: db/db.c
|
|
$(CL) -o $@ $<
|
|
db.os: db/db.c
|
|
$(CL) -fPIC -o $@ $<
|
|
mpool.o: mpool/mpool.c
|
|
$(CL) -o $@ $<
|
|
mpool.os: mpool/mpool.c
|
|
$(CL) -fPIC -o $@ $<
|
|
%.o: recno/%.c
|
|
$(CL) -Irecno -o $@ $<
|
|
%.os: recno/%.c
|
|
$(CL) -Irecno -fPIC -o $@ $<
|