Fixed the target directory for static libs distributed with the system. Is develop/lib/<platform> now, as is under R5. Added an optional third parameter to StaticLibrary, which specifies the target directory for the library -- defaults to the just fixed standard directory.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4625 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2003-09-11 20:04:13 +00:00
parent 0ccfc3ca29
commit e9230d05d0

View File

@ -186,7 +186,8 @@ OBOS_KERNEL_DIR ?= [ FDirName $(OBOS_DISTRO_TARGET) beos system ] ;
OBOS_PREFS_DIR ?= [ FDirName $(OBOS_DISTRO_TARGET) beos preferences ] ;
OBOS_SERVER_DIR ?= [ FDirName $(OBOS_DISTRO_TARGET) beos system servers ] ;
OBOS_SHLIB_DIR ?= [ FDirName $(OBOS_DISTRO_TARGET) beos system lib ] ;
OBOS_STLIB_DIR ?= [ FDirName $(OBOS_DISTRO_TARGET) beos system lib ] ;
OBOS_STLIB_DIR ?= [ FDirName $(OBOS_DISTRO_TARGET) develop lib
$(OBOS_ARCH) ] ;
OBOS_TEST_DIR ?= [ FDirName $(OBOS_TOP) tests ] ;
OBOS_KERNEL_CONFIG = config.$(OBOS_ARCH).ini ;
@ -744,14 +745,23 @@ rule MakeLocateObjects
rule StaticLibrary
{
# StaticLibrary <name> : <sources> ;
local lib = lib$(<)$(SUFLIB) ;
# StaticLibrary <name> : <sources> [ : <target dir> ] ;
# Creates a static library from sources.
# <name>: Basename of the library, without leading "lib" and trailing ".a".
# <source>: List of source files.
# <target dir>: Directory into which the library shall be placed. Defaults
# to the standard directory for static libs.
#
local lib = lib$(1)$(SUFLIB) ;
SetupIncludes ;
SetupObjectsDir ;
MakeLocateObjects $(2) ;
Library $(lib) : $(>) ;
MakeLocate $(lib) : $(OBOS_STLIB_DIR) ;
Library $(lib) : $(2) ;
local targetDir = $(3) ;
if ! $(targetDir) {
targetDir = $(OBOS_STLIB_DIR) ;
}
MakeLocate $(lib) : $(targetDir) ;
# If KEEPOBJS is set, Library doesn't make the library depend on
# `lib'.