adc0a652b6d490e67c99f127b2976c7d5efb5a4e
[openwrt.git] / openwrt / package / linux-atm / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=linux-atm
6 PKG_VERSION:=2.4.1
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=84fef49cc39ff2605204246666f65864
9
10 PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/l/linux-atm/
11 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 ifneq ($(BOARD),ar7)
20 BR2_PACKAGE_LINUX_ATM:=m
21 endif
22
23 $(eval $(call PKG_template,LINUX_ATM,linux-atm,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
24
25 $(PKG_BUILD_DIR)/.configured:
26 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
27 autoconf; \
28 touch configure.in ; \
29 touch acinclude.m4 ; \
30 touch aclocal.m4 ; \
31 touch Makefile.in ; \
32 touch config.h.in ; \
33 touch configure ; \
34 $(TARGET_CONFIGURE_OPTS) \
35 CFLAGS="$(TARGET_CFLAGS)" \
36 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
37 LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
38 ./configure \
39 --target=$(GNU_TARGET_NAME) \
40 --host=$(GNU_TARGET_NAME) \
41 --build=$(GNU_HOST_NAME) \
42 --program-prefix="" \
43 --program-suffix="" \
44 --prefix=/usr \
45 --exec-prefix=/usr \
46 --bindir=/usr/bin \
47 --datadir=/usr/share \
48 --includedir=/usr/include/ \
49 --infodir=/usr/share/info \
50 --libdir=/usr/lib \
51 --libexecdir=/usr/lib \
52 --localstatedir=/var \
53 --mandir=/usr/share/man \
54 --sbindir=/usr/sbin \
55 --sysconfdir=/etc \
56 )
57 touch $@
58
59 $(PKG_BUILD_DIR)/.built:
60 rm -rf $(PKG_INSTALL_DIR)
61 mkdir -p $(PKG_INSTALL_DIR)
62 $(MAKE) -C $(PKG_BUILD_DIR) \
63 DESTDIR="$(PKG_INSTALL_DIR)" \
64 all install
65 touch $@
66
67 $(IPKG_LINUX_ATM):
68 install -d -m0755 $(IDIR_LINUX_ATM)/usr/lib
69 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libatm.so.* $(IDIR_LINUX_ATM)/usr/lib
70 install -d -m0755 $(IDIR_LINUX_ATM)/usr/sbin
71 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/br2684ctl $(IDIR_LINUX_ATM)/usr/sbin/
72 $(RSTRIP) $(IDIR_LINUX_ATM)/
73 $(IPKG_BUILD) $(IDIR_LINUX_ATM) $(PACKAGE_DIR)
74
75 $(STAGING_DIR)/usr/lib/libatm.so: $(PKG_BUILD_DIR)/.built
76 mkdir -p $(STAGING_DIR)/usr/include
77 cp -fpR $(PKG_INSTALL_DIR)/usr/include/atm{,d,sap}.h $(STAGING_DIR)/usr/include/
78 mkdir -p $(STAGING_DIR)/usr/lib
79 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libatm.{a,so*} $(STAGING_DIR)/usr/lib/
80 touch $@
81
82 install-dev: $(STAGING_DIR)/usr/lib/libatm.so
83
84 uninstall-dev:
85 rm -rf \
86 $(STAGING_DIR)/usr/include/atm{,d,sap}.h \
87 $(STAGING_DIR)/usr/lib/libatm.{a,so*} \
88
89 compile: install-dev
90
91 clean: uninstall-dev
92
93 mostlyclean:
94 $(MAKE) -C $(PKG_BUILD_DIR) clean
95 rm -f $(PKG_BUILD_DIR)/.built
96
This page took 0.043335 seconds and 3 git commands to generate.