summaryrefslogtreecommitdiff
path: root/libphysfs/Makefile
diff options
context:
space:
mode:
authorDavid Kühling <dvdkhlng@gmx.de>2010-09-18 20:47:21 +0200
committerDavid Kühling <dvdkhlng@gmx.de>2010-09-18 20:47:21 +0200
commit4bfce3b6e2ea095ea3d9f5d2d1018cc0a1e5ce09 (patch)
tree58590463ada82a27eca0889312c32450358249a8 /libphysfs/Makefile
downloadqipackages-fork-4bfce3b6e2ea095ea3d9f5d2d1018cc0a1e5ce09.tar.gz
Major overhaul and cleanup. Support for .ubi image file installations.grafted
Only compile&install a minimum host Gforth for bootstrapping the target Gforth, removing strange emacs-dependencies that cropped up earlier. Image file can now be built on the nanonote using 'gforth-update-image' command. Also, Gforth is now run through a wrapper that calls 'gforth-update-image' automatically, if necessary. Also first attempts at supporting libcc C-interface libraries pre-compiled on the host. Tested to compile on amd64 and i386.
Diffstat (limited to 'libphysfs/Makefile')
-rw-r--r--libphysfs/Makefile71
1 files changed, 71 insertions, 0 deletions
diff --git a/libphysfs/Makefile b/libphysfs/Makefile
new file mode 100644
index 0000000..aea598c
--- /dev/null
+++ b/libphysfs/Makefile
@@ -0,0 +1,71 @@
+
+
+
+
+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
+PKG_SOURCE_URL:=http://icculus.org/physfs/downloads/
+PKG_MD5SUM:=cfc53e0c193914c9c5ab522e58737373
+PKG_CAT:=zcat
+
+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)" \
+ cmake .);$
+ $(call Build/Compile/Default)$
+endef
+
+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
+
+define Package/libphysfs/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/libphysfs.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libphysfs))