# $Id$ ## @file # # Build Configuration. # # Copyright (c) 2005 knut st. osmundsen # # # This file is part of kBuild. # # kBuild is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # kBuild is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with kBuild; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # # Enable automatic installation of what's built. KBUILD_DO_AUTO_INSTALL := 1 # # Template for building commandline tools. # TEMPLATE_BIN = Commandline binary TEMPLATE_BIN_INCS = $(PATH_ROOT)/src/lib ifeq ($(BUILD_TARGET),os2) TEMPLATE_BIN_TOOL = GCC3OMF TEMPLATE_BIN_CFLAGS.profile = -pg TEMPLATE_BIN_CFLAGS.release = -O3 TEMPLATE_BIN_LDFLAGS = -Zhigh-mem -Zstack=1024 TEMPLATE_BIN_INST = kBuild/bin/x86.os2/ endif ifeq ($(BUILD_TARGET),win32) TEMPLATE_BIN_TOOL = VCC70 TEMPLATE_BIN_DEFS = WINDOWS32 _CONSOLE WIN32 __WIN32__ TEMPLATE_BIN_DEFS.release = NDEBUG TEMPLATE_BIN_CFLAGS = -MT -W3 TEMPLATE_BIN_INCS += \ . \ $(PATH_ROOT)/src/gmake/w32/include \ $(PATH_ROOT)/src/gmake/glob \ $(PATH_DEV)/x86.win32/vcc70/include \ $(PATH_DEV)/x86.win32/sdk200209/include TEMPLATE_BIN_LDFLAGS = /SUBSYSTEM:console /INCREMENTAL:no /NOD TEMPLATE_BIN_LIBS = \ $(PATH_DEV)/x86.win32/vcc70/lib/libcmt.lib \ $(PATH_DEV)/x86.win32/vcc70/lib/oldnames.lib \ $(PATH_DEV)/x86.win32/sdk200209/lib/Kernel32.Lib \ $(PATH_DEV)/x86.win32/sdk200209/lib/User32.Lib \ $(PATH_DEV)/x86.win32/sdk200209/lib/AdvAPI32.Lib TEMPLATE_BIN_INST = kBuild/bin/x86.win32/ endif ifndef TEMPLATE_BIN_TOOL TEMPLATE_BIN_TOOL = GCC3 TEMPLATE_BIN_CFLAGS.release = -O3 TEMPLATE_BIN_LDFLAGS = -static ifeq ($(BUILD_TARGET),linux) TEMPLATE_BIN_LIBS += rt endif ifeq ($(BUILD_TARGET),freebsd) TEMPLATE_BIN_LIBS += iconv intl TEMPLATE_BIN_LIBPATH += /usr/local/lib TEMPLATE_BIN_INCS += $(PATH_ROOT)/src/gmake/glob /usr/local/include endif TEMPLATE_BIN_INST = kBuild/bin/$(BUILD_TARGET_ARCH).$(BUILD_TARGET)/ endif # # Template for building libraries for the tools. # TEMPLATE_LIB = Library for Commandline binary TEMPLATE_LIB_TOOL = $(TEMPLATE_BIN_TOOL) TEMPLATE_LIB_INST = lib/ TEMPLATE_LIB_INCS = $(TEMPLATE_BIN_INCS) TEMPLATE_LIB_INCS.$(BUILD_TYPE) = $(TEMPLATE_BIN_INCS.$(BUILD_TYPE)) TEMPLATE_LIB_DEFS = $(TEMPLATE_BIN_DEFS) TEMPLATE_LIB_DEFS.$(BUILD_TYPE) = $(TEMPLATE_BIN_DEFS.$(BUILD_TYPE)) TEMPLATE_LIB_CFLAGS = $(TEMPLATE_BIN_CFLAGS) TEMPLATE_LIB_CFLAGS.$(BUILD_TYPE) = $(TEMPLATE_BIN_CFLAGS.$(BUILD_TYPE)) TEMPLATE_LIB_CXXFLAGS = $(TEMPLATE_BIN_CXXFLAGS) TEMPLATE_LIB_CXXFLAGS.$(BUILD_TYPE) = $(TEMPLATE_BIN_CXXFLAGS.$(BUILD_TYPE)) LIB_KDEP = $(PATH_OUT)/$(TEMPLATE_LIB_INST)$(TOOL_$(TEMPLATE_LIB_TOOL)_ARLIBPREF)kDep$$(TOOL_$(TEMPLATE_LIB_TOOL)_ARLIBSUFF)