source: trunk/Config.kmk@ 3820

Last change on this file since 3820 was 3820, checked in by bird, 11 years ago

Slowly starting to make it build with non GCC compilers, first out is OpenWatcom.

  • Property svn:keywords set to Id
File size: 4.8 KB
Line 
1# $Id: Config.kmk 3820 2014-02-26 00:44:45Z bird $
2## @file
3# Top-level kBuild configuration.
4#
5
6#
7# Copyright (c) 2006-2014 knut st. osmundsen <bird@anduin.net>
8#
9#
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#
27
28#
29# Add the packing pass.
30#
31PASSES += PACKING
32#DEFAULT_PASSES += PACKING
33
34#
35# This is where we install during the build.
36#
37PATH_INS := $(PATH_OUT)/dist
38
39#
40# Base template.
41#
42TEMPLATE_kNIX-base = Base template.
43ifdef CFG_USE_WATCOM
44 TEMPLATE_kNIX-base_TOOL = OPENWATCOM
45 TEMPLATE_kNIX-base_CFLAGS = -za99
46else
47 TEMPLATE_kNIX-base_TOOL = GCC3
48 TEMPLATE_kNIX-base_TOOL.os2 = GCC3OMF
49endif
50
51
52#
53# The /bin templates.
54#
55TEMPLATE_bin = /bin/ programs.
56TEMPLATE_bin_EXTENDS = kNIX-base
57TEMPLATE_bin_INST = bin/
58
59#
60# The /usr/bin templates.
61#
62TEMPLATE_usr.bin = /usr/bin/ programs.
63TEMPLATE_usr.bin_EXTENDS = kNIX-base
64TEMPLATE_usr.bin_INST = usr/bin/
65
66TEMPLATE_usr.bin.script = /usr/bin/ scripts
67TEMPLATE_usr.bin.script_INST = usr/bin/
68
69TEMPLATE_usr.bin.doc = /usr/bin/ program documentation.
70# 1: source 2: target 3: _INST 4: default ins path
71TEMPLATE_usr.bin.doc_INSTFUN = $(4)/usr/doc/$(subst .doc,,$(2))/$(notdir $(1))
72
73TEMPLATE_usr.bin.man = /usr/bin/ program manual page
74# 1: source 2: target 3: _INST 4: default ins path
75TEMPLATE_usr.bin.man_INSTFUN = $(4)/usr/man/man$(notdir $(subst .,/,$(1)))/$(notdir $(1)).gz
76# 1: source 2: destination, 3: target
77TEMPLATE_usr.bin.man_INSTALLER = gzip -9 -c $(1) > $(2)
78
79TEMPLATE_usr.bin.alp = /usr/bin/ libraries using alp as assembler.
80TEMPLATE_usr.bin.alp_EXTENDS = kNIX-base
81TEMPLATE_usr.bin.alp_ASTOOL = ALP
82TEMPLATE_usr.bin.alp_ASFLAGS = -Sv:ALP
83TEMPLATE_usr.bin.alp_INST = usr/bin/
84
85TEMPLATE_usr.bin.nasm = /usr/lib/ libraries using nasm as assembler.
86TEMPLATE_usr.bin.nasm_EXTENDS = kNIX-base
87TEMPLATE_usr.bin.nasm_ASTOOL = NASM
88TEMPLATE_usr.bin.nasm_ASFLAGS = -f obj
89TEMPLATE_usr.bin.nasm_INST = usr/bin/
90
91#
92# The /usr/sbin templates.
93#
94TEMPLATE_usr.sbin = /usr/sbin/ programs.
95TEMPLATE_usr.sbin_EXTENDS = kNIX-base
96TEMPLATE_usr.sbin_INST = usr/sbin/
97
98TEMPLATE_usr.sbin.script = /usr/sbin/ scripts
99TEMPLATE_usr.sbin.script_INST = usr/sbin/
100
101TEMPLATE_usr.sbin.doc = /usr/bin/ program documentation.
102# 1: source 2: target 3: _INST 4: default ins path
103TEMPLATE_usr.sbin.doc_INSTFUN = $(4)/usr/doc/$(subst .doc,,$(2))/$(notdir $(1))
104
105TEMPLATE_usr.sbin.man = /usr/bin/ program manual page
106# 1: source 2: target 3: _INST 4: default ins path
107TEMPLATE_usr.sbin.man_INSTFUN = $(4)/usr/man/man$(notdir $(subst .,/,$(1)))/$(notdir $(1)).gz
108# 1: source 2: destination, 3: target
109TEMPLATE_usr.sbin.man_INSTALLER = gzip -9 -c $(1) > $(2)
110
111
112#
113# The /usr/include templates.
114#
115TEMPLATE_usr.include = /usr/include/ headers
116TEMPLATE_usr.include_INST = usr/include/
117TEMPLATE_usr.include_MODE = 644
118
119TEMPLATE_usr.include.sys = /usr/include/sys/ headers
120TEMPLATE_usr.include.sys_INST = usr/include/sys/
121TEMPLATE_usr.include.sys_MODE = 644
122
123
124#
125# The /usr/lib templates.
126#
127TEMPLATE_usr.lib = /usr/lib/ libraries.
128TEMPLATE_usr.lib_EXTENDS = kNIX-base
129TEMPLATE_usr.lib_INST = usr/lib/
130TEMPLATE_usr.lib_MODE = 644
131
132TEMPLATE_usr.lib.nasm = /usr/lib/ libraries using nasm as assembler.
133TEMPLATE_usr.lib.nasm_EXTENDS = kNIX-base
134TEMPLATE_usr.lib.nasm_ASTOOL = NASM
135TEMPLATE_usr.lib.nasm_ASFLAGS = -f obj
136TEMPLATE_usr.lib.nasm_INST = usr/lib/
137TEMPLATE_usr.lib.nasm_MODE = 644
138
139
140#
141# The generic data install template.
142#
143TEMPLATE_gendata = generic data installation template.
144TEMPLATE_gendata_INST = /tmp
145TEMPLATE_gendata_MODE = 644
146
147#
148# The generic script install template.
149#
150TEMPLATE_genscript = generic script installation template.
151TEMPLATE_genscript_INST = /tmp
152TEMPLATE_genscript_MODE = 755
153
154
155#
156# The default way of packing.
157# We install to packages/<subdir>, then we zip up what's there.
158#
159PACKAGE_ZIP ?= $(PATH_OUT)/packages/$(CURSUBDIR).zip
160PATH_PACKAGE ?= $(PATH_OUT)/packages/$(CURSUBDIR)
161PACKING ?= defaultpacking
162defaultpacking:
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 *
167.NOTPARALLEL: defaultpacking
168# todo zip up the source and create a diff.
169
Note: See TracBrowser for help on using the repository browser.