libfixgl/Makefile |
| 1 | # |
| 2 | # Copyright (C) Xiangfu Liu <xiangfu@sharism.cc> |
| 3 | # This is free software, licensed under the GNU General Public License v2. |
| 4 | # See /LICENSE for more information. |
| 5 | # |
| 6 | |
| 7 | include $(TOPDIR)/rules.mk |
| 8 | |
| 9 | PKG_NAME:=libfixgl |
| 10 | PKG_REV:=17 |
| 11 | PKG_VERSION:=r$(PKG_REV) |
| 12 | PKG_RELEASE:=1 |
| 13 | |
| 14 | PKG_SOURCE_PROTO:=svn |
| 15 | PKG_SOURCE_VERSION:=$(PKG_REV) |
| 16 | PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) |
| 17 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
| 18 | PKG_SOURCE_URL:=https://libfixgl.svn.sourceforge.net/svnroot/libfixgl |
| 19 | PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/ |
| 20 | |
| 21 | include $(INCLUDE_DIR)/package.mk |
| 22 | |
| 23 | define Package/libfixgl |
| 24 | MAINTAINER:="Xiangfu Liu" <xiangfu@sharism.cc> |
| 25 | SECTION:=libs |
| 26 | CATEGORY:=Libraries |
| 27 | TITLE:=Libfixgl |
| 28 | URL:=http://code.google.com/p/libfixgl/ |
| 29 | DEPENDS:=+libsdl +libpng |
| 30 | endef |
| 31 | |
| 32 | define Package/libfixgl/description |
| 33 | libfixgl, is an implementation of the OpenGL standard for realtime 3D graphics, based on fixed point arithmetic. |
| 34 | endef |
| 35 | |
| 36 | define Build/Compile |
| 37 | $(call Build/Compile/Default) |
| 38 | (cd $(PKG_BUILD_DIR)/example/lord/; \ |
| 39 | make CC="$(TARGET_CC)" \ |
| 40 | CFLAGS="\ |
| 41 | $(TARGET_CFLAGS) \ |
| 42 | -std=gnu89 -pedantic -Wall \ |
| 43 | -I../../src \ |
| 44 | `$(SDL_CONFIG) --cflags` \ |
| 45 | -I$(STAGING_DIR)/usr/include \ |
| 46 | -I$(STAGING_DIR)/usr/include/SDL" \ |
| 47 | LDFLAGS="$(TARGET_LDFLAGS) \ |
| 48 | `$(SDL_CONFIG) --libs` \ |
| 49 | -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ |
| 50 | -L$(STAGING_DIR)/usr/lib/SDL \ |
| 51 | -lm -lpng -lz -lpthread -lSDL -ldirectfb -lfusion") |
| 52 | endef |
| 53 | |
| 54 | define Build/InstallDev |
| 55 | $(INSTALL_DIR) $(1)/usr/lib/libfixgl/include |
| 56 | $(INSTALL_DATA) $(PKG_BUILD_DIR)/libGL.a $(1)/usr/lib/libfixgl/ |
| 57 | $(CP) $(PKG_BUILD_DIR)/src/*.h $(1)/usr/lib/libfixgl/include |
| 58 | endef |
| 59 | |
| 60 | define Package/libfixgl/install |
| 61 | $(INSTALL_DIR) $(1)/usr/lib/libfixgl |
| 62 | $(INSTALL_DATA) $(PKG_BUILD_DIR)/libGL.a $(1)/usr/lib/libfixgl/ |
| 63 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/example/lord/example $(1)/usr/lib/libfixgl/ |
| 64 | endef |
| 65 | |
| 66 | $(eval $(call BuildPackage,libfixgl)) |