VirtualBox

source: kBuild/trunk/Config.kmk@ 563

Last change on this file since 563 was 557, checked in by bird, 18 years ago

Initial Mac OS X / Darwin bootstrapping.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.6 KB
Line 
1# $Id: Config.kmk 557 2006-09-28 15:56:25Z bird $
2## @file
3#
4# Build Configuration.
5#
6# Copyright (c) 2005-2006 knut st. osmundsen <[email protected]>
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
27# Enable automatic installation of what's built.
28KBUILD_DO_AUTO_INSTALL := 1
29
30#
31# Template for building commandline tools.
32#
33TEMPLATE_BIN = Commandline binary
34
35TEMPLATE_BIN_INCS = $(PATH_ROOT)/src/lib
36
37ifeq ($(BUILD_TARGET),os2)
38TEMPLATE_BIN_TOOL = GCC3OMF
39TEMPLATE_BIN_CFLAGS.profile = -pg
40TEMPLATE_BIN_CFLAGS.release = -O3
41TEMPLATE_BIN_LDFLAGS = -Zhigh-mem -Zstack=1024
42TEMPLATE_BIN_INST = kBuild/bin/x86.os2/
43endif
44
45ifeq ($(BUILD_TARGET),darwin)
46TEMPLATE_BIN_TOOL = GCC4MACH
47TEMPLATE_BIN_CFLAGS.profile =
48TEMPLATE_BIN_CFLAGS.release = -O3
49TEMPLATE_BIN_LDFLAGS =
50TEMPLATE_BIN_INST = kBuild/bin/$(BUILD_TARGET_ARCH).$(BUILD_TARGET)/
51endif
52
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
57TEMPLATE_BIN_TOOL = VCC70
58TEMPLATE_BIN_DEFS = WINDOWS32 _CONSOLE WIN32 __WIN32__
59TEMPLATE_BIN_DEFS.release = NDEBUG
60TEMPLATE_BIN_CFLAGS = -MT -W3 -Zi -Zl
61TEMPLATE_BIN_CFLAGS.release = -O2
62TEMPLATE_BIN_CFLAGS.profile = -O2 -GH -Gh
63#todo use path macros from the tool
64TEMPLATE_BIN_INCS += \
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
71TEMPLATE_BIN_LDFLAGS.profile = /DEBUG
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
78TEMPLATE_BIN_LIBS.profile = g:/coding/vbox/trunk/out/win32/debug/lib/kPrf2.lib
79TEMPLATE_BIN_INST = kBuild/bin/x86.win32/
80endif
81
82ifndef TEMPLATE_BIN_TOOL
83TEMPLATE_BIN_TOOL = GCC3
84TEMPLATE_BIN_CFLAGS.release = -O3
85TEMPLATE_BIN_LDFLAGS = -static
86ifeq ($(BUILD_TARGET),linux)
87TEMPLATE_BIN_LIBS += rt
88endif
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
94TEMPLATE_BIN_INST = kBuild/bin/$(BUILD_TARGET_ARCH).$(BUILD_TARGET)/
95endif
96
97
98
99#
100# Template for building libraries for the tools.
101#
102TEMPLATE_LIB = Library for Commandline binary
103TEMPLATE_LIB_EXTENDS = BIN
104TEMPLATE_LIB_INST = lib/
105# for LIB_KDEP
106TEMPLATE_LIB_TOOL = $(TEMPLATE_BIN_TOOL)
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.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette