# $Id: Config.kmk 582 2006-11-23 13:45:47Z bird $ ## @file # # Build Configuration. # # Copyright (c) 2005-2006 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 # # The kBuild version. # KBUILD_VERSION_MAJOR = 0 KBUILD_VERSION_MINOR = 1 KBUILD_VERSION_PATCH = 0 KBUILD_VERSION = "0.1.0" DEFS += \ KBUILD_VERSION_MAJOR=$(KBUILD_VERSION_MAJOR) \ KBUILD_VERSION_MINOR=$(KBUILD_VERSION_MINOR) \ KBUILD_VERSION_PATCH=$(KBUILD_VERSION_PATCH) # # 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),darwin) TEMPLATE_BIN_TOOL = GCC4MACHO TEMPLATE_BIN_CFLAGS.profile = TEMPLATE_BIN_CFLAGS.release = -O3 TEMPLATE_BIN_LDFLAGS = TEMPLATE_BIN_INST = kBuild/bin/$(BUILD_TARGET_ARCH).$(BUILD_TARGET)/ endif ifeq ($(filter-out x86.win32 x86.win x86.nt,$(BUILD_TARGET_ARCH).$(BUILD_TARGET)),) ifndef PATH_DEV $(error To build on windows you'll have to set PATH_DEV to point to somewhere kbuild can find VCC70.) endif TEMPLATE_BIN_TOOL = VCC70 TEMPLATE_BIN_DEFS = WINDOWS32 _CONSOLE WIN32 __WIN32__ TEMPLATE_BIN_DEFS.release = NDEBUG TEMPLATE_BIN_CFLAGS = -MT -W3 -Zi -Zl TEMPLATE_BIN_CFLAGS.release = -O2 TEMPLATE_BIN_CFLAGS.profile = -O2 -GH -Gh #todo use path macros from the tool 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_LDFLAGS.profile = /DEBUG 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_LIBS.profile = g:/coding/vbox/trunk/out/win32/debug/lib/kPrf2.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_EXTENDS = BIN TEMPLATE_LIB_INST = lib/ # for LIB_KDEP TEMPLATE_LIB_TOOL = $(TEMPLATE_BIN_TOOL) LIB_KDEP = $(PATH_OUT)/$(TEMPLATE_LIB_INST)$(TOOL_$(TEMPLATE_LIB_TOOL)_ARLIBPREF)kDep$(TOOL_$(TEMPLATE_LIB_TOOL)_ARLIBSUFF)