[3108] | 1 | # $Id: Config.kmk 3598 2007-10-04 18:46:12Z bird $
|
---|
[2667] | 2 | ## @file
|
---|
| 3 | #
|
---|
[3537] | 4 | # kBuild configuration for kStuff
|
---|
[2667] | 5 | #
|
---|
[3537] | 6 | # Copyright (c) 2006-2007 knut st. osmundsen <bird@anduin.net>
|
---|
[2667] | 7 | #
|
---|
| 8 | #
|
---|
[3537] | 9 | # This file is part of k*.
|
---|
[2667] | 10 | #
|
---|
[3537] | 11 | # k* is free software; you can redistribute it and/or modify
|
---|
[2667] | 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 | #
|
---|
[3537] | 16 | # k* is distributed in the hope that it will be useful,
|
---|
[2667] | 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
|
---|
[3537] | 22 | # along with k*; if not, write to the Free Software
|
---|
[2667] | 23 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
| 24 | #
|
---|
| 25 | #
|
---|
[2470] | 26 |
|
---|
[2667] | 27 | #
|
---|
| 28 | # This is where we install during the build.
|
---|
| 29 | #
|
---|
[3537] | 30 | PATH_INS := $(PATH_OUT)/kStuff
|
---|
[2470] | 31 |
|
---|
| 32 |
|
---|
[2480] | 33 | #
|
---|
[3537] | 34 | # Templates for the kStuff.
|
---|
[2480] | 35 | #
|
---|
[3537] | 36 | TEMPLATE_kStuff = kStuff Template
|
---|
| 37 | TEMPLATE_kStuff_TOOL = GCC3
|
---|
[3596] | 38 | TEMPLATE_kStuff_TOOL.darwin = GCC4MACHO
|
---|
[3537] | 39 | TEMPLATE_kStuff_TOOL.os2 = GCC3OMF
|
---|
[3596] | 40 | TEMPLATE_kStuff_TOOL.solaris = GCC3PLAIN
|
---|
[3537] | 41 | TEMPLATE_kStuff_TOOL.win.x86 = VCC70
|
---|
| 42 | TEMPLATE_kStuff_TOOL.win.amd64 = VCC80AMD64
|
---|
[2470] | 43 |
|
---|
[3552] | 44 | TEMPLATE_kStuff_SDKS.win.x86 = WINPSDK W2K3DDKX86
|
---|
| 45 | TEMPLATE_kStuff_SDKS.win.amd64 = WINPSDK W2K3DDKAMD64
|
---|
[2473] | 46 |
|
---|
[3537] | 47 | TEMPLATE_kStuff_DEFS.freebsd = KS_OS_FREEBSD
|
---|
| 48 | TEMPLATE_kStuff_DEFS.linux = KS_OS_LINUX
|
---|
| 49 | TEMPLATE_kStuff_DEFS.os2 = KS_OS_OS2
|
---|
| 50 | TEMPLATE_kStuff_DEFS.win = KS_OS_WINDOWS _CRT_SECURE_NO_DEPRECATE _CRT_NONSTDC_NO_WARNINGS
|
---|
[2470] | 51 |
|
---|
[3537] | 52 | TEMPLATE_kStuff_DEFS.x86 = KS_BITS=32
|
---|
| 53 | TEMPLATE_kStuff_DEFS.amd64 = KS_BITS=64
|
---|
[2472] | 54 |
|
---|
[3538] | 55 | TEMPLATE_kStuff_INCS = $(PATH_ROOT)/kStuff/include
|
---|
| 56 |
|
---|
[3537] | 57 | TEMPLATE_kStuff_ASTOOL = YASM
|
---|
| 58 | TEMPLATE_kStuff_ASTOOL.os2 = NASM
|
---|
| 59 | TEMPLATE_kStuff_ASFLAGS.freebsd = -f elf
|
---|
| 60 | TEMPLATE_kStuff_ASFLAGS.linux = -f elf
|
---|
| 61 | TEMPLATE_kStuff_ASFLAGS.os2 = -f omf
|
---|
| 62 | TEMPLATE_kStuff_ASFLAGS.win.x86 = -f win32 -g cv8
|
---|
| 63 | TEMPLATE_kStuff_ASFLAGS.win.amd64= -f win64 -g cv8
|
---|
[2678] | 64 |
|
---|
[3598] | 65 | TEMPLATE_kStuff_CFLAGS.darwin = -g -fno-common
|
---|
| 66 | TEMPLATE_kStuff_CFLAGS.freebsd = -g
|
---|
| 67 | TEMPLATE_kStuff_CFLAGS.linux = -g
|
---|
| 68 | TEMPLATE_kStuff_CFLAGS.os2 = -g
|
---|
| 69 | TEMPLATE_kStuff_CFLAGS.win = -Zi -Zl -MD -W3 -GF -GR-
|
---|
| 70 | ifneq ($(BUILD_TYPE),debug)
|
---|
| 71 | TEMPLATE_kStuff_CFLAGS.freebsd += -O3
|
---|
| 72 | TEMPLATE_kStuff_CFLAGS.linux += -O3
|
---|
| 73 | TEMPLATE_kStuff_CFLAGS.os2 += -O3
|
---|
| 74 | TEMPLATE_kStuff_CFLAGS.win += -O2xtg -Oi -Ob2
|
---|
| 75 | else
|
---|
| 76 | TEMPLATE_kStuff_CFLAGS.win += -Od
|
---|
| 77 | endif
|
---|
| 78 |
|
---|
| 79 | TEMPLATE_kStuff_CXXFLAGS.darwin = -g -fno-common
|
---|
[3537] | 80 | TEMPLATE_kStuff_CXXFLAGS.freebsd = -g
|
---|
| 81 | TEMPLATE_kStuff_CXXFLAGS.linux = -g
|
---|
| 82 | TEMPLATE_kStuff_CXXFLAGS.os2 = -g
|
---|
| 83 | TEMPLATE_kStuff_CXXFLAGS.win = -Zi -Zl -MD -W3 -GF -GR-
|
---|
| 84 | ifneq ($(BUILD_TYPE),debug)
|
---|
| 85 | TEMPLATE_kStuff_CXXFLAGS.freebsd+= -O3
|
---|
| 86 | TEMPLATE_kStuff_CXXFLAGS.linux += -O3
|
---|
| 87 | TEMPLATE_kStuff_CXXFLAGS.os2 += -O3
|
---|
| 88 | TEMPLATE_kStuff_CXXFLAGS.win += -O2xtg -Oi -Ob2
|
---|
[3552] | 89 | else
|
---|
| 90 | TEMPLATE_kStuff_CXXFLAGS.win += -Od
|
---|
[3537] | 91 | endif
|
---|
[2550] | 92 |
|
---|
[3537] | 93 | TEMPLATE_kStuff_LDFLAGS.freebsd = -g
|
---|
| 94 | TEMPLATE_kStuff_LDFLAGS.linux = -g
|
---|
| 95 | TEMPLATE_kStuff_LDFLAGS.os2 = -g
|
---|
[3588] | 96 | TEMPLATE_kStuff_LDFLAGS.win = /DEBUG /NODEFAULTLIB
|
---|
[2550] | 97 |
|
---|
[3537] | 98 | TEMPLATE_kStuff_LIBS.freebsd =
|
---|
| 99 | TEMPLATE_kStuff_LIBS.linux =
|
---|
| 100 | TEMPLATE_kStuff_LIBS.os2 =
|
---|
| 101 | TEMPLATE_kStuff_LIBS.win = \
|
---|
| 102 | $(PATH_SDK_WINPSDK_LIB)/psapi.Lib
|
---|
| 103 | TEMPLATE_kStuff_LIBS.win.x86 = \
|
---|
| 104 | $(PATH_TOOL_VCC70_LIB)/msvcrt.lib \
|
---|
| 105 | $(PATH_TOOL_VCC70_LIB)/msvcprt.lib \
|
---|
[3552] | 106 | $(PATH_TOOL_VCC70_LIB)/oldnames.lib \
|
---|
| 107 | $(PATH_SDK_W2K3DDKX86_LIB)/ntdll.lib
|
---|
[3588] | 108 | TEMPLATE_kStuff_LIBS.win.amd64 = \
|
---|
| 109 | $(PATH_TOOL_VCC80AMD64_LIB)/msvcrt.lib \
|
---|
| 110 | $(PATH_TOOL_VCC80AMD64_LIB)/msvcprt.lib \
|
---|
| 111 | $(PATH_TOOL_VCC80AMD64_LIB)/oldnames.lib \
|
---|
| 112 | $(PATH_SDK_W2K3DDKAMD64_LIB)/ntdll.lib
|
---|
[2550] | 113 |
|
---|
[3537] | 114 | TEMPLATE_kStuffEXE = kStuff Executable Template
|
---|
| 115 | TEMPLATE_kStuffEXE_EXTENDS = kStuff
|
---|
| 116 | TEMPLATE_kStuffEXE_DEFS = $(TEMPLATE_kStuff) KS_EXE_TARGET
|
---|
[2550] | 117 |
|
---|
[3537] | 118 | TEMPLATE_kStuffLIB = kStuff Library Template
|
---|
| 119 | TEMPLATE_kStuffLIB_EXTENDS = kStuff
|
---|
| 120 | TEMPLATE_kStuffLIB_DEFS = $(TEMPLATE_kStuff) KS_LIB_TARGET
|
---|
[2550] | 121 |
|
---|
[3537] | 122 | TEMPLATE_kStuffDLL = kStuff DLL Template
|
---|
| 123 | TEMPLATE_kStuffDLL_EXTENDS = kStuff
|
---|
| 124 | TEMPLATE_kStuffDLL_DEFS = $(TEMPLATE_kStuff) KS_DLL_TARGET
|
---|
| 125 | TEMPLATE_kStuffDLL_LDFLAGS.os2 = $(TEMPLATE_kStuff_LDFLAGS.os2) -Zdll
|
---|
[2472] | 126 |
|
---|
[2473] | 127 |
|
---|