[packages] Fix linking of libsdl_{mixer,sound}
[openwrt/svn-archive/archive.git] / libs / libnet-1.0.x / Makefile
1 #
2 # Copyright (C) 2006-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libnet0
11 PKG_VERSION:=1.0.2a
12 PKG_RELEASE:=8
13
14 PKG_SOURCE:=libnet-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.packetfactory.net/libnet/dist/deprecated/
16 PKG_MD5SUM:=ddf53f0f484184390e8c2a1bd0853667
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/Libnet-$(PKG_VERSION)
19 PKG_FIXUP:=libtool
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libnet0
25 SECTION:=libs
26 CATEGORY:=Libraries
27 DEPENDS:=+libpcap
28 TITLE:=Low-level packet creation library (v1.0.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 TARGET_CFLAGS += $(FPIC)
38
39 CONFIGURE_ARGS += \
40 --enable-shared \
41 --enable-static \
42 --with-pf_packet=yes
43
44 CONFIGURE_VARS += \
45 ac_cv_libnet_endianess=$(ENDIANESS) \
46 ac_libnet_have_pf_packet=yes \
47 LL_INT_TYPE=sockpacket
48
49 define Build/Configure
50 (cd $(PKG_BUILD_DIR); touch \
51 configure.in \
52 include.m4 \
53 aclocal.m4 \
54 Makefile.in \
55 configure \
56 );
57 $(call Build/Configure/Default)
58 endef
59
60 define Build/InstallDev
61 $(INSTALL_DIR) $(1)/usr/lib/libnet-1.0.x/bin/
62 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libnet-config $(1)/usr/lib/libnet-1.0.x/bin/
63 $(INSTALL_DIR) $(1)/usr/lib/libnet-1.0.x/include
64 $(CP) $(PKG_INSTALL_DIR)/usr/include/libnet* $(1)/usr/lib/libnet-1.0.x/include/
65 $(INSTALL_DIR) $(1)/usr/lib/libnet-1.0.x/lib
66 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.{a,so*} $(1)/usr/lib/libnet-1.0.x/lib/
67 endef
68
69 define Package/libnet0/install
70 $(INSTALL_DIR) $(1)/usr/lib
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.so.* $(1)/usr/lib/
72 endef
73
74 $(eval $(call BuildPackage,libnet0))