equal
deleted
inserted
replaced
|
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 |
|
31 # FreeBSD uses sdl11 instead of sdl |
|
32 ifdef FREEBSD |
|
33 SDL-CONFIG:=sdl11-config |
|
34 else |
|
35 SDL-CONFIG:=sdl-config |
|
36 endif |
|
37 |
|
38 |
|
39 # Library detections |
|
40 WITH_SDL:=$(shell $(SDL-CONFIG) --version 2>/dev/null) |
|
41 |
|
42 # libpng detection |
|
43 ifdef FREEBSD |
|
44 # a little hack was needed for FreeBSD because it misses libpng-config |
|
45 WITH_PNG:=$(shell ls /usr/lib | grep "libpng" 2>/dev/null) $(shell \ |
|
46 ls /usr/local/lib | grep "libpng" 2>/dev/null) |
|
47 ifdef WITH_PNG |
|
48 # makes the flag look nicer in makefile.config |
|
49 WITH_PNG:=1 |
|
50 endif |
|
51 else |
|
52 WITH_PNG:=$(shell libpng-config --version 2>/dev/null) |
|
53 endif |
|
54 |
|
55 ifdef WITH_PNG |
|
56 # LibPNG depends on Zlib |
|
57 WITH_ZLIB:=1 |
|
58 else |
|
59 # We go looking for zlib with a little hack |
|
60 WITH_ZLIB:=$(shell ls /usr/include | grep "zlib.h" 2>/dev/null) \ |
|
61 $(shell ls /usr/local/include | grep "zlib.h" 2>/dev/null) |
|
62 ifdef WITH_ZLIB |
|
63 WITH_ZLIB:=1 |
|
64 endif |
|
65 endif |
|
66 |
|
67 |
|
68 # sets the default paths |
|
69 ifdef UNIX |
|
70 ifndef OSX |
|
71 ifndef MORPHOS |
|
72 ifndef BIN_DIR |
|
73 #BINARY_DIR:= |
|
74 #DATA_DIR_PREFIX:= |
|
75 #INSTALL_DIR:=/usr/local/ |
|
76 #USE_HOMEDIR:= |
|
77 endif |
|
78 endif |
|
79 endif |
|
80 endif |