Home | History | Annotate | Download | only in sdl2_ttf
      1 #
      2 # Makefile for installing the mingw32 version of the SDL2_ttf library
      3 
      4 CROSS_PATH := /usr/local/cross-tools
      5 ARCHITECTURES := i686-w64-mingw32 x86_64-w64-mingw32
      6 
      7 all install:
      8 	@echo "Type \"make native\" to install 32-bit to /usr"
      9 	@echo "Type \"make cross\" to install 32-bit and 64-bit to $(CROSS_PATH)"
     10 
     11 native:
     12 	make install-package arch=i686-w64-mingw32 prefix=/usr
     13 
     14 cross:
     15 	for arch in $(ARCHITECTURES); do \
     16 	    make install-package arch=$$arch prefix=$(CROSS_PATH)/$$arch; \
     17 	done
     18 
     19 install-package:
     20 	@if test -d $(arch) && test -d $(prefix); then \
     21 	    (cd $(arch) && cp -rv bin include lib $(prefix)/); \
     22 	    sed "s|^libdir=.*|libdir=\'$(prefix)/lib\'|" <$(arch)/lib/libSDL2_ttf.la >$(prefix)/lib/libSDL2_ttf.la; \
     23 	else \
     24 	    echo "*** ERROR: $(arch) or $(prefix) does not exist!"; \
     25 	    exit 1; \
     26 	fi
     27