1 | # $Id: LIBSDL.kmk 664 2006-12-06 02:14:43Z bird $
|
---|
2 | ## @file
|
---|
3 | #
|
---|
4 | # kBuild SDK - libsdl, targeting $(BUILD_TARGET).
|
---|
5 | #
|
---|
6 | # Copyright (c) 2006 knut st. osmundsen <bird-srcspam@anduin.net>
|
---|
7 | #
|
---|
8 | #
|
---|
9 | # This file is part of kBuild.
|
---|
10 | #
|
---|
11 | # kBuild is free software; you can redistribute it and/or modify
|
---|
12 | # it under the terms of the GNU General Public License as published by
|
---|
13 | # the Free Software Foundation; either version 2 of the License, or
|
---|
14 | # (at your option) any later version.
|
---|
15 | #
|
---|
16 | # kBuild is distributed in the hope that it will be useful,
|
---|
17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
19 | # GNU General Public License for more details.
|
---|
20 | #
|
---|
21 | # You should have received a copy of the GNU General Public License
|
---|
22 | # along with kBuild; if not, write to the Free Software
|
---|
23 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
24 | #
|
---|
25 | #
|
---|
26 |
|
---|
27 | SDK_LIBSDL := libsdl, targeting $(BUILD_TARGET).
|
---|
28 |
|
---|
29 | # SDK Specific Properties
|
---|
30 | ifndef PATH_SDK_LIBSDL
|
---|
31 | PATH_SDK_LIBSDL := $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/libsdl/v*))
|
---|
32 | ifeq ($(PATH_SDK_LIBSDL),)
|
---|
33 | PATH_SDK_LIBSDL := $(sort $(wildcard $(PATH_DEVTOOLS_BLD)/libsdl/v*))
|
---|
34 | endif
|
---|
35 | ifneq ($(PATH_SDK_LIBSDL),)
|
---|
36 | PATH_SDK_LIBSDL := $(call lastword,$(PATH_SDK_LIBSDL))
|
---|
37 | else
|
---|
38 | $(warning kBuild: PATH_SDK_LIBSDL couldn't be determined!)
|
---|
39 | PATH_SDK_LIBSDL := /usr
|
---|
40 | endif
|
---|
41 | else
|
---|
42 | PATH_SDK_LIBSDL := $(PATH_SDK_LIBSDL)
|
---|
43 | endif
|
---|
44 |
|
---|
45 | #
|
---|
46 | # The way libsdl is distributed on the different platforms
|
---|
47 | # varies quite a bit, thus this kludge.
|
---|
48 | #
|
---|
49 | ifeq ($(BUILD_TARGET),os2)
|
---|
50 | SDK_LIBSDL_LIBMAIN ?=
|
---|
51 |
|
---|
52 | # General Properties used by kBuild
|
---|
53 | SDK_LIBSDL_INCS ?= \
|
---|
54 | $(PATH_SDK_LIBSDL)/SDL/include \
|
---|
55 | $(PATH_SDK_LIBSDL)/SDLGfx \
|
---|
56 | $(PATH_SDK_LIBSDL)/SDLImage \
|
---|
57 | $(PATH_SDK_LIBSDL)/SDLMixer \
|
---|
58 | $(PATH_SDK_LIBSDL)/SDLNet \
|
---|
59 | $(PATH_SDK_LIBSDL)/SDLTTF
|
---|
60 | SDK_LIBSDL_LIBS ?= \
|
---|
61 | $(PATH_SDK_LIBSDL)/SDL/SDL12.lib \
|
---|
62 | $(PATH_SDK_LIBSDL)/SDLGfx/SDLGFX.lib \
|
---|
63 | $(PATH_SDK_LIBSDL)/SDLImage/SDLIMAGE.lib \
|
---|
64 | $(PATH_SDK_LIBSDL)/SDLMixer/SDLMIXER.lib \
|
---|
65 | $(PATH_SDK_LIBSDL)/SDLNet/SDLNET.lib \
|
---|
66 | $(PATH_SDK_LIBSDL)/SDLTTF/SDLTTF.lib
|
---|
67 | SDK_LIBSDL_LIBPATHS ?= \
|
---|
68 | $(PATH_SDK_LIBSDL)/SDL \
|
---|
69 | $(PATH_SDK_LIBSDL)/SDLGfx \
|
---|
70 | $(PATH_SDK_LIBSDL)/SDLImage \
|
---|
71 | $(PATH_SDK_LIBSDL)/SDLMixer \
|
---|
72 | $(PATH_SDK_LIBSDL)/SDLNet \
|
---|
73 | $(PATH_SDK_LIBSDL)/SDLTTF
|
---|
74 |
|
---|
75 | else
|
---|
76 | ifeq ($(BUILD_TARGET),win) # ASSUMES VC++ on windows, sorry.
|
---|
77 | SDK_LIBSDL_LIBMAIN ?= \
|
---|
78 | $(PATH_SDK_LIBSDL)/lib/SDLmain.lib
|
---|
79 |
|
---|
80 | # General Properties used by kBuild
|
---|
81 | SDK_LIBSDL_INCS ?= \
|
---|
82 | $(PATH_SDK_LIBSDL)/include/SDL \
|
---|
83 | $(PATH_SDK_LIBSDL)/include
|
---|
84 | SDK_LIBSDL_LIBS ?= \
|
---|
85 | $(PATH_SDK_LIBSDL)/lib/SDL.lib
|
---|
86 | SDK_LIBSDL_LIBPATHS?= \
|
---|
87 | $(PATH_SDK_LIBSDL)/lib
|
---|
88 |
|
---|
89 | else # ASSUMES Unix like system
|
---|
90 | SDK_LIBSDL_LIBMAIN ?= sdlmain
|
---|
91 |
|
---|
92 | # General Properties used by kBuild
|
---|
93 | SDK_LIBSDL_INCS ?= \
|
---|
94 | $(PATH_SDK_LIBSDL)/include/SDL \
|
---|
95 | $(PATH_SDK_LIBSDL)/include
|
---|
96 | SDK_LIBSDL_LIBS ?= sdl sdlgfx sdlimage sdlmixer sdlnet sdlttf
|
---|
97 | SDK_LIBSDL_LIBPATHS ?= \
|
---|
98 | $(PATH_SDK_LIBSDL)/lib
|
---|
99 | endif
|
---|
100 | endif
|
---|
101 |
|
---|