| [3108] | 1 | # $Id: Config.kmk 3665 2010-09-17 00:56:18Z bird $ | 
|---|
| [2667] | 2 | ## @file | 
|---|
|  | 3 | # | 
|---|
|  | 4 | # Top-level kBuild configuration. | 
|---|
|  | 5 | # | 
|---|
|  | 6 | # Copyright (c) 2006 knut st. osmundsen <bird@anduin.net> | 
|---|
|  | 7 | # | 
|---|
|  | 8 | # | 
|---|
|  | 9 | # This file is part of kNIX. | 
|---|
|  | 10 | # | 
|---|
|  | 11 | # kNIX 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 | # kNIX 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 kNIX; if not, write to the Free Software | 
|---|
|  | 23 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA | 
|---|
|  | 24 | # | 
|---|
|  | 25 | # | 
|---|
| [2470] | 26 |  | 
|---|
| [2667] | 27 | # | 
|---|
|  | 28 | # Add the packing pass. | 
|---|
|  | 29 | # | 
|---|
|  | 30 | PASSES         += PACKING | 
|---|
| [3305] | 31 | #DEFAULT_PASSES += PACKING | 
|---|
| [2470] | 32 |  | 
|---|
| [2667] | 33 | # | 
|---|
|  | 34 | # This is where we install during the build. | 
|---|
|  | 35 | # | 
|---|
| [2470] | 36 | PATH_INS := $(PATH_OUT)/dist | 
|---|
|  | 37 |  | 
|---|
| [2480] | 38 | # | 
|---|
|  | 39 | # The /bin templates. | 
|---|
| [3484] | 40 | # | 
|---|
| [2470] | 41 | TEMPLATE_bin = /bin/ programs. | 
|---|
| [2473] | 42 | TEMPLATE_bin_TOOL = GCC3 | 
|---|
|  | 43 | TEMPLATE_bin_TOOL.os2 = GCC3OMF | 
|---|
|  | 44 | TEMPLATE_bin_INST = bin/ | 
|---|
| [2470] | 45 |  | 
|---|
| [2480] | 46 | # | 
|---|
|  | 47 | # The /usr/bin templates. | 
|---|
|  | 48 | # | 
|---|
| [2470] | 49 | TEMPLATE_usr.bin = /usr/bin/ programs. | 
|---|
| [2473] | 50 | TEMPLATE_usr.bin_TOOL = GCC3 | 
|---|
|  | 51 | TEMPLATE_usr.bin_TOOL.os2 = GCC3OMF | 
|---|
|  | 52 | TEMPLATE_usr.bin_INST = usr/bin/ | 
|---|
| [2470] | 53 |  | 
|---|
| [2473] | 54 | TEMPLATE_usr.bin.script = /usr/bin/ scripts | 
|---|
|  | 55 | TEMPLATE_usr.bin.script_INST = usr/bin/ | 
|---|
|  | 56 |  | 
|---|
| [2472] | 57 | TEMPLATE_usr.bin.doc = /usr/bin/ program documentation. | 
|---|
| [2550] | 58 | # 1: source  2: target  3: _INST  4: default ins path | 
|---|
|  | 59 | TEMPLATE_usr.bin.doc_INSTFUN = $(4)/usr/doc/$(subst .doc,,$(2))/$(notdir $(1)) | 
|---|
| [2470] | 60 |  | 
|---|
| [2472] | 61 | TEMPLATE_usr.bin.man = /usr/bin/ program manual page | 
|---|
| [2550] | 62 | # 1: source  2: target  3: _INST  4: default ins path | 
|---|
|  | 63 | TEMPLATE_usr.bin.man_INSTFUN = $(4)/usr/man/man$(notdir $(subst .,/,$(1)))/$(notdir $(1)).gz | 
|---|
| [2472] | 64 | # 1: source  2: destination, 3: target | 
|---|
|  | 65 | TEMPLATE_usr.bin.man_INSTALLER = gzip -9 -c $(1) > $(2) | 
|---|
|  | 66 |  | 
|---|
| [2678] | 67 | TEMPLATE_usr.bin.alp = /usr/bin/ libraries using alp as assembler. | 
|---|
|  | 68 | TEMPLATE_usr.bin.alp_TOOL = GCC3 | 
|---|
|  | 69 | TEMPLATE_usr.bin.alp_TOOL.os2 = GCC3OMF | 
|---|
|  | 70 | TEMPLATE_usr.bin.alp_ASTOOL = ALP | 
|---|
|  | 71 | TEMPLATE_usr.bin.alp_ASFLAGS = -Sv:ALP | 
|---|
|  | 72 | TEMPLATE_usr.bin.alp_INST = usr/bin/ | 
|---|
|  | 73 |  | 
|---|
| [3665] | 74 | TEMPLATE_usr.bin.nasm = /usr/lib/ libraries using nasm as assembler. | 
|---|
|  | 75 | TEMPLATE_usr.bin.nasm_TOOL = GCC3 | 
|---|
|  | 76 | TEMPLATE_usr.bin.nasm_TOOL.os2 = GCC3OMF | 
|---|
|  | 77 | TEMPLATE_usr.bin.nasm_ASTOOL = NASM | 
|---|
|  | 78 | TEMPLATE_usr.bin.nasm_ASFLAGS = -f obj | 
|---|
|  | 79 | TEMPLATE_usr.bin.nasm_INST = usr/bin/ | 
|---|
|  | 80 |  | 
|---|
| [2480] | 81 | # | 
|---|
| [2550] | 82 | # The /usr/sbin templates. | 
|---|
|  | 83 | # | 
|---|
|  | 84 | TEMPLATE_usr.sbin = /usr/sbin/ programs. | 
|---|
|  | 85 | TEMPLATE_usr.sbin_TOOL = GCC3 | 
|---|
|  | 86 | TEMPLATE_usr.sbin_TOOL.os2 = GCC3OMF | 
|---|
|  | 87 | TEMPLATE_usr.sbin_INST = usr/sbin/ | 
|---|
|  | 88 |  | 
|---|
|  | 89 | TEMPLATE_usr.sbin.script = /usr/sbin/ scripts | 
|---|
|  | 90 | TEMPLATE_usr.sbin.script_INST = usr/sbin/ | 
|---|
|  | 91 |  | 
|---|
|  | 92 | TEMPLATE_usr.sbin.doc = /usr/bin/ program documentation. | 
|---|
|  | 93 | # 1: source  2: target  3: _INST  4: default ins path | 
|---|
|  | 94 | TEMPLATE_usr.sbin.doc_INSTFUN = $(4)/usr/doc/$(subst .doc,,$(2))/$(notdir $(1)) | 
|---|
|  | 95 |  | 
|---|
|  | 96 | TEMPLATE_usr.sbin.man = /usr/bin/ program manual page | 
|---|
|  | 97 | # 1: source  2: target  3: _INST  4: default ins path | 
|---|
|  | 98 | TEMPLATE_usr.sbin.man_INSTFUN = $(4)/usr/man/man$(notdir $(subst .,/,$(1)))/$(notdir $(1)).gz | 
|---|
|  | 99 | # 1: source  2: destination, 3: target | 
|---|
|  | 100 | TEMPLATE_usr.sbin.man_INSTALLER = gzip -9 -c $(1) > $(2) | 
|---|
|  | 101 |  | 
|---|
|  | 102 |  | 
|---|
|  | 103 | # | 
|---|
| [2480] | 104 | # The /usr/include templates. | 
|---|
|  | 105 | # | 
|---|
|  | 106 | TEMPLATE_usr.include = /usr/include/ headers | 
|---|
|  | 107 | TEMPLATE_usr.include_INST = usr/include/ | 
|---|
| [3108] | 108 | TEMPLATE_usr.include_MODE = 644 | 
|---|
| [2472] | 109 |  | 
|---|
| [2480] | 110 | TEMPLATE_usr.include.sys = /usr/include/sys/ headers | 
|---|
|  | 111 | TEMPLATE_usr.include.sys_INST = usr/include/sys/ | 
|---|
| [3108] | 112 | TEMPLATE_usr.include.sys_MODE = 644 | 
|---|
| [2473] | 113 |  | 
|---|
|  | 114 |  | 
|---|
| [2480] | 115 | # | 
|---|
|  | 116 | # The /usr/lib templates. | 
|---|
|  | 117 | # | 
|---|
| [2678] | 118 | TEMPLATE_usr.lib = /usr/lib/ libraries. | 
|---|
| [2480] | 119 | TEMPLATE_usr.lib_TOOL = GCC3 | 
|---|
|  | 120 | TEMPLATE_usr.lib_TOOL.os2 = GCC3OMF | 
|---|
|  | 121 | TEMPLATE_usr.lib_INST = usr/lib/ | 
|---|
| [3108] | 122 | TEMPLATE_usr.lib_MODE = 644 | 
|---|
| [2480] | 123 |  | 
|---|
| [2678] | 124 | TEMPLATE_usr.lib.nasm = /usr/lib/ libraries using nasm as assembler. | 
|---|
| [2480] | 125 | TEMPLATE_usr.lib.nasm_TOOL = GCC3 | 
|---|
|  | 126 | TEMPLATE_usr.lib.nasm_TOOL.os2 = GCC3OMF | 
|---|
|  | 127 | TEMPLATE_usr.lib.nasm_ASTOOL = NASM | 
|---|
|  | 128 | TEMPLATE_usr.lib.nasm_ASFLAGS = -f obj | 
|---|
|  | 129 | TEMPLATE_usr.lib.nasm_INST = usr/lib/ | 
|---|
| [3108] | 130 | TEMPLATE_usr.lib.nasm_MODE = 644 | 
|---|
| [2480] | 131 |  | 
|---|
|  | 132 |  | 
|---|
| [2667] | 133 | # | 
|---|
| [3108] | 134 | # The generic data install template. | 
|---|
|  | 135 | # | 
|---|
| [3484] | 136 | TEMPLATE_gendata = generic data installation template. | 
|---|
| [3108] | 137 | TEMPLATE_gendata_INST = /tmp | 
|---|
|  | 138 | TEMPLATE_gendata_MODE = 644 | 
|---|
|  | 139 |  | 
|---|
| [3484] | 140 | # | 
|---|
|  | 141 | # The generic script install template. | 
|---|
|  | 142 | # | 
|---|
|  | 143 | TEMPLATE_genscript = generic script installation template. | 
|---|
|  | 144 | TEMPLATE_genscript_INST = /tmp | 
|---|
|  | 145 | TEMPLATE_genscript_MODE = 755 | 
|---|
| [3108] | 146 |  | 
|---|
| [3484] | 147 |  | 
|---|
| [3108] | 148 | # | 
|---|
| [2667] | 149 | # The default way of packing. | 
|---|
|  | 150 | # We install to packages/<subdir>, then we zip up what's there. | 
|---|
|  | 151 | # | 
|---|
|  | 152 | PACKAGE_ZIP  ?= $(PATH_OUT)/packages/$(CURSUBDIR).zip | 
|---|
|  | 153 | PATH_PACKAGE ?= $(PATH_OUT)/packages/$(CURSUBDIR) | 
|---|
|  | 154 | PACKING      ?= defaultpacking | 
|---|
|  | 155 | defaultpacking: | 
|---|
| [3305] | 156 | $(RM) -f "$(PACKAGE_ZIP)" | 
|---|
|  | 157 | $(RM) -Rf "$(PATH_PACKAGE)" | 
|---|
|  | 158 | +$(MAKE) "PATH_INS=$(PATH_PACKAGE)" install | 
|---|
|  | 159 | cd "$(PATH_PACKAGE)/" && zip -9r $(PATH_OUT)/packages/$(CURSUBDIR).zip * | 
|---|
| [3108] | 160 | .NOTPARALLEL: defaultpacking | 
|---|
| [2667] | 161 | # todo zip up the source and create a diff. | 
|---|
|  | 162 |  | 
|---|