source: branches/1.0/src/makefile.kmk@ 8

Last change on this file since 8 was 8, checked in by diver, 16 years ago

reorg last part for now

File size: 3.9 KB
Line 
1#
2# Universal port driver
3# kBuild makefile
4# Copyright (C) netlabs.org 2003-2009
5# See COPYING for license informations
6#
7# please define (as env variables or kmk command line) the following variables before starting:
8# BUILD_PLATFORM = os2
9# BUILD_TYPE = release|debug
10#
11# Copy Config.km_ to Config.kmk and edit it to match your installation.
12#
13
14DEPTH = ..
15
16TOOL = GCC3OMF
17
18DLLS = uni
19
20# required to get IPFC compiler to work correctly
21export IPFC=$(TOOLKIT)\IPFC
22
23uni_RCTOOL =OPENWATCOM
24TOOL_OPENWATCOM_RCFLAGS += -i=$(TOOLKIT)/h
25
26uni_SOURCES = \
27 uni.def \
28 uni.c
29
30# english source
31DLLS += uni_en
32uni_en_EXTENDS = uni
33uni_en_NAME = uni
34uni_en_INST = bin/en/
35uni_en_SOURCES = $(uni_SOURCES) en/uni.rc
36uni_en_CLEAN = $(PATH_BIN)/en/uni.pdr
37
38# german source
39DLLS += uni_de
40uni_de_EXTENDS = uni
41uni_de_NAME = uni
42uni_de_INST = bin/de/
43uni_de_SOURCES = $(uni_SOURCES) de/uni.rc
44uni_de_CLEAN = $(PATH_BIN)/de/uni.pdr
45
46uni_CFLAGS = -Zomf
47uni_CFLAGS.release = -s -O3 -march=pentium -mcpu=pentium4
48uni_CFLAGS.debug = -g -O0 -DDEBUG
49uni_LDFLAGS = -Zomf -Zno-fork -Zmap -Zbin-files
50uni_LDFLAGS.release = -s
51uni_LDFLAGS.debug = -g
52
53uni_DEFS =
54uni_INCS = ./h
55
56uni_DLLSUFF = .pdr
57
58uni_CLEAN = description.rc $(PATH_BIN)/uni.pdr
59
60#build other files en (e.g. help)
61OTHERS = /en/uni.ipf $(PATH_BIN)/en/uni.hlp $(PATH_BIN)/en/readme.txt
62OTHER_CLEAN = $(PATH_BIN)/en/uni.hlp $(PATH_BIN)/en/readme.txt
63
64#build other files de (e.g. help)
65OTHERS += /de/uni.ipf $(PATH_BIN)/de/uni.hlp $(PATH_BIN)/de/readme.txt
66OTHER_CLEAN += $(PATH_BIN)/de/uni.hlp $(PATH_BIN)/de/readme.txt
67
68
69#install some more files
70INSTALLS = docs
71docs_INST = bin/
72docs_SOURCES = uni.ico
73OTHER_CLEAN += $(PATH_BIN)/uni.ico
74
75# packaging stuffs
76ifeq ($(BUILD_TYPE),debug)
77 PACKAGE_NAME = uni-$(subst .,_,$(VERSION))-$(BUILD)-debug.zip
78else
79 PACKAGE_NAME = uni-$(subst .,_,$(VERSION))-$(BUILD).zip
80endif
81PACKING += $(PATH_ROOT)/dist/$(PACKAGE_NAME)
82OTHER_CLEAN += $(PATH_ROOT)/dist/$(PACKAGE_NAME)
83
84# now include standard code
85include $(PATH_KBUILD)/rules.kMk
86
87# here follows standard gnu make inference rules
88
89# add new dependancy on build level info
90en/uni.rc : description.rc
91de/uni.rc : description.rc
92
93# update bldlevel info
94description.rc: config.kmk
95 @echo Writing build level informations
96 @cp description.rc_ description.rc
97 @BldLevelInf0.cmd $(VERSION) $(BUILD)
98
99# substitute macros in ipf file en
100/en/uni.ipf: Config.kmk ./en/uni.ipf
101 $(QUIET)$(SED) "s;_VERSION_;$(VERSION);g" ./en/uni.ipf \
102 | $(SED) "s;_BUILD_;$(BUILD);g" \
103 > uni_en.ipf
104
105# substitute macros in ipf file de
106/de/uni.ipf: Config.kmk ./de/uni.ipf
107 $(QUIET)$(SED) "s;_VERSION_;$(VERSION);g" ./de/uni.ipf \
108 | $(SED) "s;_BUILD_;$(BUILD);g" \
109 > uni_de.ipf
110
111# compile english help file
112$(PATH_BIN)/en/uni.hlp: en/uni.ipf ./uni.h ./H/hmacros.h config.kmk
113 -gcc -E -I./h -I./en -x c uni_en.ipf > uni_en.i
114 -@mkdir $(PATH_BIN)
115 -@mkdir $(PATH_BIN)/en
116 $(TOOLKIT)\bin\ipfc.exe uni_en.i $(PATH_BIN)/en/uni.hlp /COUNTRY=001 /CODEPAGE=850
117 rm uni.i
118 rm uni_en.ipf
119
120# compile german help file
121$(PATH_BIN)/de/uni.hlp: de/uni.ipf ./uni.h ./H/hmacros.h config.kmk
122 -gcc -E -I./h -I./de -x c uni_de.ipf > uni_de.i
123 -@mkdir $(PATH_BIN)
124 -@mkdir $(PATH_BIN)/de
125 $(TOOLKIT)\bin\ipfc.exe uni_de.i $(PATH_BIN)/de/uni.hlp /COUNTRY=001 /CODEPAGE=850
126 rm uni_de.i
127 rm uni_de.ipf
128
129# substitute macros in docs en
130$(PATH_BIN)/en/readme.txt: Config.kmk en/readme.txt
131 $(QUIET)$(SED) "s;_VERSION_;$(VERSION);g" en/readme.txt \
132 | $(SED) "s;_BUILD_;$(BUILD);g" \
133 > $(PATH_BIN)/en/readme.txt
134
135# substitute macros in docs de
136$(PATH_BIN)/de/readme.txt: Config.kmk de/readme.txt
137 $(QUIET)$(SED) "s;_VERSION_;$(VERSION);g" de/readme.txt \
138 | $(SED) "s;_BUILD_;$(BUILD);g" \
139 > $(PATH_BIN)/de/readme.txt
140
141
142# final: zip all files!
143$(PATH_ROOT)/dist/$(PACKAGE_NAME): \
144 $(PATH_BIN)/uni.pdr
145 $(QUIET)$(MKDIR) -p $(PATH_ROOT)/dist
146 $(QUIET)$(RM) -f $@
147 -ea2.cmd -e DEFAULT_PORT=UNI $(PATH_BIN)/en/uni.pdr
148 -ea2.cmd -e DEFAULT_PORT=UNI $(PATH_BIN)/de/uni.pdr
149 zip -9 -r $@ $(PATH_BIN)/* -x $(PATH_BIN)/uni.pdr
150
151
Note: See TracBrowser for help on using the repository browser.