author | tron |
Fri, 04 Feb 2005 20:40:04 +0000 | |
changeset 1294 | 4cdf0e76c093 |
parent 563 | a6ef8e441cd6 |
child 1823 | 5ab67b33babd |
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 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
3 |
# Automatically recognize if building on Win32 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
4 |
ifdef WINDIR |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
5 |
ifndef UNIX |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
6 |
WIN32:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
7 |
CYGWIN:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
8 |
MINGW:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
9 |
STATIC:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
10 |
SKIP_STATIC_CHECK:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
11 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
12 |
else |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
13 |
UNIX:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
14 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
15 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
16 |
# Automatically recognize if building on FreeBSD |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
17 |
ifeq ($(shell uname),FreeBSD) |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
18 |
FREEBSD:=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 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
21 |
# Automatically recognize if building on MacOSX |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
22 |
ifeq ($(VENDOR), apple) |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
23 |
OSX:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
24 |
# OSX uses the unix setup too |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
25 |
UNIX:=1 |
563
a6ef8e441cd6
(svn r972) Makefile: added make release (currently only works on mac)
bjarni
parents:
543
diff
changeset
|
26 |
# OSX generally uses static since so few computers actually have all the libs installed in unix style |
a6ef8e441cd6
(svn r972) Makefile: added make release (currently only works on mac)
bjarni
parents:
543
diff
changeset
|
27 |
STATIC:=1 |
543
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
28 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
29 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
30 |
# Automatically recognize if building on MorphOS |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
31 |
ifeq ($(shell uname), MorphOS) |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
32 |
MORPHOS:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
33 |
# MorphOS uses UNIX setup too |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
34 |
UNIX:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
35 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
36 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
37 |
# Automatically recognize if building on BeOS |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
38 |
ifeq ($(shell uname), BeOS) |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
39 |
BEOS:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
40 |
# BeOS uses UNIX setup too |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
41 |
UNIX:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
42 |
# 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
|
43 |
ifeq ($(shell uname -r), 5.0) |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
44 |
BEOS_NET_SERVER:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
45 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
46 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
47 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
48 |
# Automatically recognize if building on SunOS/Solaris |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
49 |
ifeq ($(shell uname), SunOS) |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
50 |
SUNOS:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
51 |
# SunOS uses UNIX setup too |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
52 |
UNIX:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
53 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
54 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
55 |
# FreeBSD uses sdl11 instead of sdl |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
56 |
ifdef FREEBSD |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
57 |
SDL-CONFIG:=sdl11-config |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
58 |
else |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
59 |
SDL-CONFIG:=sdl-config |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
60 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
61 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
62 |
# Networking, enabled by default |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
63 |
WITH_NETWORK:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
64 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
65 |
# Library detections |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
66 |
WITH_SDL:=$(shell $(SDL-CONFIG) --version 2>/dev/null) |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
67 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
68 |
# libpng detection |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
69 |
ifdef FREEBSD |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
70 |
# a little hack was needed for FreeBSD because it misses libpng-config |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
71 |
WITH_PNG:=$(shell ls /usr/lib | grep "libpng" 2>/dev/null) $(shell \ |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
72 |
ls /usr/local/lib | grep "libpng" 2>/dev/null) |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
73 |
ifdef WITH_PNG |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
74 |
# makes the flag look nicer in makefile.config |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
75 |
WITH_PNG:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
76 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
77 |
else |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
78 |
WITH_PNG:=$(shell libpng-config --version 2>/dev/null) |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
79 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
80 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
81 |
ifdef WITH_PNG |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
82 |
# LibPNG depends on Zlib |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
83 |
WITH_ZLIB:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
84 |
else |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
85 |
# We go looking for zlib with a little hack |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
86 |
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
|
87 |
$(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
|
88 |
ifdef WITH_ZLIB |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
89 |
WITH_ZLIB:=1 |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
90 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
91 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
92 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
93 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
94 |
# sets the default paths |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
95 |
ifdef UNIX |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
96 |
ifndef OSX |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
97 |
ifndef MORPHOS |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
98 |
ifndef BIN_DIR |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
99 |
#BINARY_DIR:= |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
100 |
#DATA_DIR_PREFIX:= |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
101 |
#INSTALL_DIR:=/usr/local/ |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
102 |
#USE_HOMEDIR:= |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
103 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
104 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
105 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
106 |
endif |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
107 |
|
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
108 |
# workaround |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
109 |
# 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
|
110 |
ifdef CYGWIN |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
111 |
WITH_PNG:= |
946badd71033
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
528
diff
changeset
|
112 |
endif |