source: trunk/Config.kmk@ 565

Last change on this file since 565 was 565, checked in by bird, 19 years ago

GCC4MACH -> GCC4MACHO.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.6 KB
RevLine 
[270]1# $Id: Config.kmk 565 2006-10-08 01:56:51Z bird $
2## @file
3#
4# Build Configuration.
5#
[557]6# Copyright (c) 2005-2006 knut st. osmundsen <bird@anduin.net>
[270]7#
8#
9# This file is part of kBuild.
10#
11# kBuild is free software; you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 2 of the License, or
14# (at your option) any later version.
15#
16# kBuild is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with kBuild; if not, write to the Free Software
23# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24#
25#
26
[467]27# Enable automatic installation of what's built.
28KBUILD_DO_AUTO_INSTALL := 1
[270]29
30#
31# Template for building commandline tools.
32#
33TEMPLATE_BIN = Commandline binary
34
[400]35TEMPLATE_BIN_INCS = $(PATH_ROOT)/src/lib
36
[270]37ifeq ($(BUILD_TARGET),os2)
38TEMPLATE_BIN_TOOL = GCC3OMF
[427]39TEMPLATE_BIN_CFLAGS.profile = -pg
[270]40TEMPLATE_BIN_CFLAGS.release = -O3
41TEMPLATE_BIN_LDFLAGS = -Zhigh-mem -Zstack=1024
42TEMPLATE_BIN_INST = kBuild/bin/x86.os2/
43endif
44
[557]45ifeq ($(BUILD_TARGET),darwin)
[565]46TEMPLATE_BIN_TOOL = GCC4MACHO
[557]47TEMPLATE_BIN_CFLAGS.profile =
48TEMPLATE_BIN_CFLAGS.release = -O3
49TEMPLATE_BIN_LDFLAGS =
50TEMPLATE_BIN_INST = kBuild/bin/$(BUILD_TARGET_ARCH).$(BUILD_TARGET)/
51endif
52
[552]53ifeq ($(filter-out x86.win32 x86.win x86.nt,$(BUILD_TARGET_ARCH).$(BUILD_TARGET)),)
54ifndef PATH_DEV
55$(error To build on windows you'll have to set PATH_DEV to point to somewhere kbuild can find VCC70.)
56endif
[270]57TEMPLATE_BIN_TOOL = VCC70
[400]58TEMPLATE_BIN_DEFS = WINDOWS32 _CONSOLE WIN32 __WIN32__
[270]59TEMPLATE_BIN_DEFS.release = NDEBUG
[533]60TEMPLATE_BIN_CFLAGS = -MT -W3 -Zi -Zl
61TEMPLATE_BIN_CFLAGS.release = -O2
62TEMPLATE_BIN_CFLAGS.profile = -O2 -GH -Gh
[552]63#todo use path macros from the tool
[400]64TEMPLATE_BIN_INCS += \
[270]65 . \
66 $(PATH_ROOT)/src/gmake/w32/include \
67 $(PATH_ROOT)/src/gmake/glob \
68 $(PATH_DEV)/x86.win32/vcc70/include \
69 $(PATH_DEV)/x86.win32/sdk200209/include
70TEMPLATE_BIN_LDFLAGS = /SUBSYSTEM:console /INCREMENTAL:no /NOD
[533]71TEMPLATE_BIN_LDFLAGS.profile = /DEBUG
[270]72TEMPLATE_BIN_LIBS = \
73 $(PATH_DEV)/x86.win32/vcc70/lib/libcmt.lib \
74 $(PATH_DEV)/x86.win32/vcc70/lib/oldnames.lib \
75 $(PATH_DEV)/x86.win32/sdk200209/lib/Kernel32.Lib \
76 $(PATH_DEV)/x86.win32/sdk200209/lib/User32.Lib \
77 $(PATH_DEV)/x86.win32/sdk200209/lib/AdvAPI32.Lib
[533]78TEMPLATE_BIN_LIBS.profile = g:/coding/vbox/trunk/out/win32/debug/lib/kPrf2.lib
[270]79TEMPLATE_BIN_INST = kBuild/bin/x86.win32/
80endif
81
82ifndef TEMPLATE_BIN_TOOL
83TEMPLATE_BIN_TOOL = GCC3
84TEMPLATE_BIN_CFLAGS.release = -O3
[401]85TEMPLATE_BIN_LDFLAGS = -static
[270]86ifeq ($(BUILD_TARGET),linux)
[298]87TEMPLATE_BIN_LIBS += rt
[270]88endif
[298]89ifeq ($(BUILD_TARGET),freebsd)
90TEMPLATE_BIN_LIBS += iconv intl
91TEMPLATE_BIN_LIBPATH += /usr/local/lib
92TEMPLATE_BIN_INCS += $(PATH_ROOT)/src/gmake/glob /usr/local/include
93endif
[270]94TEMPLATE_BIN_INST = kBuild/bin/$(BUILD_TARGET_ARCH).$(BUILD_TARGET)/
95endif
96
97
[393]98
99#
100# Template for building libraries for the tools.
101#
102TEMPLATE_LIB = Library for Commandline binary
[557]103TEMPLATE_LIB_EXTENDS = BIN
104TEMPLATE_LIB_INST = lib/
105# for LIB_KDEP
106TEMPLATE_LIB_TOOL = $(TEMPLATE_BIN_TOOL)
[393]107
108
109LIB_KDEP = $(PATH_OUT)/$(TEMPLATE_LIB_INST)$(TOOL_$(TEMPLATE_LIB_TOOL)_ARLIBPREF)kDep$$(TOOL_$(TEMPLATE_LIB_TOOL)_ARLIBSUFF)
110
Note: See TracBrowser for help on using the repository browser.