source: trunk/Config.kmk@ 3829

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

The watcom saga continues.

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