source: trunk/Config.kmk@ 579

Last change on this file since 579 was 576, checked in by bird, 19 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
RevLine 
[270]1# $Id: Config.kmk 576 2006-11-23 09:58:23Z 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
[576]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)
[270]42
43#
44# Template for building commandline tools.
45#
46TEMPLATE_BIN = Commandline binary
47
[400]48TEMPLATE_BIN_INCS = $(PATH_ROOT)/src/lib
49
[270]50ifeq ($(BUILD_TARGET),os2)
51TEMPLATE_BIN_TOOL = GCC3OMF
[427]52TEMPLATE_BIN_CFLAGS.profile = -pg
[270]53TEMPLATE_BIN_CFLAGS.release = -O3
54TEMPLATE_BIN_LDFLAGS = -Zhigh-mem -Zstack=1024
55TEMPLATE_BIN_INST = kBuild/bin/x86.os2/
56endif
57
[557]58ifeq ($(BUILD_TARGET),darwin)
[565]59TEMPLATE_BIN_TOOL = GCC4MACHO
[557]60TEMPLATE_BIN_CFLAGS.profile =
61TEMPLATE_BIN_CFLAGS.release = -O3
62TEMPLATE_BIN_LDFLAGS =
63TEMPLATE_BIN_INST = kBuild/bin/$(BUILD_TARGET_ARCH).$(BUILD_TARGET)/
64endif
65
[552]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
[270]70TEMPLATE_BIN_TOOL = VCC70
[400]71TEMPLATE_BIN_DEFS = WINDOWS32 _CONSOLE WIN32 __WIN32__
[270]72TEMPLATE_BIN_DEFS.release = NDEBUG
[533]73TEMPLATE_BIN_CFLAGS = -MT -W3 -Zi -Zl
74TEMPLATE_BIN_CFLAGS.release = -O2
75TEMPLATE_BIN_CFLAGS.profile = -O2 -GH -Gh
[552]76#todo use path macros from the tool
[400]77TEMPLATE_BIN_INCS += \
[270]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
[533]84TEMPLATE_BIN_LDFLAGS.profile = /DEBUG
[270]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
[533]91TEMPLATE_BIN_LIBS.profile = g:/coding/vbox/trunk/out/win32/debug/lib/kPrf2.lib
[270]92TEMPLATE_BIN_INST = kBuild/bin/x86.win32/
93endif
94
95ifndef TEMPLATE_BIN_TOOL
96TEMPLATE_BIN_TOOL = GCC3
97TEMPLATE_BIN_CFLAGS.release = -O3
[401]98TEMPLATE_BIN_LDFLAGS = -static
[270]99ifeq ($(BUILD_TARGET),linux)
[298]100TEMPLATE_BIN_LIBS += rt
[270]101endif
[298]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
[270]107TEMPLATE_BIN_INST = kBuild/bin/$(BUILD_TARGET_ARCH).$(BUILD_TARGET)/
108endif
109
110
[393]111
112#
113# Template for building libraries for the tools.
114#
115TEMPLATE_LIB = Library for Commandline binary
[557]116TEMPLATE_LIB_EXTENDS = BIN
117TEMPLATE_LIB_INST = lib/
118# for LIB_KDEP
119TEMPLATE_LIB_TOOL = $(TEMPLATE_BIN_TOOL)
[393]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.