author | peter1138 |
Mon, 23 Oct 2006 18:45:43 +0000 | |
changeset 4930 | 708801d486c6 |
parent 4628 | b71682c27b5e |
child 5108 | aeaef6fe53b7 |
permissions | -rw-r--r-- |
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
1 |
# this file detects what OS and libs the computer have/are running |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
2 |
|
3083
8afc31558162
(svn r3672) -Fix: [makefile] fixed bug where some settings where overwritten with the default ones when MAKEFILE_VERSION was changed
bjarni
parents:
2736
diff
changeset
|
3 |
ifndef CONFIG_VERSION |
8afc31558162
(svn r3672) -Fix: [makefile] fixed bug where some settings where overwritten with the default ones when MAKEFILE_VERSION was changed
bjarni
parents:
2736
diff
changeset
|
4 |
CONFIG_VERSION:=0 |
8afc31558162
(svn r3672) -Fix: [makefile] fixed bug where some settings where overwritten with the default ones when MAKEFILE_VERSION was changed
bjarni
parents:
2736
diff
changeset
|
5 |
endif |
8afc31558162
(svn r3672) -Fix: [makefile] fixed bug where some settings where overwritten with the default ones when MAKEFILE_VERSION was changed
bjarni
parents:
2736
diff
changeset
|
6 |
|
8afc31558162
(svn r3672) -Fix: [makefile] fixed bug where some settings where overwritten with the default ones when MAKEFILE_VERSION was changed
bjarni
parents:
2736
diff
changeset
|
7 |
ifeq ($(shell expr $(CONFIG_VERSION) \< 9), 1) |
8afc31558162
(svn r3672) -Fix: [makefile] fixed bug where some settings where overwritten with the default ones when MAKEFILE_VERSION was changed
bjarni
parents:
2736
diff
changeset
|
8 |
|
3197
078a10118842
(svn r3864) -Fix: small problems with make-system, making room for a wrapper-configure
truelight
parents:
3083
diff
changeset
|
9 |
ifndef BYPASS_OS_DETECT |
078a10118842
(svn r3864) -Fix: small problems with make-system, making room for a wrapper-configure
truelight
parents:
3083
diff
changeset
|
10 |
|
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
11 |
# Automatically recognize if building on Win32 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
12 |
ifdef WINDIR |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
13 |
ifndef UNIX |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
14 |
WIN32:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
15 |
CYGWIN:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
16 |
MINGW:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
17 |
STATIC:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
18 |
SKIP_STATIC_CHECK:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
19 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
20 |
else |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
21 |
UNIX:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
22 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
23 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
24 |
# Automatically recognize if building on FreeBSD |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
25 |
ifeq ($(shell uname),FreeBSD) |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
26 |
FREEBSD:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
27 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
28 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
29 |
# Automatically recognize if building on MacOSX |
2000
0742fdd448e3
(svn r2506) - Fix: [OSX, makefile] The makefile can now also see OSX 10.4 as OSX
bjarni
parents:
1955
diff
changeset
|
30 |
ifeq ($(shell uname), Darwin) |
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
31 |
OSX:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
32 |
# OSX uses the unix setup too |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
33 |
UNIX:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
34 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
35 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
36 |
# Automatically recognize if building on MorphOS |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
37 |
ifeq ($(shell uname), MorphOS) |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
38 |
MORPHOS:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
39 |
# MorphOS uses UNIX setup too |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
40 |
UNIX:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
41 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
42 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
43 |
# Automatically recognize if building on BeOS |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
44 |
ifeq ($(shell uname), BeOS) |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
45 |
BEOS:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
46 |
# BeOS uses UNIX setup too |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
47 |
UNIX:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
48 |
# Except that in BeOS 5.0 we need to use net_server, not BONE networking |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
49 |
ifeq ($(shell uname -r), 5.0) |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
50 |
BEOS_NET_SERVER:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
51 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
52 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
53 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
54 |
# Automatically recognize if building on SunOS/Solaris |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
55 |
ifeq ($(shell uname), SunOS) |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
56 |
SUNOS:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
57 |
# SunOS uses UNIX setup too |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
58 |
UNIX:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
59 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
60 |
|
3197
078a10118842
(svn r3864) -Fix: small problems with make-system, making room for a wrapper-configure
truelight
parents:
3083
diff
changeset
|
61 |
# END BYPASS_OS_DETECT |
078a10118842
(svn r3864) -Fix: small problems with make-system, making room for a wrapper-configure
truelight
parents:
3083
diff
changeset
|
62 |
endif |
078a10118842
(svn r3864) -Fix: small problems with make-system, making room for a wrapper-configure
truelight
parents:
3083
diff
changeset
|
63 |
|
3406
ee3af0f1932b
(svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents:
3389
diff
changeset
|
64 |
SDL_CONFIG:=sdl-config |
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
65 |
|
3380
2d02cfdf6d14
(svn r4183) -Codechange: [Makefile]: removed MANUAL_CONFIG as it's not used anymore
bjarni
parents:
3313
diff
changeset
|
66 |
# set libpng-config to the default value |
3406
ee3af0f1932b
(svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents:
3389
diff
changeset
|
67 |
LIBPNG_CONFIG :=libpng-config |
3380
2d02cfdf6d14
(svn r4183) -Codechange: [Makefile]: removed MANUAL_CONFIG as it's not used anymore
bjarni
parents:
3313
diff
changeset
|
68 |
|
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
69 |
# Networking, enabled by default |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
70 |
WITH_NETWORK:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
71 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
72 |
# Library detections |
3406
ee3af0f1932b
(svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents:
3389
diff
changeset
|
73 |
WITH_SDL:=$(shell $(SDL_CONFIG) --version 2>/dev/null) |
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
74 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
75 |
# libpng detection |
3406
ee3af0f1932b
(svn r4217) Replace SDL-CONFIG and LIBPNG-CONFIG with SDL_CONFIG and LIBPNG_CONFIG
peter1138
parents:
3389
diff
changeset
|
76 |
WITH_PNG:=$(shell $(LIBPNG_CONFIG) --version 2>/dev/null) |
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
77 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
78 |
ifdef WITH_PNG |
3389
56f72f7838cc
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
79 |
# LibPNG depends on Zlib |
56f72f7838cc
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
80 |
WITH_ZLIB:=1 |
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
81 |
else |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
82 |
# We go looking for zlib with a little hack |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
83 |
WITH_ZLIB:=$(shell ls /usr/include | grep "zlib.h" 2>/dev/null) \ |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
84 |
$(shell ls /usr/local/include | grep "zlib.h" 2>/dev/null) |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
85 |
ifdef WITH_ZLIB |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
86 |
WITH_ZLIB:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
87 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
88 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
89 |
|
3389
56f72f7838cc
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
90 |
ifdef WITH_ZLIB |
56f72f7838cc
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
91 |
TEMP:=$(shell ls /lib 2>/dev/null | grep "zlib.a")$(shell ls /lib 2>/dev/null | grep "libz.a") |
56f72f7838cc
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
92 |
ifdef TEMP |
56f72f7838cc
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
93 |
STATIC_ZLIB_PATH:=/lib/$(TEMP) |
56f72f7838cc
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
94 |
else |
56f72f7838cc
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
95 |
TEMP:=$(shell ls /usr/lib 2>/dev/null | grep "zlib.a")$(shell ls /usr/lib 2>/dev/null | grep "libz.a") |
56f72f7838cc
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
96 |
ifdef TEMP |
56f72f7838cc
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
97 |
STATIC_ZLIB_PATH:=/usr/lib/$(TEMP) |
56f72f7838cc
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
98 |
else |
56f72f7838cc
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
99 |
TEMP:=$(shell ls /usr/local/lib 2>/dev/null | grep "zlib.a")$(shell ls /usr/local/lib 2>/dev/null | grep "libz.a") |
56f72f7838cc
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
100 |
ifdef TEMP |
56f72f7838cc
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
101 |
STATIC_ZLIB_PATH:=/usr/local/lib/$(TEMP) |
56f72f7838cc
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
102 |
endif |
56f72f7838cc
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
103 |
endif |
56f72f7838cc
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
104 |
endif |
56f72f7838cc
(svn r4197) reentered STATIC_ZLIB_PATH (removed in 4183) since it turned out that it's used after all
bjarni
parents:
3380
diff
changeset
|
105 |
endif |
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
106 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
107 |
# sets the default paths |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
108 |
ifdef UNIX |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
109 |
ifndef OSX |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
110 |
ifndef MORPHOS |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
111 |
ifndef BIN_DIR |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
112 |
#BINARY_DIR:= |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
113 |
#DATA_DIR_PREFIX:= |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
114 |
#INSTALL_DIR:=/usr/local/ |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
115 |
#USE_HOMEDIR:= |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
116 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
117 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
118 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
119 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
120 |
|
2736
3d6487cbbb69
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2688
diff
changeset
|
121 |
ifdef OSX |
3d6487cbbb69
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2688
diff
changeset
|
122 |
# we prefer to use cocoa drivers rather than SDL drivers |
3d6487cbbb69
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2688
diff
changeset
|
123 |
# if you really want SDL drivers, you can always modify Makefile.config |
3308
94df0004ebf1
(svn r4070) -Fix: on OSX COCOA was set by default, even with DEDICATED, while those 2 conflict
truelight
parents:
3197
diff
changeset
|
124 |
ifndef DEDICATED |
2736
3d6487cbbb69
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2688
diff
changeset
|
125 |
WITH_COCOA:=1 |
3d6487cbbb69
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2688
diff
changeset
|
126 |
WITH_SDL:= |
3d6487cbbb69
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2688
diff
changeset
|
127 |
endif |
3308
94df0004ebf1
(svn r4070) -Fix: on OSX COCOA was set by default, even with DEDICATED, while those 2 conflict
truelight
parents:
3197
diff
changeset
|
128 |
endif |
2736
3d6487cbbb69
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2688
diff
changeset
|
129 |
|
3d6487cbbb69
(svn r3281) -Feature: [OSX] added native cocoa sound and video drivers (egladil)
bjarni
parents:
2688
diff
changeset
|
130 |
|
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
131 |
# workaround |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
132 |
# cygwin have problems with libpng, so we will just disable it for now until the problem is solved |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
133 |
ifdef CYGWIN |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
134 |
WITH_PNG:= |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
135 |
endif |
3083
8afc31558162
(svn r3672) -Fix: [makefile] fixed bug where some settings where overwritten with the default ones when MAKEFILE_VERSION was changed
bjarni
parents:
2736
diff
changeset
|
136 |
|
8afc31558162
(svn r3672) -Fix: [makefile] fixed bug where some settings where overwritten with the default ones when MAKEFILE_VERSION was changed
bjarni
parents:
2736
diff
changeset
|
137 |
endif |