Ignore:
Timestamp:
Dec 6, 2006, 3:14:43 AM (19 years ago)
Author:
bird
Message:

Two types of SDKs, BUILD_TARGET and target specific. The latter is for use with bldprogs and when doing cross compilation. Also renamed PATH_DEV to PATH_DEVTOOLS as that seems more self explanatory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/sdks/LIBSDL.kmk

    • Property svn:keywords set to Id
    r655 r664  
    1 # $Id: $
     1# $Id$
    22## @file
    33#
    4 # kBuild SDK - libsdl (default target only).
     4# kBuild SDK - libsdl, targeting $(BUILD_TARGET).
    55#
    66# Copyright (c) 2006 knut st. osmundsen <bird-srcspam@anduin.net>
     
    2525#
    2626
    27 ## @todo I need to come up with a decent way of dealing with non-default targets.
    28 # The different SDL distros and install patterns isn't making this very easy exactly.
     27SDK_LIBSDL := libsdl, targeting $(BUILD_TARGET).
    2928
    30 SDK_LIBSDL          := libsdl
     29# SDK Specific Properties
    3130ifndef PATH_SDK_LIBSDL
    32 PATH_SDK_LIBSDL     := $(sort $(wildcard $(PATH_DEV)/$(BUILD_TARGET_ARCH).$(BUILD_TARGET)/libsdl/v*))
     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
    3335 ifneq ($(PATH_SDK_LIBSDL),)
    34   PATH_SDK_LIBSDL   := $(call lastword,$(PATH_SDK_LIBSDL))
     36  PATH_SDK_LIBSDL := $(call lastword,$(PATH_SDK_LIBSDL))
    3537 else
    3638  $(warning kBuild: PATH_SDK_LIBSDL couldn't be determined!)
    37   PATH_SDK_LIBSDL   := /usr
     39  PATH_SDK_LIBSDL := /usr
    3840 endif
     41else
     42  PATH_SDK_LIBSDL := $(PATH_SDK_LIBSDL)
    3943endif
    4044
     45#
     46# The way libsdl is distributed on the different platforms
     47# varies quite a bit, thus this kludge.
     48#
    4149ifeq ($(BUILD_TARGET),os2)
    42  SDK_LIBSDL_INCS     ?= \
     50 SDK_LIBSDL_LIBMAIN ?=
     51
     52 # General Properties used by kBuild
     53 SDK_LIBSDL_INCS ?= \
    4354        $(PATH_SDK_LIBSDL)/SDL/include \
    4455        $(PATH_SDK_LIBSDL)/SDLGfx \
     
    4758        $(PATH_SDK_LIBSDL)/SDLNet \
    4859        $(PATH_SDK_LIBSDL)/SDLTTF
    49  SDK_LIBSDL_LIBS     ?= \
     60 SDK_LIBSDL_LIBS ?= \
    5061        $(PATH_SDK_LIBSDL)/SDL/SDL12.lib \
    5162        $(PATH_SDK_LIBSDL)/SDLGfx/SDLGFX.lib \
     
    6172        $(PATH_SDK_LIBSDL)/SDLNet \
    6273        $(PATH_SDK_LIBSDL)/SDLTTF
    63  SDK_LIBSDL_LIBMAIN  ?=
     74
    6475else
    65  ifneq ($(filter nt win win32 win64,$(BUILD_TARGET)),)
    66   # only vc++, not mingw/cygwin.
    67   SDK_LIBSDL_INCS    ?= \
     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 ?= \
    6882        $(PATH_SDK_LIBSDL)/include/SDL \
    6983        $(PATH_SDK_LIBSDL)/include
    70   SDK_LIBSDL_LIBS    ?= \
     84  SDK_LIBSDL_LIBS ?= \
    7185        $(PATH_SDK_LIBSDL)/lib/SDL.lib
    7286  SDK_LIBSDL_LIBPATHS?= \
    7387        $(PATH_SDK_LIBSDL)/lib
    74   SDK_LIBSDL_LIBMAIN ?= \
    75         $(PATH_SDK_LIBSDL)/lib/SDLmain.lib
    76  else
    77   SDK_LIBSDL_INCS    ?= \
     88
     89 else # ASSUMES Unix like system
     90  SDK_LIBSDL_LIBMAIN ?= sdlmain
     91
     92  # General Properties used by kBuild
     93  SDK_LIBSDL_INCS ?= \
    7894        $(PATH_SDK_LIBSDL)/include/SDL \
    7995        $(PATH_SDK_LIBSDL)/include
    80   SDK_LIBSDL_LIBS    ?= sdl sdlgfx sdlimage sdlmixer sdlnet sdlttf
    81   SDK_LIBSDL_LIBPATHS?= \
     96  SDK_LIBSDL_LIBS ?= sdl sdlgfx sdlimage sdlmixer sdlnet sdlttf
     97  SDK_LIBSDL_LIBPATHS ?= \
    8298        $(PATH_SDK_LIBSDL)/lib
    83   SDK_LIBSDL_LIBMAIN ?= sdlmain
    8499 endif
    85100endif
Note: See TracChangeset for help on using the changeset viewer.