diff options
author | Bjarni <Bjarni@openttd.org> | 2004-11-29 20:26:00 +0000 |
---|---|---|
committer | Bjarni <Bjarni@openttd.org> | 2004-11-29 20:26:00 +0000 |
commit | 4950c367690e8f740cc9c897d99c50e52fdb7bb6 (patch) | |
tree | 7351520715ce1391786b587ef32da3378178ac13 /makefiledir | |
parent | a580b4c21ee20179fa50bdab04aaeb586185fe8e (diff) | |
download | openttd-4950c367690e8f740cc9c897d99c50e52fdb7bb6.tar.xz |
(svn r856) Makefile: added the flags CYGWIN and MINGW to libdetection. They were missing in the autodetected makefile.config
Diffstat (limited to 'makefiledir')
-rw-r--r-- | makefiledir/Makefile.libdetection | 198 |
1 files changed, 100 insertions, 98 deletions
diff --git a/makefiledir/Makefile.libdetection b/makefiledir/Makefile.libdetection index 31478d3bb..8d875b105 100644 --- a/makefiledir/Makefile.libdetection +++ b/makefiledir/Makefile.libdetection @@ -1,98 +1,100 @@ -# this file detects what OS and libs the computer have/are running - -# Automatically recognize if building on Win32 -ifdef WINDIR -ifndef UNIX -WIN32:=1 -endif -else -UNIX:=1 -endif - -# Automatically recognize if building on FreeBSD -ifeq ($(shell uname),FreeBSD) -FREEBSD:=1 -endif - -# Automatically recognize if building on MacOSX -ifeq ($(VENDOR), apple) -OSX:=1 -# OSX uses the unix setup too -UNIX:=1 -endif - -# Automatically recognize if building on MorphOS -ifeq ($(shell uname), MorphOS) -MORPHOS:=1 -# MorphOS uses UNIX setup too -UNIX:=1 -endif - -# Automatically recognize if building on BeOS -ifeq ($(shell uname), BeOS) -BEOS:=1 -# BeOS uses UNIX setup too -UNIX:=1 -# Except that in BeOS 5.0 we need to use net_server, not BONE networking -ifeq ($(shell uname -r), 5.0) -BEOS_NET_SERVER:=1 -endif -endif - -# Automatically recognize if building on SunOS/Solaris -ifeq ($(shell uname), SunOS) -SUNOS:=1 -# SunOS uses UNIX setup too -UNIX:=1 -endif - -# FreeBSD uses sdl11 instead of sdl -ifdef FREEBSD -SDL-CONFIG:=sdl11-config -else -SDL-CONFIG:=sdl-config -endif - - -# Library detections -WITH_SDL:=$(shell $(SDL-CONFIG) --version 2>/dev/null) - -# libpng detection -ifdef FREEBSD -# a little hack was needed for FreeBSD because it misses libpng-config -WITH_PNG:=$(shell ls /usr/lib | grep "libpng" 2>/dev/null) $(shell \ -ls /usr/local/lib | grep "libpng" 2>/dev/null) -ifdef WITH_PNG -# makes the flag look nicer in makefile.config -WITH_PNG:=1 -endif -else -WITH_PNG:=$(shell libpng-config --version 2>/dev/null) -endif - -ifdef WITH_PNG -# LibPNG depends on Zlib -WITH_ZLIB:=1 -else -# We go looking for zlib with a little hack -WITH_ZLIB:=$(shell ls /usr/include | grep "zlib.h" 2>/dev/null) \ -$(shell ls /usr/local/include | grep "zlib.h" 2>/dev/null) -ifdef WITH_ZLIB -WITH_ZLIB:=1 -endif -endif - - -# sets the default paths -ifdef UNIX -ifndef OSX -ifndef MORPHOS -ifndef BIN_DIR -#BINARY_DIR:= -#DATA_DIR_PREFIX:= -#INSTALL_DIR:=/usr/local/ -#USE_HOMEDIR:= -endif -endif -endif -endif +# this file detects what OS and libs the computer have/are running
+
+# Automatically recognize if building on Win32
+ifdef WINDIR
+ifndef UNIX
+WIN32:=1
+CYGWIN:=1
+MINGW:=1
+endif
+else
+UNIX:=1
+endif
+
+# Automatically recognize if building on FreeBSD
+ifeq ($(shell uname),FreeBSD)
+FREEBSD:=1
+endif
+
+# Automatically recognize if building on MacOSX
+ifeq ($(VENDOR), apple)
+OSX:=1
+# OSX uses the unix setup too
+UNIX:=1
+endif
+
+# Automatically recognize if building on MorphOS
+ifeq ($(shell uname), MorphOS)
+MORPHOS:=1
+# MorphOS uses UNIX setup too
+UNIX:=1
+endif
+
+# Automatically recognize if building on BeOS
+ifeq ($(shell uname), BeOS)
+BEOS:=1
+# BeOS uses UNIX setup too
+UNIX:=1
+# Except that in BeOS 5.0 we need to use net_server, not BONE networking
+ifeq ($(shell uname -r), 5.0)
+BEOS_NET_SERVER:=1
+endif
+endif
+
+# Automatically recognize if building on SunOS/Solaris
+ifeq ($(shell uname), SunOS)
+SUNOS:=1
+# SunOS uses UNIX setup too
+UNIX:=1
+endif
+
+# FreeBSD uses sdl11 instead of sdl
+ifdef FREEBSD
+SDL-CONFIG:=sdl11-config
+else
+SDL-CONFIG:=sdl-config
+endif
+
+
+# Library detections
+WITH_SDL:=$(shell $(SDL-CONFIG) --version 2>/dev/null)
+
+# libpng detection
+ifdef FREEBSD
+# a little hack was needed for FreeBSD because it misses libpng-config
+WITH_PNG:=$(shell ls /usr/lib | grep "libpng" 2>/dev/null) $(shell \
+ls /usr/local/lib | grep "libpng" 2>/dev/null)
+ifdef WITH_PNG
+# makes the flag look nicer in makefile.config
+WITH_PNG:=1
+endif
+else
+WITH_PNG:=$(shell libpng-config --version 2>/dev/null)
+endif
+
+ifdef WITH_PNG
+# LibPNG depends on Zlib
+WITH_ZLIB:=1
+else
+# We go looking for zlib with a little hack
+WITH_ZLIB:=$(shell ls /usr/include | grep "zlib.h" 2>/dev/null) \
+$(shell ls /usr/local/include | grep "zlib.h" 2>/dev/null)
+ifdef WITH_ZLIB
+WITH_ZLIB:=1
+endif
+endif
+
+
+# sets the default paths
+ifdef UNIX
+ifndef OSX
+ifndef MORPHOS
+ifndef BIN_DIR
+#BINARY_DIR:=
+#DATA_DIR_PREFIX:=
+#INSTALL_DIR:=/usr/local/
+#USE_HOMEDIR:=
+endif
+endif
+endif
+endif
|