truelight@0: # this file detects what OS and libs the computer have/are running truelight@0: truelight@0: # Automatically recognize if building on Win32 truelight@0: ifdef WINDIR truelight@0: ifndef UNIX truelight@0: WIN32:=1 truelight@0: endif truelight@0: else truelight@0: UNIX:=1 truelight@0: endif truelight@0: truelight@0: # Automatically recognize if building on FreeBSD truelight@0: ifeq ($(shell uname),FreeBSD) truelight@0: FREEBSD:=1 truelight@0: endif truelight@0: truelight@0: # Automatically recognize if building on MacOSX truelight@0: ifeq ($(VENDOR), apple) truelight@0: OSX:=1 truelight@0: # OSX uses the unix setup too truelight@0: UNIX:=1 truelight@0: endif truelight@0: truelight@0: # Automatically recognize if building on MorphOS truelight@0: ifeq ($(shell uname), MorphOS) truelight@0: MORPHOS:=1 truelight@0: # MorphOS uses UNIX setup too truelight@0: UNIX:=1 truelight@0: endif truelight@0: tron@421: # Automatically recognize if building on BeOS tron@421: ifeq ($(shell uname), BeOS) tron@421: BEOS:=1 tron@421: # BeOS uses UNIX setup too tron@421: UNIX:=1 tron@421: # Except that in BeOS 5.0 we need to use net_server, not BONE networking tron@421: ifeq ($(shell uname -r), 5.0) tron@421: BEOS_NET_SERVER:=1 tron@421: endif tron@421: endif tron@421: tron@446: # Automatically recognize if building on SunOS/Solaris tron@446: ifeq ($(shell uname), SunOS) tron@446: SUNOS:=1 tron@446: # SunOS uses UNIX setup too tron@446: UNIX:=1 tron@446: endif tron@446: truelight@0: # FreeBSD uses sdl11 instead of sdl truelight@0: ifdef FREEBSD truelight@0: SDL-CONFIG:=sdl11-config truelight@0: else truelight@0: SDL-CONFIG:=sdl-config truelight@0: endif truelight@0: truelight@0: truelight@0: # Library detections truelight@0: WITH_SDL:=$(shell $(SDL-CONFIG) --version 2>/dev/null) truelight@0: truelight@0: # libpng detection truelight@0: ifdef FREEBSD truelight@0: # a little hack was needed for FreeBSD because it misses libpng-config truelight@0: WITH_PNG:=$(shell ls /usr/lib | grep "libpng" 2>/dev/null) $(shell \ truelight@0: ls /usr/local/lib | grep "libpng" 2>/dev/null) truelight@0: ifdef WITH_PNG truelight@0: # makes the flag look nicer in makefile.config truelight@0: WITH_PNG:=1 truelight@0: endif truelight@0: else truelight@0: WITH_PNG:=$(shell libpng-config --version 2>/dev/null) truelight@0: endif truelight@0: truelight@0: ifdef WITH_PNG truelight@0: # LibPNG depends on Zlib truelight@0: WITH_ZLIB:=1 truelight@0: else truelight@0: # We go looking for zlib with a little hack truelight@0: WITH_ZLIB:=$(shell ls /usr/include | grep "zlib.h" 2>/dev/null) \ truelight@0: $(shell ls /usr/local/include | grep "zlib.h" 2>/dev/null) truelight@0: ifdef WITH_ZLIB truelight@0: WITH_ZLIB:=1 truelight@0: endif truelight@0: endif truelight@0: truelight@0: truelight@0: # sets the default paths truelight@0: ifdef UNIX truelight@0: ifndef OSX truelight@0: ifndef MORPHOS truelight@0: ifndef BIN_DIR truelight@0: #BINARY_DIR:= truelight@0: #DATA_DIR_PREFIX:= truelight@0: #INSTALL_DIR:=/usr/local/ truelight@0: #USE_HOMEDIR:= truelight@0: endif truelight@0: endif truelight@0: endif tron@421: endif