1 | # $Id: Config.kmk 467 2006-07-15 04:25:24Z bird $
|
---|
2 | ## @file
|
---|
3 | #
|
---|
4 | # Build Configuration.
|
---|
5 | #
|
---|
6 | # Copyright (c) 2005 knut st. osmundsen <bird@anduin.net>
|
---|
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.
|
---|
28 | KBUILD_DO_AUTO_INSTALL := 1
|
---|
29 |
|
---|
30 | #
|
---|
31 | # Template for building commandline tools.
|
---|
32 | #
|
---|
33 | TEMPLATE_BIN = Commandline binary
|
---|
34 |
|
---|
35 | TEMPLATE_BIN_INCS = $(PATH_ROOT)/src/lib
|
---|
36 |
|
---|
37 | ifeq ($(BUILD_TARGET),os2)
|
---|
38 | TEMPLATE_BIN_TOOL = GCC3OMF
|
---|
39 | TEMPLATE_BIN_CFLAGS.profile = -pg
|
---|
40 | TEMPLATE_BIN_CFLAGS.release = -O3
|
---|
41 | TEMPLATE_BIN_LDFLAGS = -Zhigh-mem -Zstack=1024
|
---|
42 | TEMPLATE_BIN_INST = kBuild/bin/x86.os2/
|
---|
43 | endif
|
---|
44 |
|
---|
45 | ifeq ($(BUILD_TARGET),win32)
|
---|
46 | TEMPLATE_BIN_TOOL = VCC70
|
---|
47 | TEMPLATE_BIN_DEFS = WINDOWS32 _CONSOLE WIN32 __WIN32__
|
---|
48 | TEMPLATE_BIN_DEFS.release = NDEBUG
|
---|
49 | TEMPLATE_BIN_CFLAGS = -MT -W3
|
---|
50 | TEMPLATE_BIN_INCS += \
|
---|
51 | . \
|
---|
52 | $(PATH_ROOT)/src/gmake/w32/include \
|
---|
53 | $(PATH_ROOT)/src/gmake/glob \
|
---|
54 | $(PATH_DEV)/x86.win32/vcc70/include \
|
---|
55 | $(PATH_DEV)/x86.win32/sdk200209/include
|
---|
56 | TEMPLATE_BIN_LDFLAGS = /SUBSYSTEM:console /INCREMENTAL:no /NOD
|
---|
57 | TEMPLATE_BIN_LIBS = \
|
---|
58 | $(PATH_DEV)/x86.win32/vcc70/lib/libcmt.lib \
|
---|
59 | $(PATH_DEV)/x86.win32/vcc70/lib/oldnames.lib \
|
---|
60 | $(PATH_DEV)/x86.win32/sdk200209/lib/Kernel32.Lib \
|
---|
61 | $(PATH_DEV)/x86.win32/sdk200209/lib/User32.Lib \
|
---|
62 | $(PATH_DEV)/x86.win32/sdk200209/lib/AdvAPI32.Lib
|
---|
63 | TEMPLATE_BIN_INST = kBuild/bin/x86.win32/
|
---|
64 | endif
|
---|
65 |
|
---|
66 | ifndef TEMPLATE_BIN_TOOL
|
---|
67 | TEMPLATE_BIN_TOOL = GCC3
|
---|
68 | TEMPLATE_BIN_CFLAGS.release = -O3
|
---|
69 | TEMPLATE_BIN_LDFLAGS = -static
|
---|
70 | ifeq ($(BUILD_TARGET),linux)
|
---|
71 | TEMPLATE_BIN_LIBS += rt
|
---|
72 | endif
|
---|
73 | ifeq ($(BUILD_TARGET),freebsd)
|
---|
74 | TEMPLATE_BIN_LIBS += iconv intl
|
---|
75 | TEMPLATE_BIN_LIBPATH += /usr/local/lib
|
---|
76 | TEMPLATE_BIN_INCS += $(PATH_ROOT)/src/gmake/glob /usr/local/include
|
---|
77 | endif
|
---|
78 | TEMPLATE_BIN_INST = kBuild/bin/$(BUILD_TARGET_ARCH).$(BUILD_TARGET)/
|
---|
79 | endif
|
---|
80 |
|
---|
81 |
|
---|
82 |
|
---|
83 | #
|
---|
84 | # Template for building libraries for the tools.
|
---|
85 | #
|
---|
86 | TEMPLATE_LIB = Library for Commandline binary
|
---|
87 |
|
---|
88 | TEMPLATE_LIB_TOOL = $(TEMPLATE_BIN_TOOL)
|
---|
89 | TEMPLATE_LIB_INST = lib/
|
---|
90 | TEMPLATE_LIB_INCS = $(TEMPLATE_BIN_INCS)
|
---|
91 | TEMPLATE_LIB_INCS.$(BUILD_TYPE) = $(TEMPLATE_BIN_INCS.$(BUILD_TYPE))
|
---|
92 | TEMPLATE_LIB_DEFS = $(TEMPLATE_BIN_DEFS)
|
---|
93 | TEMPLATE_LIB_DEFS.$(BUILD_TYPE) = $(TEMPLATE_BIN_DEFS.$(BUILD_TYPE))
|
---|
94 | TEMPLATE_LIB_CFLAGS = $(TEMPLATE_BIN_CFLAGS)
|
---|
95 | TEMPLATE_LIB_CFLAGS.$(BUILD_TYPE) = $(TEMPLATE_BIN_CFLAGS.$(BUILD_TYPE))
|
---|
96 | TEMPLATE_LIB_CXXFLAGS = $(TEMPLATE_BIN_CXXFLAGS)
|
---|
97 | TEMPLATE_LIB_CXXFLAGS.$(BUILD_TYPE) = $(TEMPLATE_BIN_CXXFLAGS.$(BUILD_TYPE))
|
---|
98 |
|
---|
99 | LIB_KDEP = $(PATH_OUT)/$(TEMPLATE_LIB_INST)$(TOOL_$(TEMPLATE_LIB_TOOL)_ARLIBPREF)kDep$$(TOOL_$(TEMPLATE_LIB_TOOL)_ARLIBSUFF)
|
---|
100 |
|
---|