Add physfs 2+ cross compilation.
parent
a6e2291025
commit
eb60d35864
|
@ -16,6 +16,7 @@ EXTRA_DIST = __BUILD_SCRIPT \
|
|||
libs/iconv/Makefile \
|
||||
libs/ogg/Makefile \
|
||||
libs/png/Makefile \
|
||||
libs/physfs/Makefile \
|
||||
libs/quesoglc/Makefile \
|
||||
libs/quesoglc/patches \
|
||||
libs/sdl/Makefile \
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
SET(CMAKE_SYSTEM_NAME Windows)
|
||||
SET(CMAKE_C_COMPILER i586-mingw32msvc-gcc)
|
||||
|
||||
SET(CMAKE_CXX_COMPILER i586-mingw32msvc-g++)
|
||||
|
||||
# Define paths to search for libraries
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc/ ${CMAKE_SOURCE_DIR}/win32/build/libs/)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
|
||||
# Don't search in native paths, just the specified root paths
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
# FIXME CMake's defaults struggle to find these
|
||||
SET(OPENAL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/win32/build/libs/include/AL)
|
||||
SET(OPENAL_LIBRARY ${CMAKE_SOURCE_DIR}/win32/build/libs/lib/libopenal32.a)
|
||||
# Our openal lib doesn't have correct capitalisation (e.g. OpenAL or al or openal or OpenAL32) , which causes issues.
|
||||
|
||||
SET(SDL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/win32/build/libs/include/SDL)
|
||||
|
||||
SET(NEED_DEP_DEPS TRUE) # Our CC dev pkg don't link the deps of the deps, so we need to do this
|
||||
|
||||
SET(MINGW TRUE) # just in case...
|
|
@ -1,4 +1,4 @@
|
|||
SUBDIRS=dejavu devpkg expat freetype2 gettext iconv zlib fontconfig ogg png quesoglc sdl vorbis theora
|
||||
SUBDIRS=dejavu devpkg expat freetype2 gettext iconv zlib physfs fontconfig ogg png quesoglc sdl vorbis theora
|
||||
|
||||
all: all-recursive
|
||||
build: build-recursive
|
||||
|
|
|
@ -15,7 +15,7 @@ extract-stamp: $(DOWNLOADS)/$(PKG_SOURCE)
|
|||
echo mkdir -p $(TOPDIR)/build/libs ; \
|
||||
mkdir -p $(TOPDIR)/build/libs || exit ; \
|
||||
}
|
||||
tar -x -j -C $(TOPDIR)/build/libs -f $^
|
||||
tar -x --keep-newer-files -j -C $(TOPDIR)/build/libs -f $^
|
||||
touch extract-stamp
|
||||
|
||||
all: build
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
PKG_NAME:=physfs
|
||||
PKG_VERSION=2.0.2
|
||||
|
||||
PKG_SOURCEBASE:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE:=$(PKG_SOURCEBASE).tar.gz
|
||||
PKG_SOURCE_URL:= \
|
||||
http://icculus.org/physfs/downloads/
|
||||
PKG_MD5SUM:=4e8927c3d30279b03e2592106eb9184a
|
||||
|
||||
TARGET:=$(TOPDIR)/build/libs/lib/libphysfs.a
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
extract-stamp: $(DOWNLOADS)/$(PKG_SOURCE)
|
||||
tar xvzf $^
|
||||
touch extract-stamp
|
||||
|
||||
$(PKG_SOURCEBASE)/Makefile: extract-stamp
|
||||
cd $(PKG_SOURCEBASE) && cmake -DCMAKE_TOOLCHAIN_FILE=`pwd`/../$(TOPDIR)/Toolchain-mingw32.cmake -DCMAKE_INSTALL_PREFIX=`pwd`/../$(TOPDIR)/build/libs -DPHYSFS_BUILD_SHARED=FALSE -DPHYSFS_INTERNAL_ZLIB=FALSE -DZLIB_INCLUDE_DIR=`pwd`/../$(TOPDIR)/build/libs/include -DZLIB_LIBRARY=`pwd`/../$(TOPDIR)/build/libs/lib/libz.a -DPHYSFS_BUILD_TEST=FALSE -DPHYSFS_BUILD_WX_TEST=FALSE .
|
||||
|
||||
$(TARGET): $(PKG_SOURCEBASE)/Makefile
|
||||
$(MAKE) -C $(PKG_SOURCEBASE) $(MAKE_FLAGS) install
|
||||
|
||||
all: build
|
||||
build: $(TARGET)
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(PKG_SOURCEBASE) clean
|
||||
|
||||
.PHONY: all build clean
|
Loading…
Reference in New Issue