makefiledir/Makefile.libdetection
author tron
Wed, 17 Nov 2004 09:07:29 +0000
changeset 446 20304ea8e94e
parent 421 0b9bdcdfe0c5
child 526 bd64ec8b0c00
permissions -rw-r--r--
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     1
# this file detects what OS and libs the computer have/are running
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     2
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     3
# Automatically recognize if building on Win32
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     4
ifdef WINDIR
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     5
ifndef UNIX
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     6
WIN32:=1
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     7
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     8
else
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     9
UNIX:=1
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    10
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    11
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    12
# Automatically recognize if building on FreeBSD
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    13
ifeq ($(shell uname),FreeBSD)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    14
FREEBSD:=1
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    15
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    16
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    17
# Automatically recognize if building on MacOSX
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    18
ifeq ($(VENDOR), apple)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    19
OSX:=1
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    20
# OSX uses the unix setup too
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    21
UNIX:=1
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    22
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    23
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    24
# Automatically recognize if building on MorphOS
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    25
ifeq ($(shell uname), MorphOS)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    26
MORPHOS:=1
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    27
# MorphOS uses UNIX setup too
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    28
UNIX:=1
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    29
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    30
421
0b9bdcdfe0c5 (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 0
diff changeset
    31
# Automatically recognize if building on BeOS
0b9bdcdfe0c5 (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 0
diff changeset
    32
ifeq ($(shell uname), BeOS)
0b9bdcdfe0c5 (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 0
diff changeset
    33
BEOS:=1
0b9bdcdfe0c5 (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 0
diff changeset
    34
# BeOS uses UNIX setup too
0b9bdcdfe0c5 (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 0
diff changeset
    35
UNIX:=1
0b9bdcdfe0c5 (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 0
diff changeset
    36
# Except that in BeOS 5.0 we need to use net_server, not BONE networking
0b9bdcdfe0c5 (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 0
diff changeset
    37
ifeq ($(shell uname -r), 5.0)
0b9bdcdfe0c5 (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 0
diff changeset
    38
BEOS_NET_SERVER:=1
0b9bdcdfe0c5 (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 0
diff changeset
    39
endif
0b9bdcdfe0c5 (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 0
diff changeset
    40
endif
0b9bdcdfe0c5 (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 0
diff changeset
    41
446
20304ea8e94e (svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents: 421
diff changeset
    42
# Automatically recognize if building on SunOS/Solaris
20304ea8e94e (svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents: 421
diff changeset
    43
ifeq ($(shell uname), SunOS)
20304ea8e94e (svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents: 421
diff changeset
    44
SUNOS:=1
20304ea8e94e (svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents: 421
diff changeset
    45
# SunOS uses UNIX setup too
20304ea8e94e (svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents: 421
diff changeset
    46
UNIX:=1
20304ea8e94e (svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents: 421
diff changeset
    47
endif
20304ea8e94e (svn r655) Add the necessary bits to make building on SunOS/Solaris work
tron
parents: 421
diff changeset
    48
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    49
# FreeBSD uses sdl11 instead of sdl
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    50
ifdef FREEBSD
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    51
SDL-CONFIG:=sdl11-config
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    52
else
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    53
SDL-CONFIG:=sdl-config
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    54
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    55
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    56
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    57
# Library detections
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    58
WITH_SDL:=$(shell $(SDL-CONFIG) --version 2>/dev/null)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    59
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    60
# libpng detection
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    61
ifdef FREEBSD
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    62
# a little hack was needed for FreeBSD because it misses libpng-config
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    63
WITH_PNG:=$(shell ls /usr/lib | grep "libpng" 2>/dev/null) $(shell \
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    64
ls /usr/local/lib | grep "libpng" 2>/dev/null)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    65
ifdef WITH_PNG
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    66
# makes the flag look nicer in makefile.config
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    67
WITH_PNG:=1
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    68
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    69
else
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    70
WITH_PNG:=$(shell libpng-config --version 2>/dev/null)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    71
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    72
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    73
ifdef WITH_PNG
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    74
# LibPNG depends on Zlib
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    75
WITH_ZLIB:=1
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    76
else
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    77
# We go looking for zlib with a little hack
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    78
WITH_ZLIB:=$(shell ls /usr/include | grep "zlib.h" 2>/dev/null) \
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    79
$(shell ls /usr/local/include | grep "zlib.h" 2>/dev/null)
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    80
ifdef WITH_ZLIB
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    81
WITH_ZLIB:=1
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    82
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    83
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    84
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    85
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    86
# sets the default paths
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    87
ifdef UNIX
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    88
ifndef OSX
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    89
ifndef MORPHOS
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    90
ifndef BIN_DIR
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    91
#BINARY_DIR:=
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    92
#DATA_DIR_PREFIX:=
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    93
#INSTALL_DIR:=/usr/local/
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    94
#USE_HOMEDIR:=
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    95
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    96
endif
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    97
endif
421
0b9bdcdfe0c5 (svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents: 0
diff changeset
    98
endif