[3108] | 1 | # $Id: Config.kmk 3820 2014-02-26 00:44:45Z bird $
|
---|
[2667] | 2 | ## @file
|
---|
| 3 | # Top-level kBuild configuration.
|
---|
| 4 | #
|
---|
[3820] | 5 |
|
---|
[2667] | 6 | #
|
---|
[3820] | 7 | # Copyright (c) 2006-2014 knut st. osmundsen <bird@anduin.net>
|
---|
[2667] | 8 | #
|
---|
[3820] | 9 | #
|
---|
[2667] | 10 | # This file is part of kNIX.
|
---|
| 11 | #
|
---|
| 12 | # kNIX is free software; you can redistribute it and/or modify
|
---|
| 13 | # it under the terms of the GNU General Public License as published by
|
---|
| 14 | # the Free Software Foundation; either version 2 of the License, or
|
---|
| 15 | # (at your option) any later version.
|
---|
| 16 | #
|
---|
| 17 | # kNIX is distributed in the hope that it will be useful,
|
---|
| 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 20 | # GNU General Public License for more details.
|
---|
| 21 | #
|
---|
| 22 | # You should have received a copy of the GNU General Public License
|
---|
| 23 | # along with kNIX; if not, write to the Free Software
|
---|
| 24 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
| 25 | #
|
---|
| 26 | #
|
---|
[2470] | 27 |
|
---|
[2667] | 28 | #
|
---|
| 29 | # Add the packing pass.
|
---|
| 30 | #
|
---|
| 31 | PASSES += PACKING
|
---|
[3305] | 32 | #DEFAULT_PASSES += PACKING
|
---|
[2470] | 33 |
|
---|
[2667] | 34 | #
|
---|
| 35 | # This is where we install during the build.
|
---|
| 36 | #
|
---|
[2470] | 37 | PATH_INS := $(PATH_OUT)/dist
|
---|
| 38 |
|
---|
[2480] | 39 | #
|
---|
[3820] | 40 | # Base template.
|
---|
| 41 | #
|
---|
| 42 | TEMPLATE_kNIX-base = Base template.
|
---|
| 43 | ifdef CFG_USE_WATCOM
|
---|
| 44 | TEMPLATE_kNIX-base_TOOL = OPENWATCOM
|
---|
| 45 | TEMPLATE_kNIX-base_CFLAGS = -za99
|
---|
| 46 | else
|
---|
| 47 | TEMPLATE_kNIX-base_TOOL = GCC3
|
---|
| 48 | TEMPLATE_kNIX-base_TOOL.os2 = GCC3OMF
|
---|
| 49 | endif
|
---|
| 50 |
|
---|
| 51 |
|
---|
| 52 | #
|
---|
[2480] | 53 | # The /bin templates.
|
---|
[3484] | 54 | #
|
---|
[2470] | 55 | TEMPLATE_bin = /bin/ programs.
|
---|
[3820] | 56 | TEMPLATE_bin_EXTENDS = kNIX-base
|
---|
[2473] | 57 | TEMPLATE_bin_INST = bin/
|
---|
[2470] | 58 |
|
---|
[2480] | 59 | #
|
---|
| 60 | # The /usr/bin templates.
|
---|
| 61 | #
|
---|
[2470] | 62 | TEMPLATE_usr.bin = /usr/bin/ programs.
|
---|
[3820] | 63 | TEMPLATE_usr.bin_EXTENDS = kNIX-base
|
---|
[2473] | 64 | TEMPLATE_usr.bin_INST = usr/bin/
|
---|
[2470] | 65 |
|
---|
[2473] | 66 | TEMPLATE_usr.bin.script = /usr/bin/ scripts
|
---|
| 67 | TEMPLATE_usr.bin.script_INST = usr/bin/
|
---|
| 68 |
|
---|
[2472] | 69 | TEMPLATE_usr.bin.doc = /usr/bin/ program documentation.
|
---|
[2550] | 70 | # 1: source 2: target 3: _INST 4: default ins path
|
---|
| 71 | TEMPLATE_usr.bin.doc_INSTFUN = $(4)/usr/doc/$(subst .doc,,$(2))/$(notdir $(1))
|
---|
[2470] | 72 |
|
---|
[2472] | 73 | TEMPLATE_usr.bin.man = /usr/bin/ program manual page
|
---|
[2550] | 74 | # 1: source 2: target 3: _INST 4: default ins path
|
---|
| 75 | TEMPLATE_usr.bin.man_INSTFUN = $(4)/usr/man/man$(notdir $(subst .,/,$(1)))/$(notdir $(1)).gz
|
---|
[2472] | 76 | # 1: source 2: destination, 3: target
|
---|
| 77 | TEMPLATE_usr.bin.man_INSTALLER = gzip -9 -c $(1) > $(2)
|
---|
| 78 |
|
---|
[2678] | 79 | TEMPLATE_usr.bin.alp = /usr/bin/ libraries using alp as assembler.
|
---|
[3820] | 80 | TEMPLATE_usr.bin.alp_EXTENDS = kNIX-base
|
---|
[2678] | 81 | TEMPLATE_usr.bin.alp_ASTOOL = ALP
|
---|
| 82 | TEMPLATE_usr.bin.alp_ASFLAGS = -Sv:ALP
|
---|
| 83 | TEMPLATE_usr.bin.alp_INST = usr/bin/
|
---|
| 84 |
|
---|
[3665] | 85 | TEMPLATE_usr.bin.nasm = /usr/lib/ libraries using nasm as assembler.
|
---|
[3820] | 86 | TEMPLATE_usr.bin.nasm_EXTENDS = kNIX-base
|
---|
[3665] | 87 | TEMPLATE_usr.bin.nasm_ASTOOL = NASM
|
---|
| 88 | TEMPLATE_usr.bin.nasm_ASFLAGS = -f obj
|
---|
| 89 | TEMPLATE_usr.bin.nasm_INST = usr/bin/
|
---|
| 90 |
|
---|
[2480] | 91 | #
|
---|
[2550] | 92 | # The /usr/sbin templates.
|
---|
| 93 | #
|
---|
| 94 | TEMPLATE_usr.sbin = /usr/sbin/ programs.
|
---|
[3820] | 95 | TEMPLATE_usr.sbin_EXTENDS = kNIX-base
|
---|
[2550] | 96 | TEMPLATE_usr.sbin_INST = usr/sbin/
|
---|
| 97 |
|
---|
| 98 | TEMPLATE_usr.sbin.script = /usr/sbin/ scripts
|
---|
| 99 | TEMPLATE_usr.sbin.script_INST = usr/sbin/
|
---|
| 100 |
|
---|
| 101 | TEMPLATE_usr.sbin.doc = /usr/bin/ program documentation.
|
---|
| 102 | # 1: source 2: target 3: _INST 4: default ins path
|
---|
| 103 | TEMPLATE_usr.sbin.doc_INSTFUN = $(4)/usr/doc/$(subst .doc,,$(2))/$(notdir $(1))
|
---|
| 104 |
|
---|
| 105 | TEMPLATE_usr.sbin.man = /usr/bin/ program manual page
|
---|
| 106 | # 1: source 2: target 3: _INST 4: default ins path
|
---|
| 107 | TEMPLATE_usr.sbin.man_INSTFUN = $(4)/usr/man/man$(notdir $(subst .,/,$(1)))/$(notdir $(1)).gz
|
---|
| 108 | # 1: source 2: destination, 3: target
|
---|
| 109 | TEMPLATE_usr.sbin.man_INSTALLER = gzip -9 -c $(1) > $(2)
|
---|
| 110 |
|
---|
| 111 |
|
---|
| 112 | #
|
---|
[2480] | 113 | # The /usr/include templates.
|
---|
| 114 | #
|
---|
| 115 | TEMPLATE_usr.include = /usr/include/ headers
|
---|
| 116 | TEMPLATE_usr.include_INST = usr/include/
|
---|
[3108] | 117 | TEMPLATE_usr.include_MODE = 644
|
---|
[2472] | 118 |
|
---|
[2480] | 119 | TEMPLATE_usr.include.sys = /usr/include/sys/ headers
|
---|
| 120 | TEMPLATE_usr.include.sys_INST = usr/include/sys/
|
---|
[3108] | 121 | TEMPLATE_usr.include.sys_MODE = 644
|
---|
[2473] | 122 |
|
---|
| 123 |
|
---|
[2480] | 124 | #
|
---|
| 125 | # The /usr/lib templates.
|
---|
| 126 | #
|
---|
[2678] | 127 | TEMPLATE_usr.lib = /usr/lib/ libraries.
|
---|
[3820] | 128 | TEMPLATE_usr.lib_EXTENDS = kNIX-base
|
---|
[2480] | 129 | TEMPLATE_usr.lib_INST = usr/lib/
|
---|
[3108] | 130 | TEMPLATE_usr.lib_MODE = 644
|
---|
[2480] | 131 |
|
---|
[2678] | 132 | TEMPLATE_usr.lib.nasm = /usr/lib/ libraries using nasm as assembler.
|
---|
[3820] | 133 | TEMPLATE_usr.lib.nasm_EXTENDS = kNIX-base
|
---|
[2480] | 134 | TEMPLATE_usr.lib.nasm_ASTOOL = NASM
|
---|
| 135 | TEMPLATE_usr.lib.nasm_ASFLAGS = -f obj
|
---|
| 136 | TEMPLATE_usr.lib.nasm_INST = usr/lib/
|
---|
[3108] | 137 | TEMPLATE_usr.lib.nasm_MODE = 644
|
---|
[2480] | 138 |
|
---|
| 139 |
|
---|
[2667] | 140 | #
|
---|
[3108] | 141 | # The generic data install template.
|
---|
| 142 | #
|
---|
[3484] | 143 | TEMPLATE_gendata = generic data installation template.
|
---|
[3108] | 144 | TEMPLATE_gendata_INST = /tmp
|
---|
| 145 | TEMPLATE_gendata_MODE = 644
|
---|
| 146 |
|
---|
[3484] | 147 | #
|
---|
| 148 | # The generic script install template.
|
---|
| 149 | #
|
---|
| 150 | TEMPLATE_genscript = generic script installation template.
|
---|
| 151 | TEMPLATE_genscript_INST = /tmp
|
---|
| 152 | TEMPLATE_genscript_MODE = 755
|
---|
[3108] | 153 |
|
---|
[3484] | 154 |
|
---|
[3108] | 155 | #
|
---|
[2667] | 156 | # The default way of packing.
|
---|
| 157 | # We install to packages/<subdir>, then we zip up what's there.
|
---|
| 158 | #
|
---|
| 159 | PACKAGE_ZIP ?= $(PATH_OUT)/packages/$(CURSUBDIR).zip
|
---|
| 160 | PATH_PACKAGE ?= $(PATH_OUT)/packages/$(CURSUBDIR)
|
---|
| 161 | PACKING ?= defaultpacking
|
---|
| 162 | defaultpacking:
|
---|
[3305] | 163 | $(RM) -f "$(PACKAGE_ZIP)"
|
---|
| 164 | $(RM) -Rf "$(PATH_PACKAGE)"
|
---|
| 165 | +$(MAKE) "PATH_INS=$(PATH_PACKAGE)" install
|
---|
| 166 | cd "$(PATH_PACKAGE)/" && zip -9r $(PATH_OUT)/packages/$(CURSUBDIR).zip *
|
---|
[3108] | 167 | .NOTPARALLEL: defaultpacking
|
---|
[2667] | 168 | # todo zip up the source and create a diff.
|
---|
| 169 |
|
---|