| 1 | # $Id: config.kmk 75 2004-05-31 08:05:15Z bird $
|
|---|
| 2 | #
|
|---|
| 3 | # Base config for kBuild
|
|---|
| 4 | #
|
|---|
| 5 | # It is recommended to include this file in your config.kMk file and then
|
|---|
| 6 | # override any default options defined there. In addition you will have to
|
|---|
| 7 | # decide the location of the object directory in your config.kMk file, and
|
|---|
| 8 | # of course manage to find this file.
|
|---|
| 9 | #
|
|---|
| 10 | #
|
|---|
| 11 | # Copyright (c) 2003 knut st. osmundsen <bird-srcspam@anduin.net>
|
|---|
| 12 | #
|
|---|
| 13 | #
|
|---|
| 14 | # This file is part of kBuild.
|
|---|
| 15 | #
|
|---|
| 16 | # kBuild is free software; you can redistribute it and/or modify
|
|---|
| 17 | # it under the terms of the GNU General Public License as published by
|
|---|
| 18 | # the Free Software Foundation; either version 2 of the License, or
|
|---|
| 19 | # (at your option) any later version.
|
|---|
| 20 | #
|
|---|
| 21 | # kBuild is distributed in the hope that it will be useful,
|
|---|
| 22 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 23 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 24 | # GNU General Public License for more details.
|
|---|
| 25 | #
|
|---|
| 26 | # You should have received a copy of the GNU General Public License
|
|---|
| 27 | # along with kBuild; if not, write to the Free Software
|
|---|
| 28 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|---|
| 29 | #
|
|---|
| 30 | #
|
|---|
| 31 |
|
|---|
| 32 | ifdef rewrite_me
|
|---|
| 33 |
|
|---|
| 34 | .ifndef __KBLD_config_kMk_
|
|---|
| 35 | __KBLD_config_kMk_ = 1
|
|---|
| 36 |
|
|---|
| 37 | #
|
|---|
| 38 | # Determin default target (if not set) / Check default target (if set)
|
|---|
| 39 | #
|
|---|
| 40 | .ifndef TARGET_MACHINE_TYPE
|
|---|
| 41 | ## The TARGET_MACHINE_TYPE is a generalized machine type for the
|
|---|
| 42 | # default target machine. Current types are "UX" for UNIX like systems
|
|---|
| 43 | # and "PC" for PC like systems. PC like systems are DOS, OS/2, and Win32.
|
|---|
| 44 | # While the rest is UNIX like at the moment.
|
|---|
| 45 | .if ${MACHINE} == "ibmos2" || ${MACHINE} == "win32" || ${MACHINE} == "dos"
|
|---|
| 46 | TARGET_MACHINE_TYPE := PC
|
|---|
| 47 | .else
|
|---|
| 48 | TARGET_MACHINE_TYPE := UX
|
|---|
| 49 | .endif
|
|---|
| 50 |
|
|---|
| 51 | .elif ${TARGET_MACHINE_TYPE} != "UX" && ${TARGET_MACHINE_TYPE} != "PC"
|
|---|
| 52 | .error Invalid TARGET_MACHINE_TYPE define. Must be either UX or PC.
|
|---|
| 53 | .endif
|
|---|
| 54 |
|
|---|
| 55 | ## @group Typical PC Suffixes
|
|---|
| 56 | # Note that suffixes includes the '.' if present.
|
|---|
| 57 | # @{
|
|---|
| 58 | SFX_EXE_PC := .exe
|
|---|
| 59 | SFX_DLL_PC := .dll
|
|---|
| 60 | SFX_DEF_PC := .def
|
|---|
| 61 | SFX_RES_PC := .res
|
|---|
| 62 | SFX_OBJ_PC := .obj
|
|---|
| 63 | SFX_CLS_PC := .class
|
|---|
| 64 | # @}
|
|---|
| 65 |
|
|---|
| 66 | ## @group Typical UNIX Suffixes
|
|---|
| 67 | # Note that suffixes includes the '.' if present.
|
|---|
| 68 | # @{
|
|---|
| 69 | SFX_EXE_UX :=
|
|---|
| 70 | SFX_DLL_UX := .so
|
|---|
| 71 | SFX_OBJ_UX := .o
|
|---|
| 72 | SFX_CLS_UX := .class
|
|---|
| 73 | # @}
|
|---|
| 74 |
|
|---|
| 75 |
|
|---|
| 76 | ## @group Default Target Suffixes.
|
|---|
| 77 | # @{
|
|---|
| 78 | ## Executable Program.
|
|---|
| 79 | SFX_EXE = ${SFX_EXE_${TARGET_MACHINE_TYPE}}
|
|---|
| 80 | ## DLL/Shared Library.
|
|---|
| 81 | SFX_DLL = ${SFX_DLL_${TARGET_MACHINE_TYPE}}
|
|---|
| 82 | ## Object file.
|
|---|
| 83 | SFX_OBJ = ${SFX_OBJ_${TARGET_MACHINE_TYPE}}
|
|---|
| 84 | ## Resource object file (PC thingy).
|
|---|
| 85 | SFX_RES = ${SFX_RES_${TARGET_MACHINE_TYPE}}
|
|---|
| 86 | ## Definition (~=linkerscript) file (PC thingy).
|
|---|
| 87 | SFX_DEF = ${SFX_RES_${TARGET_MACHINE_TYPE}}
|
|---|
| 88 | ## Java class files
|
|---|
| 89 | SFX_CLS = ${SFX_RES_${TARGET_MACHINE_TYPE}}
|
|---|
| 90 | ## @}
|
|---|
| 91 |
|
|---|
| 92 |
|
|---|
| 93 | ## @group Suffix lists used for transformations
|
|---|
| 94 | # @{
|
|---|
| 95 | ## C source file suffixes
|
|---|
| 96 | SFXS_C := .c
|
|---|
| 97 | ## C++ source file suffixes
|
|---|
| 98 | SFXS_CXX := .cpp .cxx .cc .c++
|
|---|
| 99 | ## C/C++ header file suffixes (list)
|
|---|
| 100 | SFXS_H := .h .hpp
|
|---|
| 101 | ## Java source file suffixes
|
|---|
| 102 | SFXS_JAVA := .java .jav
|
|---|
| 103 | ## IDL source file suffixes
|
|---|
| 104 | SFXS_IDL := .idl
|
|---|
| 105 | ## @}
|
|---|
| 106 |
|
|---|
| 107 |
|
|---|
| 108 | ## @group kBuild helper defines.
|
|---|
| 109 | # @{
|
|---|
| 110 | ## The kBuild path.
|
|---|
| 111 | KBUILD_PATH := $(MAKEFILE:H)
|
|---|
| 112 | ## The rules file.
|
|---|
| 113 | KBUILD_RULEZ := $(KBUILD_PATH)/rules.kMk
|
|---|
| 114 | ## @}
|
|---|
| 115 |
|
|---|
| 116 | .endif
|
|---|
| 117 | endif
|
|---|