1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-12-22 23:26:47 +02:00
openwrt-packages/libphysfs/Makefile

72 lines
1.9 KiB
Makefile
Raw Normal View History

2010-07-31 15:30:52 +03:00
2010-07-30 23:11:06 +03:00
include $(TOPDIR)/rules.mk
PKG_NAME:=libphysfs
PKG_VERSION:=2.0.0
PKG_RELEASE:=1
#PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE:=physfs-2.0.0.tar.gz
2010-07-31 18:21:50 +03:00
PKG_SOURCE_URL:=http://icculus.org/physfs/downloads/
PKG_MD5SUM:=cfc53e0c193914c9c5ab522e58737373
PKG_CAT:=zcat
2010-07-30 23:11:06 +03:00
PKG_BUILD_DIR:=$(BUILD_DIR)/physfs-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/libphysfs
SECTION:=games
CATEGORY:=Games
TITLE:=PhysicsFS
URL:=http://icculus.org/physfs/
endef
define Package/libphysfs/description
PhysicsFS is a library to provide abstract access to various archives.
endef
define Build/Configure
(cd $(PKG_BUILD_DIR);\
IN_OPENWRT=1 \
AR="$(TARGET_CROSS)ar" \
AS="$(TARGET_CC) -c $(TARGET_CFLAGS)" \
LD="$(TARGET_CROSS)ld" \
NM="$(TARGET_CROSS)nm" \
CC="$(TARGET_CC)" \
GCC="$(TARGET_CC)" \
CXX="$(TARGET_CROSS)g++" \
RANLIB="$(TARGET_CROSS)ranlib" \
STRIP="$(TARGET_CROSS)strip" \
OBJCOPY="$(TARGET_CROSS)objcopy" \
OBJDUMP="$(TARGET_CROSS)objdump" \
TARGET_CPPFLAGS="$(TARGET_CPPFLAGS)" \
TARGET_CFLAGS="$(TARGET_CFLAGS)" \
TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
2010-07-31 15:30:52 +03:00
cmake .);$
2010-07-30 23:11:06 +03:00
$(call Build/Compile/Default)$
endef
2010-07-31 15:30:52 +03:00
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" \
all install
endef
define Build/InstallDev
mkdir -p $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/local/include/physfs.h $(1)/usr/include/
mkdir -p $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/local/lib/libphysfs.so* $(1)/usr/lib/
endef
2010-07-30 23:11:06 +03:00
define Package/libphysfs/install
$(INSTALL_DIR) $(1)/usr/lib
2010-07-31 15:30:52 +03:00
$(CP) $(PKG_BUILD_DIR)/libphysfs.so* $(1)/usr/lib/
2010-07-30 23:11:06 +03:00
endef
$(eval $(call BuildPackage,libphysfs))