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