VirtualBox

source: kBuild/trunk/Config.kmk@ 581

Last change on this file since 581 was 576, checked in by bird, 18 years ago

versioning. fixes #5

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.9 KB
Line 
1# $Id: Config.kmk 576 2006-11-23 09:58:23Z 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#
32# The kBuild version.
33#
34KBUILD_VERSION_MAJOR = 0
35KBUILD_VERSION_MINOR = 1
36KBUILD_VERSION_PATCH = 0
37KBUILD_VERSION = "0.1.0"
38DEFS += \
39 KBUILD_VERSION_MAJOR=$(KBUILD_VERSION_MAJOR) \
40 KBUILD_VERSION_MINOR=$(KBUILD_VERSION_MINOR) \
41 KBUILD_VERSION_PATCH=$(KBUILD_VERSION_PATCH)
42
43#
44# Template for building commandline tools.
45#
46TEMPLATE_BIN = Commandline binary
47
48TEMPLATE_BIN_INCS = $(PATH_ROOT)/src/lib
49
50ifeq ($(BUILD_TARGET),os2)
51TEMPLATE_BIN_TOOL = GCC3OMF
52TEMPLATE_BIN_CFLAGS.profile = -pg
53TEMPLATE_BIN_CFLAGS.release = -O3
54TEMPLATE_BIN_LDFLAGS = -Zhigh-mem -Zstack=1024
55TEMPLATE_BIN_INST = kBuild/bin/x86.os2/
56endif
57
58ifeq ($(BUILD_TARGET),darwin)
59TEMPLATE_BIN_TOOL = GCC4MACHO
60TEMPLATE_BIN_CFLAGS.profile =
61TEMPLATE_BIN_CFLAGS.release = -O3
62TEMPLATE_BIN_LDFLAGS =
63TEMPLATE_BIN_INST = kBuild/bin/$(BUILD_TARGET_ARCH).$(BUILD_TARGET)/
64endif
65
66ifeq ($(filter-out x86.win32 x86.win x86.nt,$(BUILD_TARGET_ARCH).$(BUILD_TARGET)),)
67ifndef PATH_DEV
68$(error To build on windows you'll have to set PATH_DEV to point to somewhere kbuild can find VCC70.)
69endif
70TEMPLATE_BIN_TOOL = VCC70
71TEMPLATE_BIN_DEFS = WINDOWS32 _CONSOLE WIN32 __WIN32__
72TEMPLATE_BIN_DEFS.release = NDEBUG
73TEMPLATE_BIN_CFLAGS = -MT -W3 -Zi -Zl
74TEMPLATE_BIN_CFLAGS.release = -O2
75TEMPLATE_BIN_CFLAGS.profile = -O2 -GH -Gh
76#todo use path macros from the tool
77TEMPLATE_BIN_INCS += \
78 . \
79 $(PATH_ROOT)/src/gmake/w32/include \
80 $(PATH_ROOT)/src/gmake/glob \
81 $(PATH_DEV)/x86.win32/vcc70/include \
82 $(PATH_DEV)/x86.win32/sdk200209/include
83TEMPLATE_BIN_LDFLAGS = /SUBSYSTEM:console /INCREMENTAL:no /NOD
84TEMPLATE_BIN_LDFLAGS.profile = /DEBUG
85TEMPLATE_BIN_LIBS = \
86 $(PATH_DEV)/x86.win32/vcc70/lib/libcmt.lib \
87 $(PATH_DEV)/x86.win32/vcc70/lib/oldnames.lib \
88 $(PATH_DEV)/x86.win32/sdk200209/lib/Kernel32.Lib \
89 $(PATH_DEV)/x86.win32/sdk200209/lib/User32.Lib \
90 $(PATH_DEV)/x86.win32/sdk200209/lib/AdvAPI32.Lib
91TEMPLATE_BIN_LIBS.profile = g:/coding/vbox/trunk/out/win32/debug/lib/kPrf2.lib
92TEMPLATE_BIN_INST = kBuild/bin/x86.win32/
93endif
94
95ifndef TEMPLATE_BIN_TOOL
96TEMPLATE_BIN_TOOL = GCC3
97TEMPLATE_BIN_CFLAGS.release = -O3
98TEMPLATE_BIN_LDFLAGS = -static
99ifeq ($(BUILD_TARGET),linux)
100TEMPLATE_BIN_LIBS += rt
101endif
102ifeq ($(BUILD_TARGET),freebsd)
103TEMPLATE_BIN_LIBS += iconv intl
104TEMPLATE_BIN_LIBPATH += /usr/local/lib
105TEMPLATE_BIN_INCS += $(PATH_ROOT)/src/gmake/glob /usr/local/include
106endif
107TEMPLATE_BIN_INST = kBuild/bin/$(BUILD_TARGET_ARCH).$(BUILD_TARGET)/
108endif
109
110
111
112#
113# Template for building libraries for the tools.
114#
115TEMPLATE_LIB = Library for Commandline binary
116TEMPLATE_LIB_EXTENDS = BIN
117TEMPLATE_LIB_INST = lib/
118# for LIB_KDEP
119TEMPLATE_LIB_TOOL = $(TEMPLATE_BIN_TOOL)
120
121
122LIB_KDEP = $(PATH_OUT)/$(TEMPLATE_LIB_INST)$(TOOL_$(TEMPLATE_LIB_TOOL)_ARLIBPREF)kDep$$(TOOL_$(TEMPLATE_LIB_TOOL)_ARLIBSUFF)
123
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