Changeset 98 for trunk/libjdkmidi/trunk

Show
Ignore:
Timestamp:
09/06/06 16:03:30 (2 years ago)
Author:
jeffk@…
Message:

magic.mak and configure refactored, simplified some, and heavily commented

Location:
trunk/libjdkmidi/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/libjdkmidi/trunk/configure

    r94 r98  
    11#! /bin/bash 
    22 
     3############################################################################################## 
     4# 
     5# The magic.makefile configure script, Copyright 2004-2006 by Jeff Koftinoff <jeffk@jdkoftinoff.com> 
     6# version 3. 
     7# 
     8# Simplifies the building of a c/c++ library, it's tests, tools, examples, and documentation. 
     9# 
     10# See https://clicker.jdkoftinoff.com/projects/trac/jdks/wiki/MagicMakefileV3 
     11# for more information, including license information (GPL) 
     12# 
     13 
     14 
     15# set relative_dir to the directory part of arg 0. Usually this is ../.. or somesuch. 
     16 
    317relative_dir="$(dirname "$0")" 
    418 
    5 # load project specific definitions 
     19# load project specific bash definitions 
    620 
    721source "${relative_dir}/project.sh" 
     22 
     23# if we are called with --help or the script is called from the same directory that it is in, 
     24# then we must just print our usage information and exit 
    825 
    926if [ "$1" = "--help" -o "${relative_dir}" = "." ]; then 
    1027    echo "configure script based on J.D. Koftinoff Software's MagicMake system." 
    11     echo "See https://clicker.jdkoftinoff.com/projects/trac/jdks/wiki for more information" 
     28    echo "See https://clicker.jdkoftinoff.com/projects/trac/jdks/wiki/MagicMakefileV3 for more information" 
    1229    echo "" 
    1330    echo "example usage:" 
     
    3754    echo "" 
    3855    echo "Build on a mac os x machine and cross compile for windows via mingw32 cross compiler" 
    39     echo "  ../configure --host-platform-macosx-universal=1 --cross-compiling=1 --compiler-prefix=i386-mingw32- --target-platform-mingw32=1" 
     56    echo "  ../configure --native-platform-macosx-universal=1 --cross-compiling=1 --compiler-prefix=i386-mingw32- --target-platform-mingw32=1" 
    4057    echo "" 
    4158    echo "Build on a linux machine and cross compile for windows via mingw32 cross compiler" 
    42     echo "  ../configure --host-platform-linux=1 --cross-compiling=1 --compiler-prefix=i386-mingw32-  --target-platform-mingw32=1" 
     59    echo "  ../configure --native-platform-linux=1 --cross-compiling=1 --compiler-prefix=i386-mingw32-  --target-platform-mingw32=1" 
    4360    echo "" 
    4461    echo "Further options for installation path of 'make install' and 'make install-dev' destinations:" 
     
    5067fi 
    5168 
     69 
     70# before we parse the command line arguments, do some rudimentary native machine investigation. 
     71 
     72 
    5273# parse all long options and set them as variables, allowing command line to override everything 
    5374# options are in the form of: 
     
    5879# 
    5980# A bunch of variables have default values but can be overriden by the command line 
    60 # at the end of this script, all variables with the "magic_" prefix are outputted to the Makefile and the vars.sh 
    61 # in the appropriate format. The script file './reconfigure' is created with the current command line parameters 
    62  
    63 # before we parse the command line arguments, do some rudimentary host machine investigation. 
    64  
     81# at the end of this script, all variables with the "magic_" prefix are outputted to the  
     82# Makefile and the vars.sh  in the appropriate format. The script file './reconfigure' is created  
     83# with the current command line parameters 
     84# 
     85# This looks tricky but is really not so bad: The for loop prints each parameter, one per line  
     86# into a single instance of awk so it is quick. 
     87# 
     88# The awk script extracts the variable name as $1, and the part after the '=' as $2.  
     89# It changes - to _, -- to nothing, converts the string to uppercase, prefixes the 
     90# variable name with magic_, and prints $2 inside quotes. 
     91# 
     92# The result of the awk script is then a multi-line bash script which sets a bunch of environment 
     93# variables.  This text is then 'eval'd so ultimately the command line arguments show up as vars, 
     94# with out needing ugly getopt bash extensions for parsing command lines. 
    6595 
    6696params=$(( 
     
    71101) | awk -F= '{ gsub("-","_",$1); sub("__","",$1); print "magic_" toupper($1) "=" "\"" $2 "\""; }'; ) 
    72102 
    73  
    74103eval $params 
    75104 
    76105# setup all defaults: 
    77106 
    78 # directories 
    79  
     107# The PROJECT_TOP_DIR variable, if not set already, is then set to the full relative path needed to get to the configure script from the PWD. 
    80108magic_PROJECT_TOP_DIR="${magic_PROJECT_TOP_DIR:-${PWD}/${relative_dir}}" 
     109 
     110# Then we get the real path name of this directory by cd'ing into it and running 'pwd' in it. 
    81111magic_PROJECT_TOP_DIR=$(cd "${magic_PROJECT_TOP_DIR}" && pwd) 
     112 
     113# if --prefix is not specific, it defaults to $PWD/install  
    82114magic_PREFIX="${magic_PREFIX:-${PWD}/install}" 
    83115magic_INSTALL_DIR="${magic_PREFIX}" 
     
    143175magic_LDLIBS="${magic_LDLIBS}" 
    144176 
    145 # Host platform specifications 
    146  
    147 magic_HOST_PLATFORM_GENERIC="${magic_HOST_PLATFORM_GENERIC}" 
    148 magic_HOST_PLATFORM_MINGW32="${magic_HOST_PLATFORM_MINGW32}" 
    149 magic_HOST_PLATFORM_CYGWIN="${magic_HOST_PLATFORM_CYGWIN}" 
    150 magic_HOST_PLATFORM_LINUX="${magic_HOST_PLATFORM_LINUX}" 
    151 magic_HOST_PLATFORM_MACOSX_PPC="${magic_HOST_PLATFORM_MACOSX_PPC}" 
    152 magic_HOST_PLATFORM_MACOSX_I386="${magic_HOST_PLATFORM_MACOSX_I386}" 
    153 magic_HOST_PLATFORM_MACOSX_UNIVERSAL="${magic_HOST_PLATFORM_MACOSX_UNIVERSAL}" 
    154 magic_HOST_USE_AR="${magic_HOST_USE_AR:-1}" 
    155 magic_HOST_USE_MACOSX_LIBTOOL="${magic_HOST_USE_MACOSX_LIBTOOL:-0}" 
    156 magic_HOST_MACOSX_SDK="${magic_HOST_MACOSX_SDK:-/Developer/SDKs/MacOSX10.4u.sdk}" 
     177# Native platform specifications 
     178 
     179magic_NATIVE_PLATFORM_GENERIC="${magic_NATIVE_PLATFORM_GENERIC}" 
     180magic_NATIVE_PLATFORM_MINGW32="${magic_NATIVE_PLATFORM_MINGW32}" 
     181magic_NATIVE_PLATFORM_CYGWIN="${magic_NATIVE_PLATFORM_CYGWIN}" 
     182magic_NATIVE_PLATFORM_LINUX="${magic_NATIVE_PLATFORM_LINUX}" 
     183magic_NATIVE_PLATFORM_MACOSX_PPC="${magic_NATIVE_PLATFORM_MACOSX_PPC}" 
     184magic_NATIVE_PLATFORM_MACOSX_I386="${magic_NATIVE_PLATFORM_MACOSX_I386}" 
     185magic_NATIVE_PLATFORM_MACOSX_UNIVERSAL="${magic_NATIVE_PLATFORM_MACOSX_UNIVERSAL}" 
     186magic_NATIVE_USE_AR="${magic_NATIVE_USE_AR:-1}" 
     187magic_NATIVE_USE_MACOSX_LIBTOOL="${magic_NATIVE_USE_MACOSX_LIBTOOL:-0}" 
     188magic_NATIVE_MACOSX_SDK="${magic_NATIVE_MACOSX_SDK:-/Developer/SDKs/MacOSX10.4u.sdk}" 
    157189 
    158190# Native compiler specifications 
  • trunk/libjdkmidi/trunk/magic.mak

    r97 r98  
     1############################################################################################## 
     2# 
    13# The magic.makefile Copyright 2004-2006 by Jeff Koftinoff <jeffk@jdkoftinoff.com> 
     4# version 3. 
    25# 
    36# Simplifies the building of a c/c++ library, it's tests, tools, examples, and documentation. 
    47# 
    5  
     8# See https://clicker.jdkoftinoff.com/projects/trac/jdks/wiki/MagicMakefileV3 
     9# for more information, including license information (GPL) 
     10# 
     11 
     12 
     13# default project settings. These are usually originally set in project.mak 
     14 
     15# PROJECT is the single word describing this project. 
    616PROJECT?=project 
     17 
     18# PROJECT_NAME is a single line describing this project 
    719PROJECT_NAME?=Project 
     20 
     21# PROJECT_VERSION defaults to the date, YYYYMMDD 
    822PROJECT_VERSION?=$(shell date +%Y%m%d) 
    923 
     24# BINARY_TARBALL_NAME is the file name of the result tar ball when an installation directory is tarred and bzipped. 
    1025BINARY_TARBALL_NAME?=$(PROJECT_NAME)-$(PROJECT_VERSION).tar.bz2 
    1126 
     27# We put our build dir in $(PWD) by default 
     28BUILD_DIR?=$(PWD) 
     29 
     30NATIVE_BUILD_DIR=$(PWD) 
     31 
     32# We are not cross compiling by default 
    1233CROSS_COMPILING?=0 
    1334 
    14 LIBS+= 
    15 LIB_DIRS+=$(foreach lib,$(TOP_LIB_DIRS),$(PROJECT_TOP_DIR)/$(lib)) 
    16 LIB_SRC_DIR+=$(TOP_LIB_DIRS) 
    17  
     35# TOP_LIB_DIRS is a list of relative directories from the PROJECT_TOP_DIR that each contain 
     36# an "include", "src", "tools", "tests" and other directories. Typically for a single project 
     37# TOP_LIB_DIRS is set to '.' in project.mak 
     38 
     39# LIB_DIRS is then calculated with the fully qualified directory name for each directory in TOP_LIB_DIRS 
     40LIB_DIRS+=$(call add_top_dir_prefix,$(TOP_LIB_DIRS)) 
     41 
     42 
     43# RSYNC is the name of our rsync program. 
    1844RSYNC?=rsync 
     45 
     46# RSYNC_OPTIONS are the rsync options we use to copy a tree of files/directories to another dir. 
     47# We want ot exclude backup files and subversion and CVS control directories. 
    1948RSYNC_OPTIONS?=-a --exclude='*~' --exclude='.svn' --exclude='CVS' 
     49 
     50# When we build a config tool script, this is the file name we use.  
    2051PROJECT_CONFIG_TOOL?=$(PROJECT)-cfg 
    2152 
    22 TARGET_PLATFORM_GENERIC=1 
    23 TARGET_PLATFORM_MINGW32?=0 
    24 TARGET_PLATFORM_CYGWIN?=0 
    25 TARGET_PLATFORM_LINUX?=0 
    26 TARGET_PLATFORM_MACOSX_PPC?=0 
    27 TARGET_PLATFORM_MACOSX_I386?=0 
    28 TARGET_PLATFORM_MACOSX_UNIVERSAL?=0 
    29 TARGET_USE_AR?=1 
    30 TARGET_USE_MACOSX_LIBTOOL?=0 
    31  
    32  
     53 
     54############################################################################################## 
     55# 
     56# utility functions  
     57 
     58# add_top_dir_prefix is a function that takes every directory and or wildcard pattern  
     59# in arg1 and prefixes PROJECT_TOP_DIR to it, and then only expands the directories that actually exist. 
     60 
     61add_top_dir_prefix=$(strip $(wildcard $(foreach lib,$(1),$(PROJECT_TOP_DIR)/$(lib)))) 
     62 
     63# suffix_platform_dirs is a function that takes 3 parameters: 
     64#  $(1) is a subdirectory name, like 'src' 
     65#  $(2) is a list of platform directories, like 'win32' or 'posix' 
     66#  $(3) is a list of main directory names, like '$(PROJECT_TOP_DIR)' 
     67#  
     68# suffix_platform_dirs expands all existing directories that match any of $(3)/$(1) or $(3)/$(1)/$(2) 
     69 
     70suffix_platform_dirs=$(strip $(foreach dir,$(addsuffix /$(1),$(3)) $(foreach platform,$(2),$(addsuffix /$(1)/$(platform),$(3))),$(wildcard $(dir)))) 
     71 
     72# targe_suffix_platform_dirs is a function which takes one parameter: 
     73#  $(1) is a subdirectory name, like 'src' or 'tool' 
     74# it expands into all existing directories for the target platform sources 
     75 
     76target_suffix_platform_dirs=$(wildcard $(call suffix_platform_dirs,$(1),$(PLATFORM_DIRS),$(LIB_DIRS))) 
     77 
     78# native_suffix_platform_dirs is a function which takes one parameter: 
     79#  $(1) is a subdirectory name, like 'src' or 'tool' 
     80# it expands into all existing directories for the native platform sources 
     81 
     82native_suffix_platform_dirs=$(wildcard $(call suffix_platform_dirs,$(1),$(NATIVE_PLATFORM_DIRS),$(LIB_DIRS))) 
     83 
     84# get_file_list is a function which takes two parameters: 
     85#  $(1) a list of directory names 
     86#  $(2) a file extension (without the dot) 
     87# it expands into all the file names that are found in the listed directories which that file extension, 
     88# and then removes all the directory names from the results. 
     89 
     90get_file_list=$(strip $(notdir $(foreach dir,$(1),$(wildcard $(dir)/*.$(2))))) 
     91 
     92 
     93# get_src_file_list is a function which takes one parameter: 
     94#  $(1) is a file extension 
     95# it expands into a list of all source files for the target platform that of that type 
     96# (with the directory names removed) 
     97 
     98get_src_file_list=$(call get_file_list,$(LIB_SRC_DIR),$(1)) 
     99get_native_src_file_list=$(call get_file_list,$(NATIVE_LIB_SRC_DIR),$(1)) 
     100 
     101 
     102# get_cpp_o_files is a function which takes one parameter: 
     103#  $(1) is a list of cpp files with no directory names 
     104# 
     105# it returns the full path names for all the required object files which are generated by cpp files. 
     106# get_cc_o_files, get_c_o_files, get_m_o_files, and get_mm_o_files are the same as get_cpp_o_files  
     107# except for C, Objective-C, and Objective-C++ respectively. 
     108 
     109get_cpp_o_files=$(addprefix $(OUTPUT_OBJ_DIR)/,$(1:.cpp=.o)) 
     110get_cc_o_files=$(addprefix $(OUTPUT_OBJ_DIR)/,$(1:.cc=.o)) 
     111get_c_o_files=$(addprefix $(OUTPUT_OBJ_DIR)/,$(1:.c=.o)) 
     112get_m_o_files=$(addprefix $(OUTPUT_OBJ_DIR)/,$(1:.m=.o)) 
     113get_mm_o_files=$(addprefix $(OUTPUT_OBJ_DIR)/,$(1:.mm=.o)) 
     114 
     115get_native_cpp_o_files=$(addprefix $(NATIVE_OUTPUT_OBJ_DIR)/,$(1:.cpp=.o)) 
     116get_native_cc_o_files=$(addprefix $(NATIVE_OUTPUT_OBJ_DIR)/,$(1:.cc=.o)) 
     117get_native_c_o_files=$(addprefix $(NATIVE_OUTPUT_OBJ_DIR)/,$(1:.c=.o)) 
     118get_native_m_o_files=$(addprefix $(NATIVE_OUTPUT_OBJ_DIR)/,$(1:.m=.o)) 
     119get_native_mm_o_files=$(addprefix $(NATIVE_OUTPUT_OBJ_DIR)/,$(1:.mm=.o)) 
     120 
     121 
     122 
     123# calc_target_options is a function which takes 1 parameter: 
     124#   $(1) is a target platform suffix, such as MINGW32, POSIX, or LINUX 
     125#  
     126# it expands into makefile code which is to be ultimately eval'd -  
     127# this means that if $(1) is LINUX, then for instance, COMPILE_FLAGS_LINUX 
     128# will get appended to the current COMPILE_FLAGS. 
     129# the variables set in this fashion include: 
     130#  LIB_SRC_DIR, DEFINES, COMPILE_FLAGS, LINK_FLAGS, LINK_FLAGS_GUI, LDLIBS, and LDLIBS_GUI 
     131 
     132define calc_target_options 
     133# add the relevant top src dirs 
     134LIB_SRC_DIR+=$$(call add_top_dir_prefix,$$(TOP_LIB_DIRS_$(1))) 
     135 
     136# set the target platform macro definition 
     137DEFINES+=TARGET_PLATFORM_$(1)=1 
     138 
     139# set the platform specific project defines 
     140DEFINES+=$$(DEFINES_$(1)) 
     141 
     142# set the platform specific project compile flags 
     143COMPILE_FLAGS+=$$(COMPILE_FLAGS_$(1)) 
     144 
     145# set the platform specific project link flags 
     146LINK_FLAGS+=$$(LINK_FLAGS_$(1)) 
     147 
     148# set the platform specific project gui link flags 
     149LINK_FLAGS_GUI+=$$(LINK_FLAGS_GUI_$(1)) 
     150 
     151# set the platform specific project link libs 
     152LDLIBS+=$$(LDLIBS_$(1)) 
     153 
     154# set the platform specific project gui link libs 
     155LDLIBS_GUI+=$$(LDLIBS_GUI_$(1)) 
     156endef 
     157 
     158 
     159# calc_multi_target_options is a function which takes 1 parameter: 
     160#  $(1) is a list of target platform suffixes, such as POSIX or LINUX 
     161# it takes each one and expands them via the calc_target_options function. 
     162# this expansion is to be eval'd. 
     163 
     164calc_multi_target_options=$(foreach suffix,$(1),$(call calc_target_options,$(suffix))) 
     165 
     166 
     167# calc_native_options is a function which takes 1 parameter: 
     168#   $(1) is a native platform suffix, such as MINGW32, POSIX, or LINUX 
     169#  
     170# it expands into makefile code which is to be ultimately eval'd -  
     171# this means that if $(1) is LINUX, then for instance, COMPILE_FLAGS_LINUX 
     172# will get appended to the current NATIVE_COMPILE_FLAGS. 
     173# the variables set in this fashion include: 
     174#  NATIVE_LIB_SRC_DIR, NATIVE_DEFINES, NATIVE_COMPILE_FLAGS,  
     175#  NATIVE_LINK_FLAGS, NATIVE_LINK_FLAGS_GUI, NATIVE_LDLIBS, and NATIVE_LDLIBS_GUI 
     176 
     177define calc_native_options 
     178# add the relevant top src dirs 
     179NATIVE_LIB_SRC_DIR+=$$(call add_top_dir_prefix,$$(TOP_LIB_DIRS_$(1))) 
     180 
     181# set the target platform macro definition 
     182NATIVE_DEFINES+=TARGET_PLATFORM_$(1)=1 
     183 
     184# set the platform specific project defines 
     185NATIVE_DEFINES+=$$(DEFINES_$(1)) 
     186 
     187# set the platform specific project compile flags 
     188NATIVE_COMPILE_FLAGS+=$$(COMPILE_FLAGS_$(1)) 
     189 
     190# set the platform specific project link flags 
     191NATIVE_LINK_FLAGS+=$$(LINK_FLAGS_$(1)) 
     192 
     193# set the platform specific project gui link flags 
     194NATIVE_LINK_FLAGS_GUI+=$$(LINK_FLAGS_GUI_$(1)) 
     195 
     196# set the platform specific project link libs 
     197NATIVE_LDLIBS+=$$(LDLIBS_$(1)) 
     198 
     199# set the platform specific project gui link libs 
     200NATIVE_LDLIBS_GUI+=$$(LDLIBS_GUI_$(1)) 
     201endef 
     202 
     203 
     204# calc_multi_native_options is a function which takes 1 parameter: 
     205#  $(1) is a list of native platform suffixes, such as POSIX or LINUX 
     206# it takes each one and expands them via the calc_native_options function. 
     207# this expansion is to be eval'd. 
     208 
     209calc_multi_native_options=$(foreach suffix,$(1),$(call calc_native_options,$(suffix))) 
     210 
     211 
     212# search_program_group is a function which returns the makefile text required to find 
     213# all source files in a specified directory class and construct the o file lists for them. 
     214# Param $(1) is the class of program in capitals, for example TOOLS, TESTS, EXAMPLES, GUI 
     215# the text returned by this function is then to be eval'd.  The appropriate lists of  
     216# source files and O files for this class are then created dynamically. 
     217 
     218define search_program_group 
     219LIB_$(1)_CPP_FILES=$$(call get_file_list,$$(LIB_$(1)_DIR),cpp) 
     220LIB_$(1)_CC_FILES=$$(call get_file_list,$$(LIB_$(1)_DIR),cc) 
     221LIB_$(1)_M_FILES=$$(call get_file_list,$$(LIB_$(1)_DIR),m) 
     222LIB_$(1)_MM_FILES=$$(call get_file_list,$$(LIB_$(1)_DIR),mm) 
     223LIB_$(1)_SH_FILES=$$(call get_file_list,$$(LIB_$(1)_DIR),sh) 
     224 
     225LIB_$(1)_O_FILES=$$(call get_cpp_o_files,$$(LIB_$(1)_CPP_FILES)) \ 
     226   $$(call get_cc_o_files,$$(LIB_$(1)_CC_FILES)) \ 
     227   $$(call get_c_o_files,$$(LIB_$(1)_C_FILES)) \ 
     228   $$(call get_m_o_files,$$(LIB_$(1)_M_FILES)) \ 
     229   $$(call get_mm_o_files,$$(LIB_$(1)_MM_FILES)) 
     230 
     231LIB_$(1)_EXE_FILES=$$(addprefix $$(OUTPUT_$(1)_DIR)/,$$(notdir $$(LIB_$(1)_O_FILES:.o=$$(EXE)))) 
     232 
     233ifeq ($(CROSS_COMPILING),1) 
     234NATIVE_LIB_$(1)_CPP_FILES=$$(call get_file_list,$$(NATIVE_LIB_$(1)_DIR),cpp) 
     235NATIVE_LIB_$(1)_CC_FILES=$$(call get_file_list,$$(NATIVE_LIB_$(1)_DIR),cc) 
     236NATIVE_LIB_$(1)_M_FILES=$$(call get_file_list,$$(NATIVE_LIB_$(1)_DIR),m) 
     237NATIVE_LIB_$(1)_MM_FILES=$$(call get_file_list,$$(NATIVE_LIB_$(1)_DIR),mm) 
     238NATIVE_LIB_$(1)_SH_FILES=$$(call get_file_list,$$(NATIVE_LIB_$(1)_DIR),sh) 
     239 
     240NATIVE_LIB_TOOLS_O_FILES=$$(call get_native_cpp_o_files,$$(NATIVE_LIB_$(1)_CPP_FILES)) \ 
     241   $$(call get_native_cc_o_files,$$(NATIVE_LIB_$(1)_CC_FILES)) \ 
     242   $$(call get_native_c_o_files,$$(NATIVE_LIB_$(1)_C_FILES)) \ 
     243   $$(call get_native_m_o_files,$$(NATIVE_LIB_$(1)_M_FILES)) \ 
     244   $$(call get_native_mm_o_files,$$(NATIVE_LIB_$(1)_MM_FILES)) 
     245 
     246NATIVE_LIB_$(1)_EXE_FILES=$$(addprefix $$(NATIVE_OUTPUT_$(1)_DIR)/,$$(notdir $$(NATIVE_LIB_$(1)_O_FILES:.o=$$(NATIVE_EXE)))) 
     247endif 
     248endef 
     249 
     250# compile options 
     251 
     252# having DEBUG set to 1 means we compile with -g and define DEBUG=1 
     253 
     254ifeq ($(DEBUG),1) 
     255COMPILE_FLAGS+=-g 
     256DEFINES+=DEBUG=1 
     257endif 
     258 
     259# having PROFILE set to 1 means we compile with -pg  
     260 
     261ifeq ($(PROFILE),1) 
     262COMPILE_FLAGS+=-pg 
     263endif 
     264 
     265# all our */include directories 
     266INCLUDES+=$(LIB_INCLUDE_DIR) 
     267 
     268# our compiler defines 
     269DEFINES?= 
     270 
     271# The preprocessor flags is initially comprised of -I option for each include dir,  
     272# and the -D option for each define 
     273PREPROCESS_FLAGS=$(addprefix -I,$(INCLUDES)) $(addprefix -D,$(DEFINES))  
     274 
     275# The compiler flag settings for optimization and warnings 
     276COMPILE_FLAGS+=$(OPTIMIZE) $(WARNINGS) 
     277 
     278# the additional linker flags: 
     279LDFLAGS+= 
     280 
     281# the addition linker libraries: 
     282LDLIBS+= 
     283 
     284# The preprocessor flags needed to generate dependency information: 
     285DEPENDENCY_OPTIONS?=-MM -MF 
     286 
     287# native platform debug flags: having NATIVE_DEBUG set to 1 means we compile native platform 
     288# code with -g and define DEBUG=1 
     289ifeq ($(NATIVE_DEBUG),1) 
     290NATIVE_COMPILE_FLAGS+=-g 
     291NATIVE_DEFINES+=DEBUG=1 
     292endif 
     293 
     294# native platform profile flag: having NATIVE_PROFILE set to 1 means we compile native platform 
     295# code with -pg  
     296ifeq ($(NATIVE_PROFILE),1) 
     297NATIVE_COMPILE_FLAGS+=-pg 
     298endif 
     299 
     300 
     301# The native platform preprocessor flags is initially comprised of -I option for each include dir,  
     302# and the -D option for each define 
     303NATIVE_PREPROCESS_FLAGS=$(addprefix -I,$(INCLUDES)) $(addprefix -D,$(NATIVE_DEFINES))  
     304 
     305# The native platform compiler flags settings for optimization and warnings 
     306NATIVE_COMPILE_FLAGS+=$(NATIVE_OPTIMIZE) $(NATIVE_WARNINGS) 
     307 
     308# the additional linker flags: 
     309NATIVE_LDFLAGS+= 
     310 
     311# the addition linker libraries: 
     312NATIVE_LDLIBS+= 
     313 
     314 
     315 
     316# config tool generation options 
     317 
     318# CONFIG_TOOL_FILE is the full path name of the generated config tool script 
     319CONFIG_TOOL_FILE=$(OUTPUT_TOOLS_DIR)/$(PROJECT_CONFIG_TOOL) 
     320 
     321# CONFIG_TOOL_PREPROCESS_FLAGS is the preprocessor flags that the config tool script  
     322# will output when given --cppflags 
     323CONFIG_TOOL_PREPROCESS_FLAGS=$(addprefix -I,$(INSTALL_INCLUDE_DIR)) $(addprefix -D,$(DEFINES)) 
     324 
     325# CONFIG_TOOL_COMPILE_FLAGS is the full compile flags that the config tool script  
     326# will output when given --cflags or --cxxflags 
     327CONFIG_TOOL_COMPILE_FLAGS+=$(WARNINGS) $(OPTIMIZE) $(CONFIG_TOOL_PREPROCESS_FLAGS) $(COMPILE_FLAGS) 
     328 
     329 
     330 
     331# mingw32 is a subset of win32 
    33332ifeq ($(TARGET_PLATFORM_MINGW32),1) 
    34 DEFINES+=TARGET_PLATFORM_MINGW32=1 
    35 TARGET_PLATFORM_GENERIC=0 
     333SUFFIXES_TARGET_PLATFORM=MINGW32 WIN32 
    36334EXE=.exe 
    37335PLATFORM_DIRS+=win32 mingw32 
    38 LINK_FLAGS_GUI+=$(LINK_FLAGS_GUI_MINGW32) 
    39 LDLIBS_GUI+=$(LDLIBS_GUI_MINGW32) 
    40 LDLIBS+=$(LDLIBS_MINGW32) 
    41 DEFINES+=$(DEFINES_MINGW32) 
    42 COMPILE_FLAGS+=$(COMPILE_FLAGS_MINGW32) 
    43 LINK_FLAGS+=$(LINK_FLAGS_MINGW32) 
    44 LIB_SRC_DIR+=$(foreach lib,$(TOP_LIB_DIRS_MINGW32) $(TOP_LIB_DIRS_WIN32),$(PROJECT_TOP_DIR)/$(lib)) 
    45 endif 
    46  
     336endif 
     337 
     338 
     339# cygwin is really a subset of posix 
    47340ifeq ($(TARGET_PLATFORM_CYGWIN),1) 
    48 DEFINES+=TARGET_PLATFORM_CYGWIN=1 
    49 TARGET_PLATFORM_GENERIC=0 
     341SUFFIXES_TARGET_PLATFORM=CYGWIN POSIX 
    50342EXE=.exe 
    51 PLATFORM_DIRS+=posix cygwin 
    52 LINK_FLAGS_GUI+=$(LINK_FLAGS_GUI_CYGWIN) 
    53 LDLIBS_GUI+=$(LDLIBS_GUI_CYGWIN) 
    54 LDLIBS+=$(LDLIBS_CYGWIN) 
    55 DEFINES+=$(DEFINES_CYGWIN) $(DEFINES_POSIX) 
    56 COMPILE_FLAGS+=$(COMPILE_FLAGS_CYGWIN) 
    57 LINK_FLAGS+=$(LINK_FLAGS_CYGWIN) $(LINK_FLAGS_POSIX) 
    58 LIB_SRC_DIR+=$(foreach lib, $(TOP_LIB_DIRS_POSIX) $(TOP_LIB_DIRS_CYGWIN),$(TOP_PROJECT_TOP_DIR)/$(lib)) 
    59 endif 
    60  
     343PLATFORM_DIRS+=cygwin posix 
     344endif 
     345 
     346# plain posix is just posix 
    61347ifeq ($(TARGET_PLATFORM_POSIX),1) 
    62 DEFINES+=TARGET_PLATFORM_POSIX=1 
    63 TARGET_PLATFORM_GENERIC=0 
     348SUFFIXES_TARGET_PLATFORM=POSIX 
    64349PLATFORM_DIRS+=posix 
    65 LINK_FLAGS_GUI+=$(LINK_FLAGS_GUI_POSIX) 
    66 LDLIBS_GUI+=$(LDLIBS_GUI_POSIX) 
    67 LDLIBS+=$(LDLIBS_POSIX) 
    68 DEFINES+=$(DEFINES_POSIX) 
    69 COMPILE_FLAGS+=$(COMPILE_FLAGS_POSIX) 
    70 LINK_FLAGS+=$(LINK_FLAGS_POSIX) 
    71 LIB_SRC_DIR+=$(foreach lib,$(TOP_LIB_DIRS_POSIX),$(TOP_PROJECT_TOP_DIR)/$(lib)) 
    72 endif 
    73  
     350endif 
     351 
     352# linux is a subset of posix 
    74353ifeq ($(TARGET_PLATFORM_LINUX),1) 
    75 DEFINES+=TARGET_PLATFORM_LINUX=1 
    76 TARGET_PLATFORM_GENERIC=0 
     354SUFFIXES_TARGET_PLATFORM=POSIX LINUX 
    77355PLATFORM_DIRS+=posix linux 
    78 LINK_FLAGS_GUI+=$(LINK_FLAGS_GUI_LINUX) 
    79 LDLIBS_GUI+=$(LDLIBS_GUI_LINUX) 
    80 LDLIBS+=$(LDLIBS_LINUX) 
    81 DEFINES+=$(DEFINES_LINUX) $(DEFINES_POSIX) 
    82 COMPILE_FLAGS+=$(COMPILE_FLAGS_LINUX) $(COMPILE_FLAGS_POSIX) 
    83 LINK_FLAGS+=$(LINK_FLAGS_LINUX) $(LINK_FLAGS_POSIX) 
    84 LIB_SRC_DIR+=$(foreach lib,$(TOP_LIB_DIRS_POSIX) $(TOP_LIB_DIRS_LINUX),$(PROJECT_TOP_DIR)/$(lib)) 
    85 endif 
    86  
     356endif 
     357 
     358# macosx is a subset of posix 
     359ifeq ($(TARGET_PLATFORM_MACOSX),1) 
     360SUFFIXES_TARGET_PLATFORM=POSIX MACOSX 
     361PLATFORM_DIRS+=posix macosx 
     362endif 
     363 
     364# macosx_ppc is a subset of macosx and posix 
    87365ifeq ($(TARGET_PLATFORM_MACOSX_PPC),1) 
    88 DEFINES+=TARGET_PLATFORM_MACOSX=1 
    89 TARGET_PLATFORM_GENERIC=0 
    90 TARGET_PLATFORM_MACOSX=1 
    91 PLATFORM_DIRS=macosx posix macosx-ppc 
     366SUFFIXES_TARGET_PLATFORM=POSIX MACOSX 
     367PLATFORM_DIRS+=posix macosx macosx-ppc 
     368endif 
     369 
     370# macosx_i386 is a subset of macosx and posix 
     371ifeq ($(TARGET_PLATFORM_MACOSX_I386),1) 
     372SUFFIXES_TARGET_PLATFORM=POSIX MACOSX 
     373PLATFORM_DIRS+=posix macosx macosx-i386 
     374endif 
     375 
     376# macosx_universal is a subset of macosx and posix and uses mac libtool to generate fat binaries. 
     377ifeq ($(TARGET_PLATFORM_MACOSX_UNIVERSAL),1) 
     378SUFFIXES_TARGET_PLATFORM=POSIX MACOSX 
     379PLATFORM_DIRS+=posix macosx macosx-ppc macosx-i386 
     380TARGET_MACOSX_SDK?=/Developer/SDKs/MacOSX10.4u.sdk 
     381COMPILE_FLAGS+=-isysroot $(TARGET_MACOSX_SDK) -arch i386 -arch ppc 
     382LINK_FLAGS+=-isysroot $(TARGET_MACOSX_SDK) -arch i386 -arch ppc 
    92383TARGET_USE_AR=0 
    93384TARGET_USE_MACOSX_LIBTOOL=1 
    94385MACOSX_LIBTOOL=libtool 
    95386MACOSX_LIBTOOLFLAGS?=-static 
    96 LINK_FLAGS_GUI+=$(LINK_FLAGS_GUI_MACOSX) 
    97 LDLIBS_GUI+=$(LDLIBS_GUI_MACOSX) 
    98 LDLIBS+=$(LDLIBS_MACOSX_PPC) $(LDLIBS_MACOSX) 
    99 DEFINES+=$(DEFINES_MACOSX_PPC) $(DEFINES_POSIX) $(DEFINES_MACOSX) 
    100 COMPILE_FLAGS+=$(COMPILE_FLAGS_MACOSX_PPC) $(COMPILE_FLAGS_POSIX) $(COMPILE_FLAGS_MACOSX) 
    101 LINK_FLAGS+=$(LINK_FLAGS_MACOSX_PPC) $(LINK_FLAGS_POSIX) $(LINK_FLAGS_MACOSX) 
    102 LIB_SRC_DIR+=$(foreach lib,$(TOP_LIB_DIRS_POSIX) $(TOP_LIB_DIRS_MACOSX),$(PROJECT_TOP_DIR)/$(lib)) 
    103 endif 
    104  
    105 ifeq ($(TARGET_PLATFORM_MACOSX_I386),1) 
    106 DEFINES+=TARGET_PLATFORM_MACOSX=1 
    107 TARGET_PLATFORM_GENERIC=0 
    108 TARGET_PLATFORM_MACOSX=1 
    109 PLATFORM_DIRS=macosx posix macosx-i386 
    110 TARGET_USE_AR=0 
    111 TARGET_USE_MACOSX_LIBTOOL=1 
    112 MACOSX_LIBTOOL=libtool 
    113 MACOSX_LIBTOOLFLAGS?=-static 
    114 LINK_FLAGS_GUI+=$(LINK_FLAGS_GUI_MACOSX) 
    115 LDLIBS_GUI+=$(LDLIBS_GUI_MACOSX) 
    116 LDLIBS+=$(LDLIBS_MACOSX_I386) $(LDLIBS_MACOSX) 
    117 DEFINES+=$(DEFINES_MACOSX_I386) $(DEFINES_POSIX) $(DEFINES_MACOSX) 
    118 COMPILE_FLAGS+=$(COMPILE_FLAGS_MACOSX_I386) $(COMPILE_FLAGS_POSIX) $(COMPILE_FLAGS_MACOSX) 
    119 LINK_FLAGS+=$(LINK_FLAGS_MACOSX_I386) $(LINK_FLAGS_POSIX) $(LINK_FLAGS_MACOSX) 
    120 LIB_SRC_DIR+=$(foreach lib,$(TOP_LIB_DIRS_POSIX) $(TOP_LIB_DIRS_MACOSX),$(PROJECT_TOP_DIR)/$(lib)) 
    121 endif 
    122  
    123 ifeq ($(TARGET_PLATFORM_MACOSX_UNIVERSAL),1) 
    124 DEFINES+=TARGET_PLATFORM_MACOSX=1 
    125 TARGET_PLATFORM_GENERIC=0 
    126 TARGET_PLATFORM_MACOSX=1 
    127 PLATFORM_DIRS=macosx posix macosx-ppc macosx-i386 
    128 AUTODEPEND=0 
    129 TARGET_MACOSX_SDK?=/Developer/SDKs/MacOSX10.4u.sdk 
    130 COMPILE_FLAGS+=-isysroot $(TARGET_MACOSX_SDK) -arch i386 -arch ppc 
    131 LINK_FLAGS+=-isysroot $(TARGET_MACOSX_SDK) -arch i386 -arch ppc 
    132 #-Wl,-syslibroot,$(TARGET_MACOSX_SDK) 
    133 TARGET_USE_AR=0 
    134 TARGET_USE_MACOSX_LIBTOOL=1 
    135 MACOSX_LIBTOOL=libtool 
    136 MACOSX_LIBTOOLFLAGS?=-static 
    137 LINK_FLAGS_GUI+=$(LINK_FLAGS_GUI_MACOSX) 
    138 LDLIBS_GUI+=$(LDLIBS_GUI_MACOSX) 
    139 LDLIBS+=$(LDLIBS_MACOSX_UNIVERSAL) $(LDLIBS_MACOSX) 
    140 DEFINES+=$(DEFINES_MACOSX_UNIVERSAL) $(DEFINES_POSIX) $(DEFINES_MACOSX) 
    141 COMPILE_FLAGS+=$(COMPILE_FLAGS_MACOSX_UNIVERSAL) $(COMPILE_FLAGS_POSIX) $(COMPILE_FLAGS_MACOSX) 
    142 LINK_FLAGS+=$(LINK_FLAGS_MACOSX_UNIVERSAL) $(LINK_FLAGS_POSIX) $(LINK_FLAGS_MACOSX) 
    143 LIB_SRC_DIR+=$(foreach lib,$(TOP_LIB_DIRS_POSIX) $(TOP_LIB_DIRS_MACOSX),$(PROJECT_TOP_DIR)/$(lib)) 
    144 endif 
    145  
    146 ifeq ($(CROSS_COMPILING),1) 
    147 HOST_PLATFORM_GENERIC=1 
    148 HOST_PLATFORM_MINGW32?=0 
    149 HOST_PLATFORM_CYGWIN?=0 
    150 HOST_PLATFORM_LINUX?=0 
    151 HOST_PLATFORM_POSIX?=0 
    152 HOST_PLATFORM_MACOSX_PPC?=0 
    153 HOST_PLATFORM_MACOSX_I386?=0 
    154 HOST_PLATFORM_MACOSX_UNIVERSAL?=0 
    155 HOST_USE_AR?=1 
    156 HOST_USE_MACOSX_LIBTOOL?=0 
    157 NATIVE_AUTODEPEND=1 
    158  
    159 NATIVE_COMPILE.cpp=$(NATIVE_CXX) $(NATIVE_CXXFLAGS) -c 
    160 NATIVE_COMPILE.c=$(NATIVE_CC) $(NATIVE_CFLAGS) -c 
    161 NATIVE_COMPILE.mm=$(NATIVE_CXX) $(NATIVE_MMFLAGS) -c 
    162 NATIVE_COMPILE.m=$(NATIVE_CC) $(NATIVE_MFLAGS) -c 
    163  
    164 NATIVE_LINK.cpp=$(NATIVE_CXX) $(NATIVE_CXXFLAGS) $(NATIVE_LDFLAGS) $(NATIVE_LDLIBS) 
    165 NATIVE_LINK.c=$(NATIVE_CC) $(NATIVE_CFLAGS) $(NATIVE_LDFLAGS) $(NATIVE_LDLIBS) 
    166 NATIVE_LINK.mm=$(NATIVE_CXX) $(NATIVE_MMFLAGS) $(NATIVE_LDFLAGS) $(NATIVE_LDLIBS) 
    167 NATIVE_LINK.m=$(NATIVE_CC) $(NATIVE_MFLAGS) $(NATIVE_LDFLAGS) $(NATIVE_LDLIBS) 
    168  
    169  
    170 ifeq ($(HOST_PLATFORM_MINGW32),1) 
    171 NATIVE_DEFINES+=HOST_PLATFORM_MINGW32=1 
    172 HOST_PLATFORM_GENERIC=0 
    173 NATIVE_EXE=.exe 
    174 NATIVE_PLATFORM_DIRS+=win32 mingw32 
    175 NATIVE_LDLIBS+=$(LDLIBS_MINGW32) 
    176 NATIVE_DEFINES+=$(DEFINES_MINGW32) 
    177 NATIVE_COMPILE_FLAGS+=$(COMPILE_FLAGS_MINGW32) 
    178 NATIVE_LINK_FLAGS+=$(LINK_FLAGS_MINGW32) 
    179 NATIVE_LIB_SRC_DIR+=$(foreach lib,$(TOP_LIB_DIRS_MINGW32) $(TOP_LIB_DIRS_WIN32),$(PROJECT_TOP_DIR)/$(lib)) 
    180 endif 
    181  
    182 ifeq ($(HOST_PLATFORM_CYGWIN),1) 
    183 NATIVE_DEFINES+=HOST_PLATFORM_CYGWIN=1 
    184 HOST_PLATFORM_GENERIC=0 
    185 NATIVE_EXE=.exe 
    186 PLATFORM_DIRS+=posix cygwin 
    187 NATIVE_LDLIBS+=$(LDLIBS_CYGWIN) 
    188 NATIVE_DEFINES+=$(DEFINES_CYGWIN) $(DEFINES_POSIX) 
    189 NATIVE_COMPILE_FLAGS+=$(COMPILE_FLAGS_CYGWIN) $(COMPILE_FLAGS_POSIX) 
    190 NATIVE_LINK_FLAGS+=$(LINK_FLAGS_CYGWIN) $(LINK_FLAGS_POSIX) 
    191 NATIVE_LIB_SRC_DIR+=$(foreach lib,$(TOP_LIB_DIRS_POSIX) $(TOP_LIB_DIRS_CYGWIN),$(PROJECT_TOP_DIR)/$(lib)) 
    192 endif 
    193  
    194 ifeq ($(HOST_PLATFORM_POSIX),1) 
    195 NATIVE_DEFINES+=HOST_PLATFORM_POSIX=1 
    196 HOST_PLATFORM_GENERIC=0 
    197 NATIVE_PLATFORM_DIRS+=posix  
    198 NATIVE_LDLIBS+=$(LDLIBS_POSIX) 
    199 NATIVE_DEFINES+=$(DEFINES_POSIX) 
    200 NATIVE_COMPILE_FLAGS+=$(COMPILE_FLAGS_POSIX) 
    201 NATIVE_LINK_FLAGS+=$(LINK_FLAGS_POSIX) 
    202 NATIVE_LIB_SRC_DIR+=$(foreach lib,$(TOP_LIB_DIRS_POSIX),$(PROJECT_TOP_DIR)/$(lib)) 
    203 endif 
    204  
    205 ifeq ($(HOST_PLATFORM_LINUX),1) 
    206 NATIVE_DEFINES+=HOST_PLATFORM_LINUX=1 
    207 HOST_PLATFORM_GENERIC=0 
    208 NATIVE_PLATFORM_DIRS+=posix linux 
    209 NATIVE_LDLIBS+=$(LDLIBS_LINUX) 
    210 NATIVE_DEFINES+=$(DEFINES_LINUX) $(DEFINES_POSIX) 
    211 NATIVE_COMPILE_FLAGS+=$(COMPILE_FLAGS_LINUX) $(COMPILE_FLAGS_POSIX) 
    212 NATIVE_LINK_FLAGS+=$(LINK_FLAGS_LINUX) $(LINK_FLAGS_POSIX) 
    213 NATIVE_LIB_SRC_DIR+=$(foreach lib,$(TOP_LIB_DIRS_POSIX) $(TOP_LIB_DIRS_LINUX),$(PROJECT_TOP_DIR)/$(lib)) 
    214 endif 
    215  
    216 ifeq ($(HOST_PLATFORM_MACOSX_PPC),1) 
    217 NATIVE_DEFINES+=HOST_PLATFORM_MACOSX=1 
    218 HOST_PLATFORM_GENERIC=0 
    219 HOST_PLATFORM_MACOSX=1 
    220 NATIVE_PLATFORM_DIRS=macosx posix macosx-ppc 
    221 HOST_USE_AR=0 
    222 HOST_USE_MACOSX_LIBTOOL=1 
    223 NATIVE_MACOSX_LIBTOOL=libtool 
    224 NATIVE_MACOSX_LIBTOOLFLAGS?=-static 
    225 NATIVE_LDLIBS+=$(LDLIBS_MACOSX_PPC) $(LDLIBS_MACOSX) 
    226 NATIVE_DEFINES+=$(DEFINES_MACOSX_PPC) $(DEFINES_POSIX) $(DEFINES_MACOSX) 
    227 NATIVE_COMPILE_FLAGS+=$(COMPILE_FLAGS_MACOSX_PPC) $(COMPILE_FLAGS_POSIX) $(COMPILE_FLAGS_MACOSX) 
    228 NATIVE_LINK_FLAGS+=$(LINK_FLAGS_MACOSX_PPC) $(LINK_FLAGS_POSIX) 
    229 NATIVE_LIB_SRC_DIR+=$(foreach lib,$(TOP_LIB_DIRS_POSIX) $(TOP_LIB_DIRS_MACOSX),$(PROJECT_TOP_DIR)/$(lib)) 
    230 endif 
    231  
    232 ifeq ($(HOST_PLATFORM_MACOSX_I386),1) 
    233 DEFINES+=HOST_PLATFORM_MACOSX=1 
    234 HOST_PLATFORM_GENERIC=0 
    235 HOST_PLATFORM_MACOSX=1 
    236 NATIVE_PLATFORM_DIRS=macosx posix macosx-i386 
    237 HOST_USE_AR=0 
    238 HOST_USE_MACOSX_LIBTOOL=1 
    239 NATIVE_MACOSX_LIBTOOL=libtool 
    240 NATIVE_MACOSX_LIBTOOLFLAGS?=-static 
    241 NATIVE_LDLIBS+=$(LDLIBS_MACOSX_I386) $(LDLIBS_MACOSX) 
    242 NATIVE_DEFINES+=$(DEFINES_MACOSX_I386) $(DEFINES_POSIX) $(DEFINES_MACOSX) 
    243 NATIVE_COMPILE_FLAGS+=$(COMPILE_FLAGS_MACOSX_I386) $(COMPILE_FLAGS_POSIX) $(COMPILE_FLAGS_MACOSX) 
    244 NATIVE_LINK_FLAGS+=$(LINK_FLAGS_MACOSX_I386) $(LINK_FLAGS_POSIX) 
    245 NATIVE_LIB_SRC_DIR+=$(foreach lib,$(TOP_LIB_DIRS_POSIX) $(TOP_LIB_DIRS_MACOSX),$(PROJECT_TOP_DIR)/$(lib)) 
    246 endif 
    247  
    248 ifeq ($(HOST_PLATFORM_MACOSX_UNIVERSAL),1) 
    249 DEFINES+=HOST_PLATFORM_MACOSX=1 
    250 HOST_PLATFORM_GENERIC=0 
    251 HOST_PLATFORM_MACOSX=1 
    252 NATIVE_PLATFORM_DIRS=macosx posix macosx-ppc macosx-i386 
    253 NATIVE_AUTODEPEND=0 
    254 HOST_MACOSX_SDK?=/Developer/SDKs/MacOSX10.4u.sdk 
    255 NATIVE_COMPILE_FLAGS+=-isysroot $(HOST_MACOSX_SDK) -arch i386 -arch ppc 
    256 #NATIVE_LINK_FLAGS+=-Wl,-syslibroot,$(HOST_MACOSX_SDK) 
    257 HOST_USE_AR=0 
    258 HOST_USE_MACOSX_LIBTOOL=1 
    259 NATIVE_MACOSX_LIBTOOL=libtool 
    260 NATIVE_MACOSX_LIBTOOLFLAGS?=-static 
    261 NATIVE_LDLIBS+=$(LDLIBS_MACOSX_UNIVERSAL) $(LDLIBS_MACOSX) 
    262 NATIVE_DEFINES+=$(DEFINES_MACOSX_UNIVERSAL) $(DEFINES_POSIX) $(DEFINES_MACOSX) 
    263 NATIVE_COMPILE_FLAGS+=$(COMPILE_FLAGS_MACOSX_UNIVERSAL) $(COMPILE_FLAGS_POSIX) $(COMPILE_FLAGS_MACOSX) 
    264 NATIVE_LINK_FLAGS+=$(LINK_FLAGS_MACOSX_UNIVERSAL) $(LINK_FLAGS_POSIX) 
    265 NATIVE_LIB_SRC_DIR+=$(foreach lib,$(TOP_LIB_DIRS_POSIX) $(TOP_LIB_DIRS_MACOSX),$(PROJECT_TOP_DIR)/$(lib)) 
    266 endif 
    267  
    268 NATIVE_BUILD_DIR=$(PWD) 
    269<