author | tron |
Mon, 15 Nov 2004 07:53:09 +0000 | |
changeset 421 | 3dd9b5a439af |
parent 0 | 29654efe3188 |
child 446 | 7a92ca9738e2 |
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
3dd9b5a439af
(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 |
3dd9b5a439af
(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) |
3dd9b5a439af
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
0
diff
changeset
|
33 |
BEOS:=1 |
3dd9b5a439af
(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 |
3dd9b5a439af
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
0
diff
changeset
|
35 |
UNIX:=1 |
3dd9b5a439af
(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 |
3dd9b5a439af
(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) |
3dd9b5a439af
(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 |
3dd9b5a439af
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
0
diff
changeset
|
39 |
endif |
3dd9b5a439af
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
0
diff
changeset
|
40 |
endif |
3dd9b5a439af
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
0
diff
changeset
|
41 |
|
0 | 42 |
# FreeBSD uses sdl11 instead of sdl |
43 |
ifdef FREEBSD |
|
44 |
SDL-CONFIG:=sdl11-config |
|
45 |
else |
|
46 |
SDL-CONFIG:=sdl-config |
|
47 |
endif |
|
48 |
||
49 |
||
50 |
# Library detections |
|
51 |
WITH_SDL:=$(shell $(SDL-CONFIG) --version 2>/dev/null) |
|
52 |
||
53 |
# libpng detection |
|
54 |
ifdef FREEBSD |
|
55 |
# a little hack was needed for FreeBSD because it misses libpng-config |
|
56 |
WITH_PNG:=$(shell ls /usr/lib | grep "libpng" 2>/dev/null) $(shell \ |
|
57 |
ls /usr/local/lib | grep "libpng" 2>/dev/null) |
|
58 |
ifdef WITH_PNG |
|
59 |
# makes the flag look nicer in makefile.config |
|
60 |
WITH_PNG:=1 |
|
61 |
endif |
|
62 |
else |
|
63 |
WITH_PNG:=$(shell libpng-config --version 2>/dev/null) |
|
64 |
endif |
|
65 |
||
66 |
ifdef WITH_PNG |
|
67 |
# LibPNG depends on Zlib |
|
68 |
WITH_ZLIB:=1 |
|
69 |
else |
|
70 |
# We go looking for zlib with a little hack |
|
71 |
WITH_ZLIB:=$(shell ls /usr/include | grep "zlib.h" 2>/dev/null) \ |
|
72 |
$(shell ls /usr/local/include | grep "zlib.h" 2>/dev/null) |
|
73 |
ifdef WITH_ZLIB |
|
74 |
WITH_ZLIB:=1 |
|
75 |
endif |
|
76 |
endif |
|
77 |
||
78 |
||
79 |
# sets the default paths |
|
80 |
ifdef UNIX |
|
81 |
ifndef OSX |
|
82 |
ifndef MORPHOS |
|
83 |
ifndef BIN_DIR |
|
84 |
#BINARY_DIR:= |
|
85 |
#DATA_DIR_PREFIX:= |
|
86 |
#INSTALL_DIR:=/usr/local/ |
|
87 |
#USE_HOMEDIR:= |
|
88 |
endif |
|
89 |
endif |
|
90 |
endif |
|
421
3dd9b5a439af
(svn r619) Add the necessary bits to make building under BeOS using GNU Make work
tron
parents:
0
diff
changeset
|
91 |
endif |