kumquat-buildroot/package/newt/newt.mk

81 lines
2.4 KiB
Makefile
Raw Normal View History

2002-05-23 21:21:23 +02:00
#############################################################
#
# newt
#
#############################################################
2003-01-25 08:55:15 +01:00
NEWT_SOURCE=newt-0.51.0.tar.bz2
2003-02-12 15:19:49 +01:00
NEWT_SITE=http://www.uclibc.org/
2003-01-25 08:55:15 +01:00
NEWT_DIR=$(BUILD_DIR)/newt-0.51.0
NEWT_VERSION=0.51.0
ifeq ($(BR2_LARGEFILE),y)
2003-01-25 08:55:15 +01:00
NEWT_CFLAGS=-Os -g -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
2002-05-23 21:21:23 +02:00
else
2003-01-25 08:55:15 +01:00
NEWT_CFLAGS=-Os -g
2002-05-23 21:21:23 +02:00
endif
2003-01-25 08:55:15 +01:00
NEWT_CFLAGS+=-fPIC
2002-05-23 21:21:23 +02:00
$(DL_DIR)/$(NEWT_SOURCE):
$(WGET) -P $(DL_DIR) $(NEWT_SITE)/$(NEWT_SOURCE)
2002-05-23 21:21:23 +02:00
2003-01-25 08:55:15 +01:00
$(NEWT_DIR)/.source: $(DL_DIR)/$(NEWT_SOURCE)
bzcat $(DL_DIR)/$(NEWT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
2002-05-23 21:21:23 +02:00
touch $(NEWT_DIR)/.source;
$(NEWT_DIR)/.configured: $(NEWT_DIR)/.source
(cd $(NEWT_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
);
2002-05-23 21:21:23 +02:00
touch $(NEWT_DIR)/.configured;
2003-01-25 08:55:15 +01:00
$(NEWT_DIR)/libnewt.so.$(NEWT_VERSION): $(NEWT_DIR)/.configured
2003-01-25 11:05:37 +01:00
$(MAKE) CFLAGS="$(NEWT_CFLAGS)" CC=$(TARGET_CC) -C $(NEWT_DIR)
2003-01-25 08:55:15 +01:00
touch -c $(NEWT_DIR)/libnewt.so.$(NEWT_VERSION)
2002-05-23 21:21:23 +02:00
2003-01-25 08:55:15 +01:00
$(STAGING_DIR)/lib/libnewt.a: $(NEWT_DIR)/libnewt.so.$(NEWT_VERSION)
2002-05-23 21:21:23 +02:00
cp -a $(NEWT_DIR)/libnewt.a $(STAGING_DIR)/lib;
cp -a $(NEWT_DIR)/newt.h $(STAGING_DIR)/include;
cp -a $(NEWT_DIR)/libnewt.so* $(STAGING_DIR)/lib;
2003-01-25 08:55:15 +01:00
(cd $(STAGING_DIR)/lib; ln -fs libnewt.so.$(NEWT_VERSION) libnewt.so);
(cd $(STAGING_DIR)/lib; ln -fs libnewt.so.$(NEWT_VERSION) libnewt.so.0.51);
touch -c $(STAGING_DIR)/lib/libnewt.a
2002-05-23 21:21:23 +02:00
2003-01-25 08:55:15 +01:00
$(TARGET_DIR)/lib/libnewt.so.$(NEWT_VERSION): $(STAGING_DIR)/lib/libnewt.a
2002-05-23 21:21:23 +02:00
cp -a $(STAGING_DIR)/lib/libnewt.so* $(TARGET_DIR)/lib;
-$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libnewt.so*
2003-01-25 08:55:15 +01:00
touch -c $(TARGET_DIR)/lib/libnewt.so.$(NEWT_VERSION)
2002-05-23 21:21:23 +02:00
2003-01-25 08:55:15 +01:00
newt: uclibc slang $(TARGET_DIR)/lib/libnewt.so.$(NEWT_VERSION)
2002-05-23 21:21:23 +02:00
newt-source: $(DL_DIR)/$(NEWT_SOURCE)
2002-05-23 21:21:23 +02:00
newt-clean:
rm -f $(TARGET_DIR)/lib/libnewt.so*
-$(MAKE) -C $(NEWT_DIR) clean
2002-05-23 21:21:23 +02:00
newt-dirclean: slang-dirclean
rm -rf $(NEWT_DIR)
#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(strip $(BR2_PACKAGE_NEWT)),y)
TARGETS+=newt
endif