Parcourir la source

mingw: add pkg-support files (INSTALL.txt and Makefile)

Anonymous Maarten il y a 1 an
Parent
commit
c81d11fae4
2 fichiers modifiés avec 44 ajouts et 0 suppressions
  1. 18 0
      mingw/pkg-support/INSTALL.txt
  2. 26 0
      mingw/pkg-support/Makefile

+ 18 - 0
mingw/pkg-support/INSTALL.txt

@@ -0,0 +1,18 @@
+
+The 32-bit files are in i686-w64-mingw32
+The 64-bit files are in x86_64-w64-mingw32
+
+To install SDL for native development:
+    make native
+
+To install SDL for cross-compiling development:
+    make cross
+
+Look at the example programs in ./test, and check out online documentation:
+    http://wiki.libsdl.org/
+
+Join the SDL developer mailing list if you want to join the community:
+    http://www.libsdl.org/mailing-list.php
+
+That's it!
+Sam Lantinga <slouken@libsdl.org>

+ 26 - 0
mingw/pkg-support/Makefile

@@ -0,0 +1,26 @@
+#
+# Makefile for installing the mingw32 version of the SDL library
+
+CROSS_PATH := /usr/local
+ARCHITECTURES := i686-w64-mingw32 x86_64-w64-mingw32
+
+all install:
+	@echo "Type \"make native\" to install 32-bit to /usr"
+	@echo "Type \"make cross\" to install 32-bit and 64-bit to $(CROSS_PATH)"
+
+native:
+	make install-package arch=i686-w64-mingw32 prefix=/usr
+
+cross:
+	for arch in $(ARCHITECTURES); do \
+	    make install-package arch=$$arch prefix=$(CROSS_PATH)/$$arch; \
+	done
+
+install-package:
+	@if test -d $(arch) && test -d $(prefix); then \
+	    (cd $(arch) && cp -rv bin include lib share $(prefix)/); \
+	    sed "s|^prefix=.*|prefix=$(prefix)|" <$(arch)/lib/pkgconfig/sdl3.pc >$(prefix)/lib/pkgconfig/sdl3.pc; \
+	else \
+	    echo "*** ERROR: $(arch) or $(prefix) does not exist!"; \
+	    exit 1; \
+	fi