small compile fix for gcc 3.4.3
[openwrt.git] / package / setserial / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=setserial
4 PKG_VERSION:=2.17
5 PKG_RELEASE:=1
6 PKG_MD5SUM:=c4867d72c41564318e0107745eb7a0f2
7
8 PKG_SOURCE_URL:=@SF/setserial
9 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
10 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
11 PKG_CAT:=zcat
12 PKG_IPK:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
13 PKG_IPK_DIR:=$(PKG_BUILD_DIR)/ipkg
14
15 $(DL_DIR)/$(PKG_SOURCE):
16 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
17
18 $(PKG_BUILD_DIR)/.unpacked: $(DL_DIR)/$(PKG_SOURCE)
19 $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
20 touch $(PKG_BUILD_DIR)/.unpacked
21
22 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.unpacked
23 (cd $(PKG_BUILD_DIR); \
24 $(TARGET_CONFIGURE_OPTS) \
25 ./configure \
26 --prefix=/ \
27 --target=$(REAL_GNU_TARGET_NAME) --host=$(GNU_HOST_NAME) \
28 )
29 touch $(PKG_BUILD_DIR)/.configured
30
31 $(PKG_BUILD_DIR)/$(PKG_NAME): $(PKG_BUILD_DIR)/.configured
32 $(MAKE) -C $(PKG_BUILD_DIR) \
33 CC=$(TARGET_CC) \
34 CFLAGS="$(TARGET_CFLAGS)" \
35 all
36
37 $(PKG_IPK): $(PKG_BUILD_DIR)/$(PKG_NAME)
38 mkdir -p $(PKG_IPK_DIR)/usr/sbin
39 cp -a ./ipkg/* $(PKG_IPK_DIR)/
40 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
41 chmod +x $(PKG_IPK_DIR)/etc/init.d/*
42 cp $(PKG_BUILD_DIR)/setserial $(PKG_IPK_DIR)/usr/sbin/
43 $(STRIP) $(PKG_IPK_DIR)/usr/sbin/*
44 mkdir -p $(PACKAGE_DIR)
45 find $(PKG_IPK_DIR) -name CVS | xargs rm -rf
46 $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
47
48 $(IPKG_STATE_DIR)/info/setserial.list: $(PKG_IPK)
49 $(IPKG) install $(PKG_IPK)
50
51 source: $(DL_DIR)/$(PKG_SOURCE)
52 prepare: $(PKG_BUILD_DIR)/.unpacked
53 compile: $(PKG_IPK)
54 install: $(IPKG_STATE_DIR)/info/$(PKG_NAME).list
55
56 clean:
57 rm -rf $(PKG_BUILD_DIR)
58 rm -f $(PKG_IPK)
This page took 0.042177 seconds and 5 git commands to generate.