remove wl / nas / et .. binary only; no license given
[openwrt.git] / package / lzo / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME := lzo
4 PKG_VERSION := 1.08
5 PKG_RELEASE := 1
6
7 PKG_SOURCE_SITE := http://www.oberhumer.com/opensource/lzo/download/
8 PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
9 PKG_SOURCE_CAT := zcat
10 PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION)
11 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
12 PKG_IPK := $(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
13
14
15 $(DL_DIR)/$(PKG_SOURCE_FILE):
16 mkdir -p $(DL_DIR)
17 $(WGET) -P $(DL_DIR) $(PKG_SOURCE_SITE)/$(PKG_SOURCE_FILE)
18
19 $(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE_FILE)
20 mkdir -p $(TOOL_BUILD_DIR)
21 $(PKG_SOURCE_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
22 $(PATCH) $(PKG_BUILD_DIR) . ./patches
23 touch $(PKG_BUILD_DIR)/.patched
24
25 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
26 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
27 $(TARGET_CONFIGURE_OPTS) \
28 ./configure \
29 --target=$(GNU_TARGET_NAME) \
30 --host=$(GNU_TARGET_NAME) \
31 --build=$(GNU_HOST_NAME) \
32 --prefix=/ \
33 --exec-prefix=/ \
34 --bindir=/bin \
35 --sbindir=/sbin \
36 --libexecdir=/lib \
37 --sysconfdir=/etc \
38 --localstatedir=/var \
39 --enable-shared \
40 );
41 touch $(PKG_BUILD_DIR)/.configured
42
43 $(PKG_BUILD_DIR)/src/liblzo.la: $(PKG_BUILD_DIR)/.configured
44 $(MAKE) -C $(PKG_BUILD_DIR)
45
46 $(STAGING_DIR)/lib/liblzo.a: $(PKG_BUILD_DIR)/src/liblzo.la
47 $(MAKE) -C $(PKG_BUILD_DIR) \
48 CC=$(TARGET_CC) \
49 DESTDIR="$(STAGING_DIR)" \
50 install
51
52 $(PACKAGE_DIR)/$(PKG_IPK): $(STAGING_DIR)/lib/liblzo.a
53 mkdir -p $(PACKAGE_DIR)
54 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_BUILD_DIR)/ipkg/lzo lzo.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
55 mkdir -p $(PKG_BUILD_DIR)/ipkg/lzo/usr/lib
56 cp -a $(STAGING_DIR)/lib/liblzo.so* $(PKG_BUILD_DIR)/ipkg/lzo/usr/lib
57 $(STRIP) $(PKG_BUILD_DIR)/ipkg/lzo/usr/lib/*
58 $(IPKG_BUILD) $(PKG_BUILD_DIR)/ipkg/lzo $(PACKAGE_DIR)
59
60 source: $(DL_DIR)/$(PKG_SOURCE_FILE)
61 prepare: $(PKG_BUILD_DIR)/.patched
62 compile: $(STAGING_DIR)/lib/liblzo.a $(PACKAGE_DIR)/$(PKG_IPK)
63 install: $(PKG_ZLIB)
64 $(IPKG) install $(PACKAGE_DIR)/$(PKG_IPK)
65 clean:
66 rm -rf $(PKG_BUILD_DIR)
67 rm -f $(STAGING_DIR)/lib/liblzo*
68 rm -f $(PACKAGE_DIR)/lzo\*.ipk
69
This page took 0.053628 seconds and 5 git commands to generate.