2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
).
tar.gz
16 PKG_SOURCE_URL
:=http
://www.packetfactory.net
/libnet
/dist/
17 PKG_MD5SUM
:=be845c41170d72c7db524f3411b50256
19 PKG_BUILD_DIR
:=$(BUILD_DIR
)/libnet
21 include $(INCLUDE_DIR
)/package.mk
23 define Package
/libnet1
27 TITLE
:=Low-level packet creation library
(v1.1.x
)
28 URL
:=http
://www.packetfactory.net
/libnet
/
32 ifeq ($(CONFIG_BIG_ENDIAN
),y
)
36 TARGET_CFLAGS
+= $(FPIC
)
44 ac_cv_libnet_endianess
=$(ENDIANESS
) \
45 ac_libnet_have_pf_packet
=yes \
48 define Build
/Configure
49 (cd
$(PKG_BUILD_DIR
); touch \
56 $(call Build
/Configure
/Default
)
60 # pass CFLAGS again to override -O2 set by configure
61 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
62 CFLAGS
="$(TARGET_CFLAGS)" \
63 DESTDIR
="$(PKG_INSTALL_DIR)" \
67 define Build
/InstallDev
68 mkdir
-p
$(1)/usr
/lib
/libnet-1.1.x
/bin
69 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/libnet-config
$(1)/usr
/lib
/libnet-1.1.x
/bin
/
70 mkdir
-p
$(1)/usr
/lib
/libnet-1.1.x
/include
71 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/libnet
* $(1)/usr
/lib
/libnet-1.1.x
/include/
72 mkdir
-p
$(1)/usr
/lib
/libnet-1.1.x
/lib
73 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libnet.
{a
,so
*} $(1)/usr
/lib
/libnet-1.1.x
/lib
/
76 define Package
/libnet1
/install
77 $(INSTALL_DIR
) $(1)/usr
/lib
78 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libnet.so.
* $(1)/usr
/lib
/
81 $(eval
$(call BuildPackage
,libnet1
))