3 # Tests - Configuration.
7 # Copyright (c) 2008-2009 knut st. osmundsen <bird-kBuild-spamix@anduin.net>
9 # This file is part of kBuild.
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.
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.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
30 # Template for building commandline tools.
32 TEMPLATE_TST
= Commandline binary
34 TEMPLATE_TST_INST
= tests
/
35 ifeq ($(BUILD_TARGET
),os2
)
36 TEMPLATE_TST_TOOL
= GCC3OMF
37 TEMPLATE_TST_CFLAGS.profile
= -pg
38 TEMPLATE_TST_CFLAGS.release
= -O3
39 TEMPLATE_TST_LDFLAGS
= -Zhigh-mem
-Zstack
=1024
42 ifeq ($(BUILD_TARGET
),darwin
)
43 TEMPLATE_TST_TOOL
= GCC4MACHO
44 TEMPLATE_TST_CFLAGS.profile
=
45 TEMPLATE_TST_CFLAGS.release
= -O3
46 TEMPLATE_TST_LDFLAGS
=
49 ifeq ($(filter-out win nt
,$(BUILD_TARGET
)),)
50 ifeq ($(BUILD_TARGET_ARCH
),x86
)
51 include $(PATH_KBUILD
)/tools
/VCC70.kmk
# fixme! template expanding does something bad to _LIBS /me thinks.
52 TEMPLATE_TST_TOOL
= VCC70
53 else ifeq ($(BUILD_TARGET_ARCH
),amd64
)
54 TEMPLATE_TST_TOOL
= VCC80AMD64
55 TEMPLATE_TST_DEFS
= _CRT_SECURE_NO_DEPRECATE _CRT_NONSTDC_NO_WARNINGS
57 TEMPLATE_TST_SDKS
= WINPSDK
58 TEMPLATE_TST_CFLAGS
= -W3
-Zi
-Zl
59 TEMPLATE_TST_CFLAGS.release
= -O2
60 TEMPLATE_TST_CFLAGS.profile
= -O2
-GH
-Gh
61 TEMPLATE_TST_LDFLAGS
= /SUBSYSTEM
:console
/INCREMENTAL
:no
/NOD
/DEBUG
62 TEMPLATE_TST_CFLAGS
+= -MD
64 $(PATH_TOOL_
$(TEMPLATE_TST_TOOL
)_LIB
)/oldnames.lib \
65 $(PATH_TOOL_
$(TEMPLATE_TST_TOOL
)_LIB
)/msvcrt.lib
66 TEMPLATE_TST_LIBS.profile
= Y
:/coding
/libc
/svn
/trunk
/out
/win.
$(BUILD_TARGET_ARCH
)/debug
/kStuff
/lib
/kPrf2.lib
69 ifndef TEMPLATE_TST_TOOL
70 # Use GCC3 when we're certain that the system is using GNU ld and ar.
71 ifeq ($(filter-out linux freebsd openbsd netbsd
,$(BUILD_TARGET
)),)
72 TEMPLATE_TST_TOOL
= GCC3
74 TEMPLATE_TST_TOOL
= GCC3PLAIN
76 TEMPLATE_TST_CFLAGS.release
= -O3
77 ifeq ($(BUILD_TARGET
),solaris
)
78 TEMPLATE_TST_CFLAGS.x86
+= -m32
79 TEMPLATE_TST_CFLAGS.amd64
+= -m64
80 TEMPLATE_TST_CXXFLAGS.x86
+= -m32
81 TEMPLATE_TST_CXXFLAGS.amd64
+= -m64
82 TEMPLATE_TST_LDFLAGS.x86
+= -m32
83 TEMPLATE_TST_LDFLAGS.amd64
+= -m64
84 TEMPLATE_TST_LDFLAGS
+= -Wl
,-i
89 # Template for building libraries for the tools.
91 TEMPLATE_TSTLIB
= Library for Commandline binary
92 TEMPLATE_TSTLIB_EXTENDS
= BIN
93 TEMPLATE_TSTLIB_INST
= lib
/