Add sqlite2 package
[openwrt.git] / obsolete-buildroot / make / newt.mk
1 #############################################################
2 #
3 # newt
4 #
5 #############################################################
6 NEWT_SOURCE=newt-0.51.0.tar.bz2
7 NEWT_SITE=http://www.uclibc.org/
8 NEWT_DIR=$(BUILD_DIR)/newt-0.51.0
9 NEWT_VERSION=0.51.0
10 ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true)
11 NEWT_CFLAGS=-Os -g -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
12 else
13 NEWT_CFLAGS=-Os -g
14 endif
15 NEWT_CFLAGS+=-fPIC
16
17 $(DL_DIR)/$(NEWT_SOURCE):
18 $(WGET) -P $(DL_DIR) $(NEWT_SITE)/$(NEWT_SOURCE)
19
20 $(NEWT_DIR)/.source: $(DL_DIR)/$(NEWT_SOURCE)
21 bzcat $(DL_DIR)/$(NEWT_SOURCE) | tar -C $(BUILD_DIR) -xvf -
22 touch $(NEWT_DIR)/.source;
23
24 $(NEWT_DIR)/.configured: $(NEWT_DIR)/.source
25 (cd $(NEWT_DIR); rm -rf config.cache; \
26 $(TARGET_CONFIGURE_OPTS) \
27 ./configure \
28 --target=$(GNU_TARGET_NAME) \
29 --host=$(GNU_TARGET_NAME) \
30 --build=$(GNU_HOST_NAME) \
31 --prefix=/usr \
32 --exec-prefix=/usr \
33 --bindir=/usr/bin \
34 --sbindir=/usr/sbin \
35 --libexecdir=/usr/lib \
36 --sysconfdir=/etc \
37 --datadir=/usr/share \
38 --localstatedir=/var \
39 --mandir=/usr/man \
40 --infodir=/usr/info \
41 $(DISABLE_NLS) \
42 );
43 touch $(NEWT_DIR)/.configured;
44
45 $(NEWT_DIR)/libnewt.so.$(NEWT_VERSION): $(NEWT_DIR)/.configured
46 $(MAKE) CFLAGS="$(NEWT_CFLAGS)" CC=$(TARGET_CC) -C $(NEWT_DIR)
47 touch -c $(NEWT_DIR)/libnewt.so.$(NEWT_VERSION)
48
49 $(STAGING_DIR)/lib/libnewt.a: $(NEWT_DIR)/libnewt.so.$(NEWT_VERSION)
50 cp -a $(NEWT_DIR)/libnewt.a $(STAGING_DIR)/lib;
51 cp -a $(NEWT_DIR)/newt.h $(STAGING_DIR)/include;
52 cp -a $(NEWT_DIR)/libnewt.so* $(STAGING_DIR)/lib;
53 (cd $(STAGING_DIR)/lib; ln -fs libnewt.so.$(NEWT_VERSION) libnewt.so);
54 (cd $(STAGING_DIR)/lib; ln -fs libnewt.so.$(NEWT_VERSION) libnewt.so.0.51);
55 touch -c $(STAGING_DIR)/lib/libnewt.a
56
57 $(TARGET_DIR)/lib/libnewt.so.$(NEWT_VERSION): $(STAGING_DIR)/lib/libnewt.a
58 cp -a $(STAGING_DIR)/lib/libnewt.so* $(TARGET_DIR)/lib;
59 -$(STRIP) $(TARGET_DIR)/lib/libnewt.so*
60 touch -c $(TARGET_DIR)/lib/libnewt.so.$(NEWT_VERSION)
61
62 newt: uclibc slang $(TARGET_DIR)/lib/libnewt.so.$(NEWT_VERSION)
63
64 newt-source: $(DL_DIR)/$(NEWT_SOURCE)
65
66 newt-clean:
67 rm -f $(TARGET_DIR)/lib/libnewt.so*
68 -$(MAKE) -C $(NEWT_DIR) clean
69
70 newt-dirclean: slang-dirclean
71 rm -rf $(NEWT_DIR)
72
This page took 0.058093 seconds and 5 git commands to generate.