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