source: trunk/Config.kmk@ 2667

Last change on this file since 2667 was 2667, checked in by bird, 19 years ago

packing.

File size: 3.8 KB
Line 
1# $Id: $
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#
26
27#
28# Add the packing pass.
29#
30PASSES += PACKING
31DEFAULT_PASSES += PACKING
32
33#
34# This is where we install during the build.
35#
36PATH_INS := $(PATH_OUT)/dist
37
38#
39# The /bin templates.
40#
41TEMPLATE_bin = /bin/ programs.
42TEMPLATE_bin_TOOL = GCC3
43TEMPLATE_bin_TOOL.os2 = GCC3OMF
44TEMPLATE_bin_INST = bin/
45
46#
47# The /usr/bin templates.
48#
49TEMPLATE_usr.bin = /usr/bin/ programs.
50TEMPLATE_usr.bin_TOOL = GCC3
51TEMPLATE_usr.bin_TOOL.os2 = GCC3OMF
52TEMPLATE_usr.bin_INST = usr/bin/
53
54TEMPLATE_usr.bin.script = /usr/bin/ scripts
55TEMPLATE_usr.bin.script_INST = usr/bin/
56
57TEMPLATE_usr.bin.doc = /usr/bin/ program documentation.
58# 1: source 2: target 3: _INST 4: default ins path
59TEMPLATE_usr.bin.doc_INSTFUN = $(4)/usr/doc/$(subst .doc,,$(2))/$(notdir $(1))
60
61TEMPLATE_usr.bin.man = /usr/bin/ program manual page
62# 1: source 2: target 3: _INST 4: default ins path
63TEMPLATE_usr.bin.man_INSTFUN = $(4)/usr/man/man$(notdir $(subst .,/,$(1)))/$(notdir $(1)).gz
64# 1: source 2: destination, 3: target
65TEMPLATE_usr.bin.man_INSTALLER = gzip -9 -c $(1) > $(2)
66
67#
68# The /usr/sbin templates.
69#
70TEMPLATE_usr.sbin = /usr/sbin/ programs.
71TEMPLATE_usr.sbin_TOOL = GCC3
72TEMPLATE_usr.sbin_TOOL.os2 = GCC3OMF
73TEMPLATE_usr.sbin_INST = usr/sbin/
74
75TEMPLATE_usr.sbin.script = /usr/sbin/ scripts
76TEMPLATE_usr.sbin.script_INST = usr/sbin/
77
78TEMPLATE_usr.sbin.doc = /usr/bin/ program documentation.
79# 1: source 2: target 3: _INST 4: default ins path
80TEMPLATE_usr.sbin.doc_INSTFUN = $(4)/usr/doc/$(subst .doc,,$(2))/$(notdir $(1))
81
82TEMPLATE_usr.sbin.man = /usr/bin/ program manual page
83# 1: source 2: target 3: _INST 4: default ins path
84TEMPLATE_usr.sbin.man_INSTFUN = $(4)/usr/man/man$(notdir $(subst .,/,$(1)))/$(notdir $(1)).gz
85# 1: source 2: destination, 3: target
86TEMPLATE_usr.sbin.man_INSTALLER = gzip -9 -c $(1) > $(2)
87
88
89#
90# The /usr/include templates.
91#
92TEMPLATE_usr.include = /usr/include/ headers
93TEMPLATE_usr.include_INST = usr/include/
94
95TEMPLATE_usr.include.sys = /usr/include/sys/ headers
96TEMPLATE_usr.include.sys_INST = usr/include/sys/
97
98
99#
100# The /usr/lib templates.
101#
102TEMPLATE_usr.lib = /usr/bin/ libraries.
103TEMPLATE_usr.lib_TOOL = GCC3
104TEMPLATE_usr.lib_TOOL.os2 = GCC3OMF
105TEMPLATE_usr.lib_INST = usr/lib/
106
107TEMPLATE_usr.lib.nasm = /usr/bin/ libraries using nasm as assembler.
108TEMPLATE_usr.lib.nasm_TOOL = GCC3
109TEMPLATE_usr.lib.nasm_TOOL.os2 = GCC3OMF
110TEMPLATE_usr.lib.nasm_ASTOOL = NASM
111TEMPLATE_usr.lib.nasm_ASTOOL = NASM
112TEMPLATE_usr.lib.nasm_ASFLAGS = -f obj
113TEMPLATE_usr.lib.nasm_INST = usr/lib/
114
115
116#
117# The default way of packing.
118# We install to packages/<subdir>, then we zip up what's there.
119#
120PACKAGE_ZIP ?= $(PATH_OUT)/packages/$(CURSUBDIR).zip
121PATH_PACKAGE ?= $(PATH_OUT)/packages/$(CURSUBDIR)
122PACKING ?= defaultpacking
123defaultpacking:
124 $(RM) -f "$(PACKAGE_ZIP)"
125 $(RM) -Rf "$(PATH_PACKAGE)"
126 $(MAKE) "PATH_INS=$(PATH_PACKAGE)" install
127 cd "$(PATH_PACKAGE)/" && zip -9r $(PATH_OUT)/packages/$(CURSUBDIR).zip *
128# todo zip up the source and create a diff.
129
Note: See TracBrowser for help on using the repository browser.