minor changes
[openwrt.git] / obsolete-buildroot / make / chillispot.mk
1 #############################################################
2 #
3 # chillispot
4 #
5 #############################################################
6
7 CHILLISPOT_VERSION:=0.92
8 CHILLISPOT_SOURCE:=chillispot-$(CHILLISPOT_VERSION).tar.gz
9 CHILLISPOT_SITE:=http://www.chillispot.org/download/
10 CHILLISPOT_CAT:=zcat
11 CHILLISPOT_DIR:=$(BUILD_DIR)/chillispot-$(CHILLISPOT_VERSION)
12 CHILLISPOT_BINARY:=src/chilli
13 CHILLISPOT_TARGET_BINARY:=usr/sbin/chilli
14
15 $(DL_DIR)/$(CHILLISPOT_SOURCE):
16 $(WGET) -P $(DL_DIR) $(CHILLISPOT_SITE)/$(CHILLISPOT_SOURCE)
17
18 chillispot-source: $(DL_DIR)/$(CHILLISPOT_SOURCE)
19
20 $(CHILLISPOT_DIR)/.unpacked: $(DL_DIR)/$(CHILLISPOT_SOURCE)
21 $(CHILLISPOT_CAT) $(DL_DIR)/$(CHILLISPOT_SOURCE) | tar -C $(BUILD_DIR) -xvf -
22 sed -i -e s:"-ggdb"::g $(CHILLISPOT_DIR)/src/Makefile.in
23 touch $(CHILLISPOT_DIR)/.unpacked
24
25 $(CHILLISPOT_DIR)/.configured: $(CHILLISPOT_DIR)/.unpacked
26 (cd $(CHILLISPOT_DIR); rm -rf config.cache; \
27 $(TARGET_CONFIGURE_OPTS) \
28 CFLAGS="$(TARGET_CFLAGS)" \
29 ac_cv_func_setvbuf_reversed=no \
30 ./configure \
31 --target=$(GNU_TARGET_NAME) \
32 --host=$(GNU_TARGET_NAME) \
33 --build=$(GNU_HOST_NAME) \
34 --prefix=/usr \
35 --exec-prefix=/usr \
36 --bindir=/usr/bin \
37 --sbindir=/usr/sbin \
38 --libexecdir=/usr/lib/locate \
39 --sysconfdir=/etc \
40 --datadir=/usr/share \
41 --localstatedir=/var/lib \
42 --mandir=/usr/man \
43 --infodir=/usr/info \
44 $(DISABLE_NLS) \
45 $(DISABLE_LARGEFILE) \
46 );
47 sed -i -e s:"#define HAVE_MALLOC 0":"#define HAVE_MALLOC 1":g \
48 -e s:"#define malloc rpl_malloc"::g \
49 $(CHILLISPOT_DIR)/config.h
50 touch $(CHILLISPOT_DIR)/.configured
51
52 $(CHILLISPOT_DIR)/$(CHILLISPOT_BINARY): $(CHILLISPOT_DIR)/.configured
53 $(MAKE) CC=$(TARGET_CC) $(TARGET_CONFIGURE_OPTS) -C $(CHILLISPOT_DIR)
54
55 # This stuff is needed to work around GNU make deficiencies
56 chillispot-target_binary: $(CHILLISPOT_DIR)/$(CHILLISPOT_BINARY)
57 @if [ -L $(TARGET_DIR)/$(CHILLISPOT_TARGET_BINARY) ] ; then \
58 rm -f $(TARGET_DIR)/$(CHILLISPOT_TARGET_BINARY); fi;
59 @if [ ! -f $(CHILLISPOT_DIR)/$(CHILLISPOT_BINARY) -o $(TARGET_DIR)/$(CHILLISPOT_TARGET_BINARY) \
60 -ot $(CHILLISPOT_DIR)/$(CHILLISPOT_BINARY) ] ; then \
61 set -x; \
62 $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(CHILLISPOT_DIR) install; \
63 $(STRIP) $(TARGET_DIR)/$(CHILLISPOT_TARGET_BINARY)
64 rm -rf $(TARGET_DIR)/usr/man; fi;
65
66 chillispot: $(CHILLISPOT_DIR)/$(CHILLISPOT_BINARY)
67 #chillispot-target_binary
68 $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(CHILLISPOT_DIR) install
69 $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(CHILLISPOT_DIR)/doc install
70 $(STRIP) $(TARGET_DIR)/$(CHILLISPOT_TARGET_BINARY)
71
72
73 chillispot-clean:
74 $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(CHILLISPOT_DIR) uninstall
75 -$(MAKE) -C $(CHILLISPOT_DIR) clean
76
77 chillispot-dirclean:
78 rm -rf $(CHILLISPOT_DIR)
This page took 0.057845 seconds and 5 git commands to generate.