author | tron |
Wed, 17 Nov 2004 09:07:29 +0000 | |
changeset 446 | 20304ea8e94e |
parent 421 | 0b9bdcdfe0c5 |
child 526 | bd64ec8b0c00 |
permissions | -rw-r--r-- |
0 | 1 |
# this file detects what OS and libs the computer have/are running |
2 |
||
3 |
# Automatically recognize if building on Win32 |
|
4 |
ifdef WINDIR |
|
5 |
ifndef UNIX |
|
6 |
WIN32:=1 |
|
7 |
endif |
|
8 |
else |
|
9 |
UNIX:=1 |
|
10 |
endif |
|
11 |
||
12 |
# Automatically recognize if building on FreeBSD |
|
13 |
ifeq ($(shell uname),FreeBSD) |
|
14 |
FREEBSD:=1 |
|
15 |
endif |
|
16 |
||
17 |
# Automatically recognize if building on MacOSX |
|
18 |
ifeq ($(VENDOR), apple) |
|
19 |
OSX:=1 |
|
20 |
# OSX uses the unix setup too |
|
21 |
UNIX:=1 |
|
22 |
endif |
|
23 |
||
24 |
# Automatically recognize if building on MorphOS |
|
25 |
ifeq ($(shell uname), MorphOS) |
|
26 |
MORPHOS:=1 |
|
27 |
# MorphOS uses UNIX setup too |
|
28 |
UNIX:=1 |
|
29 |
endif |
|
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 | 49 |
# FreeBSD uses sdl11 instead of sdl |
50 |
ifdef FREEBSD |
|
51 |
SDL-CONFIG:=sdl11-config |
|
52 |
else |
|
53 |
SDL-CONFIG:=sdl-config |
|
54 |
endif |
|
55 |
||
56 |
||
57 |
# Library detections |
|
58 |
WITH_SDL:=$(shell $(SDL-CONFIG) --version 2>/dev/null) |
|
59 |
||
60 |
# libpng detection |
|
61 |
ifdef FREEBSD |
|
62 |
# a little hack was needed for FreeBSD because it misses libpng-config |
|
63 |
WITH_PNG:=$(shell ls /usr/lib | grep "libpng" 2>/dev/null) $(shell \ |
|
64 |
ls /usr/local/lib | grep "libpng" 2>/dev/null) |
|
65 |
ifdef WITH_PNG |
|
66 |
# makes the flag look nicer in makefile.config |
|
67 |
WITH_PNG:=1 |
|
68 |
endif |
|
69 |
else |
|
70 |
WITH_PNG:=$(shell libpng-config --version 2>/dev/null) |
|
71 |
endif |
|
72 |
||
73 |
ifdef WITH_PNG |
|
74 |
# LibPNG depends on Zlib |
|
75 |
WITH_ZLIB:=1 |
|
76 |
else |
|
77 |
# We go looking for zlib with a little hack |
|
78 |
WITH_ZLIB:=$(shell ls /usr/include | grep "zlib.h" 2>/dev/null) \ |
|
79 |
$(shell ls /usr/local/include | grep "zlib.h" 2>/dev/null) |
|
80 |
ifdef WITH_ZLIB |
|
81 |
WITH_ZLIB:=1 |
|
82 |
endif |
|
83 |
endif |
|
84 |
||
85 |
||
86 |
# sets the default paths |
|
87 |
ifdef UNIX |
|
88 |
ifndef OSX |
|
89 |
ifndef MORPHOS |
|
90 |
ifndef BIN_DIR |
|
91 |
#BINARY_DIR:= |
|
92 |
#DATA_DIR_PREFIX:= |
|
93 |
#INSTALL_DIR:=/usr/local/ |
|
94 |
#USE_HOMEDIR:= |
|
95 |
endif |
|
96 |
endif |
|
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 |