kumquat-buildroot/package/berkeleydb/berkeleydb.mk

103 lines
2.9 KiB
Makefile
Raw Normal View History

2002-08-10 10:51:42 +02:00
#############################################################
#
# berkeley db
#
#############################################################
DB_VERSION:=4.3.29
DB_SO_VERSION:=4.3
2006-04-19 20:36:02 +02:00
DB_SITE:=ftp://ftp.sleepycat.com/releases
DB_SOURCE:=db-$(DB_VERSION).NC.tar.gz
DB_DIR:=$(BUILD_DIR)/db-$(DB_VERSION).NC
DB_SHARLIB:=libdb-$(DB_SO_VERSION).so
2002-08-10 10:51:42 +02:00
$(DL_DIR)/$(DB_SOURCE):
2009-01-16 12:42:52 +01:00
$(call DOWNLOAD,$(DB_SITE),$(DB_SOURCE))
2002-08-10 10:51:42 +02:00
2003-03-01 23:00:42 +01:00
berkeleydb-source: $(DL_DIR)/$(DB_SOURCE)
2002-08-10 10:51:42 +02:00
$(DB_DIR)/.dist: $(DL_DIR)/$(DB_SOURCE)
$(ZCAT) $(DL_DIR)/$(DB_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
touch $@
2002-08-10 10:51:42 +02:00
$(DB_DIR)/.configured: $(DB_DIR)/.dist
$(CONFIG_UPDATE) $(DB_DIR)/dist
(cd $(DB_DIR)/build_unix; rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
../dist/configure $(QUIET) \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libdir=/lib \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--includedir=/usr/include \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
2003-03-01 23:00:42 +01:00
--with-gnu-ld \
--enable-shared \
2003-03-01 23:00:42 +01:00
--disable-cxx \
--disable-java \
--disable-rpc \
--disable-tcl \
--disable-compat185 \
--with-pic \
$(DISABLE_LARGEFILE) \
)
$(SED) 's/\.lo/.o/g' $(DB_DIR)/build_unix/Makefile
touch $@
2004-10-14 11:39:25 +02:00
$(DB_DIR)/build_unix/.libs/$(DB_SHARLIB): $(DB_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(DB_DIR)/build_unix
2002-08-10 10:51:42 +02:00
2004-10-14 11:39:25 +02:00
$(STAGING_DIR)/lib/$(DB_SHARLIB): $(DB_DIR)/build_unix/.libs/$(DB_SHARLIB)
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(DB_DIR)/build_unix install
2003-03-01 23:00:42 +01:00
chmod a-x $(STAGING_DIR)/lib/libdb*so*
rm -f $(STAGING_DIR)/bin/db_*
ifneq ($(BR2_HAVE_INFOPAGES),y)
rm -rf $(STAGING_DIR)/usr/share/info
endif
ifneq ($(BR2_HAVE_MANPAGES),y)
rm -rf $(STAGING_DIR)/usr/share/man
endif
rm -rf $(STAGING_DIR)/share/locale
rm -rf $(STAGING_DIR)/usr/share/doc
2002-08-10 10:51:42 +02:00
2004-10-14 11:39:25 +02:00
$(TARGET_DIR)/lib/$(DB_SHARLIB): $(STAGING_DIR)/lib/$(DB_SHARLIB)
2002-08-10 10:51:42 +02:00
rm -rf $(TARGET_DIR)/lib/libdb*
2007-08-22 14:35:41 +02:00
cp -a $(STAGING_DIR)/lib/libdb*so* $(TARGET_DIR)/lib/
rm -f $(addprefix $(TARGET_DIR)/lib/,libdb.so libdb.la libdb.a)
2004-10-14 11:39:25 +02:00
(cd $(TARGET_DIR)/usr/lib; ln -fs /lib/$(DB_SHARLIB) libdb.so)
-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/lib/libdb*so*
2002-08-10 10:51:42 +02:00
$(TARGET_DIR)/usr/lib/libdb.a: $(STAGING_DIR)/lib/libdb-$(DB_SO_VERSION).a
cp -dpf $(STAGING_DIR)/usr/include/db.h $(TARGET_DIR)/usr/include/
2003-03-01 23:00:42 +01:00
cp -dpf $(STAGING_DIR)/lib/libdb*.a $(TARGET_DIR)/usr/lib/
cp -dpf $(STAGING_DIR)/lib/libdb*.la $(TARGET_DIR)/usr/lib/
touch -c $@
2003-03-01 23:00:42 +01:00
berkeleydb-headers: $(TARGET_DIR)/usr/lib/libdb.a
2004-10-14 11:39:25 +02:00
berkeleydb-clean:
-$(MAKE) -C $(DB_DIR)/build_unix clean
2002-08-10 10:51:42 +02:00
2004-10-14 11:39:25 +02:00
berkeleydb-dirclean:
rm -rf $(DB_DIR)
2002-08-10 10:51:42 +02:00
berkeleydb: $(TARGET_DIR)/lib/$(DB_SHARLIB)
2002-08-10 10:51:42 +02:00
#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
TARGETS+=berkeleydb
endif