remove UninstallDev
[openwrt/svn-archive/archive.git] / libs / libnet-1.1.x / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=libnet
12 PKG_VERSION:=1.1.2.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME).tar.gz
16 PKG_SOURCE_URL:=http://www.packetfactory.net/libnet/dist/
17 PKG_MD5SUM:=be845c41170d72c7db524f3411b50256
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/libnet
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libnet1
25 SECTION:=libs
26 CATEGORY:=Libraries
27 DEPENDS:=+libpcap
28 TITLE:=Low-level packet creation library (v1.1.x)
29 URL:=http://www.packetfactory.net/libnet/
30 endef
31
32 ENDIANESS:=lil
33 ifeq ($(CONFIG_BIG_ENDIAN),y)
34 ENDIANESS:=big
35 endif
36
37 CONFIGURE_ARGS += \
38 --enable-shared \
39 --enable-static \
40 --with-pf_packet=yes
41
42 CONFIGURE_VARS += \
43 ac_cv_libnet_endianess=$(ENDIANESS) \
44 ac_libnet_have_pf_packet=yes \
45 LL_INT_TYPE=linux
46
47 define Build/Configure
48 (cd $(PKG_BUILD_DIR); touch \
49 configure.in \
50 include.m4 \
51 aclocal.m4 \
52 Makefile.in \
53 configure \
54 );
55 $(call Build/Configure/Default)
56 endef
57
58 define Build/Compile
59 # pass CFLAGS again to override -O2 set by configure
60 $(MAKE) -C $(PKG_BUILD_DIR) \
61 CFLAGS="$(TARGET_CFLAGS)" \
62 DESTDIR="$(PKG_INSTALL_DIR)" \
63 all install
64 endef
65
66 define Build/InstallDev
67 mkdir -p $(1)/usr/lib/libnet-1.1.x/bin
68 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libnet-config $(1)/usr/lib/libnet-1.1.x/bin/
69 mkdir -p $(1)/usr/lib/libnet-1.1.x/include
70 $(CP) $(PKG_INSTALL_DIR)/usr/include/libnet* $(1)/usr/lib/libnet-1.1.x/include/
71 mkdir -p $(1)/usr/lib/libnet-1.1.x/lib
72 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.{a,so*} $(1)/usr/lib/libnet-1.1.x/lib/
73 endef
74
75 define Package/libnet1/install
76 $(INSTALL_DIR) $(1)/usr/lib
77 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.so.* $(1)/usr/lib/
78 endef
79
80 $(eval $(call BuildPackage,libnet1))