Merged enhancements submitted by Stereo, thanks, closes #188 and #189
[openwrt.git] / package / gsm / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=gsm
6 PKG_VERSION:=1.0.10
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=
9
10 PKG_SOURCE_URL:=ftp://ftp.cs.tu-berlin.de/pub/local/kbs/tubmik/gsm/
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-1.0-pl10
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 $(eval $(call PKG_template,LIBGSM,libgsm,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20 $(eval $(call PKG_template,GSM_UTILS,gsm-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
21
22 $(PKG_BUILD_DIR)/.configured:
23 touch $@
24
25 $(PKG_BUILD_DIR)/.built:
26 rm -rf $(PKG_INSTALL_DIR)
27 mkdir -p $(PKG_INSTALL_DIR)
28 $(MAKE) -C $(PKG_BUILD_DIR) \
29 $(TARGET_CONFIGURE_OPTS) \
30 LD="$(TARGET_CC)" \
31 COPTS="$(TARGET_CFLAGS)" \
32 INSTALL_ROOT="$(PKG_INSTALL_DIR)" \
33 all install
34 touch $@
35
36 $(IPKG_LIBGSM):
37 install -d -m0755 $(IDIR_LIBGSM)/usr/lib
38 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgsm.so.* $(IDIR_LIBGSM)/usr/lib/
39 $(RSTRIP) $(IDIR_LIBGSM)
40 $(IPKG_BUILD) $(IDIR_LIBGSM) $(PACKAGE_DIR)
41
42 $(IPKG_GSM_UTILS):
43 install -d -m0755 $(IDIR_GSM_UTILS)/usr/bin
44 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/* $(IDIR_GSM_UTILS)/usr/bin/
45 $(RSTRIP) $(IDIR_GSM_UTILS)
46 $(IPKG_BUILD) $(IDIR_GSM_UTILS) $(PACKAGE_DIR)
47
48 $(STAGING_DIR)/usr/lib/libgsm.so: $(PKG_BUILD_DIR)/.built
49 mkdir -p $(STAGING_DIR)/usr/include
50 cp -fpR $(PKG_INSTALL_DIR)/usr/include/gsm.h $(STAGING_DIR)/usr/include/
51 mkdir -p $(STAGING_DIR)/usr/lib
52 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgsm.a $(STAGING_DIR)/usr/lib/
53 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgsm.so* $(STAGING_DIR)/usr/lib/
54 touch $@
55
56 install-dev: $(STAGING_DIR)/usr/lib/libgsm.so
57
58 uninstall-dev:
59 rm -rf \
60 $(STAGING_DIR)/usr/include/gsm.h \
61 $(STAGING_DIR)/usr/lib/libgsm.a \
62 $(STAGING_DIR)/usr/lib/libgsm.so* \
63
64 compile-targets: install-dev
65 clean-targets: uninstall-dev
66
67 mostlyclean:
68 -$(MAKE) -C $(PKG_BUILD_DIR) clean
69 rm -f $(PKG_BUILD_DIR)/.built
70
This page took 0.055606 seconds and 5 git commands to generate.