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

Last change on this file since 35 was 35, checked in by herwigb, 8 years ago

Cleanup makefile, add german strings for de/uni.dlg, update en/uni.dlg, declare build.cmd obsolete

File size: 4.2 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_main_SOURCES = \
27 uni.def \
28 uni.c \
29 utils.c \
30 splpd.c
31
32# english source
33uni_INST = bin/en/
34uni_SOURCES = $(uni_main_SOURCES) en/uni.rc
35
36# german source
37DLLS += uni_de
38uni_de_EXTENDS = uni
39uni_de_NAME = uni
40uni_de_INST = bin/de/
41uni_de_SOURCES = $(uni_main_SOURCES) de/uni.rc
42uni_de_CLEAN = $(PATH_STAGE_BIN)/de/uni.pdr
43
44uni_CFLAGS = -Zdll
45uni_CFLAGS.release = -s -O0 -march=i686 -mtune=i686
46uni_CFLAGS.debug = -g -O0 -DDEBUG
47uni_LDFLAGS = -Zhigh-mem -Zomf -Zno-fork -Zmap -Zbin-files KMK_NOIMPLIB
48uni_LDFLAGS.release = -s
49uni_LDFLAGS.debug = -g
50uni_LIBS += cx
51
52uni_DEFS =
53uni_INCS = ./h
54
55uni_DLLSUFF = .pdr
56
57uni_CLEAN = description.rc $(PATH_STAGE_BIN)/uni.pdr
58
59#build other files en (e.g. help)
60OTHERS = $(PATH_STAGE_BIN)/en/uni.hlp $(PATH_STAGE_BIN)/en/readme.txt
61OTHER_CLEAN = $(PATH_STAGE_BIN)/en/uni.hlp $(PATH_STAGE_BIN)/en/readme.txt
62
63#build other files de (e.g. help)
64OTHERS += $(PATH_STAGE_BIN)/de/uni.hlp $(PATH_STAGE_BIN)/de/readme.txt
65OTHER_CLEAN += $(PATH_STAGE_BIN)/de/uni.hlp $(PATH_STAGE_BIN)/de/readme.txt
66
67
68#install some more files
69INSTALLS = docs
70docs_INST = bin/
71docs_SOURCES = uni.ico
72OTHER_CLEAN += $(PATH_STAGE_BIN)/uni.ico
73
74# packaging stuffs
75ifeq ($(BUILD_TYPE),debug)
76 PACKAGE_NAME = uni-$(subst .,_,$(VERSION))-$(BUILD)-debug.zip
77else
78 PACKAGE_NAME = uni-$(subst .,_,$(VERSION))-$(BUILD).zip
79endif
80PACKING += $(PATH_ROOT)/dist/$(PACKAGE_NAME)
81OTHER_CLEAN += $(PATH_ROOT)/dist/$(PACKAGE_NAME)
82
83# now include standard code
84include $(PATH_KBUILD)/rules.kMk
85
86# here follows standard gnu make inference rules
87
88# add new dependancy on build level info
89en/uni.rc : description.rc
90de/uni.rc : description.rc
91
92# update bldlevel info
93description.rc: config.kmk
94 @echo Writing build level informations
95 @cp description.rc_ description.rc
96 @BldLevelInf0.cmd $(VERSION) $(BUILD)
97
98
99# compile english help file
100$(PATH_STAGE_BIN)/en/uni.hlp: ./en/uni.ipf version.h Config.kmk
101 -@mkdir $(PATH_OBJ)
102 -@mkdir $(PATH_OBJ)\en
103 @ppwizard.cmd ./en/uni.ipf /Pack:N /output:$(PATH_OBJ)/en/uni.ipf /other /WarningsRc:0
104 -@mkdir $(PATH_STAGE_BIN)
105 -@mkdir $(PATH_STAGE_BIN)\en
106 $(TOOLKIT)\bin\ipfc.exe $(PATH_OBJ)/en/uni.ipf $(PATH_STAGE_BIN)/en/uni.hlp /COUNTRY=001 /CODEPAGE=850
107
108# compile german help file
109$(PATH_STAGE_BIN)/de/uni.hlp: ./de/uni.ipf version.h Config.kmk
110 -@mkdir $(PATH_OBJ)
111 -@mkdir $(PATH_OBJ)\de
112 @ppwizard.cmd ./de/uni.ipf /Pack:N /output:$(PATH_OBJ)/de/uni.ipf /other /WarningsRc:0
113 -@mkdir $(PATH_STAGE_BIN)
114 -@mkdir $(PATH_STAGE_BIN)\de
115 $(TOOLKIT)\bin\ipfc.exe $(PATH_OBJ)/de/uni.ipf $(PATH_STAGE_BIN)/de/uni.hlp /COUNTRY=001 /CODEPAGE=850
116
117
118# substitute macros in docs en
119$(PATH_STAGE_BIN)/en/readme.txt: Config.kmk en/readme.txt
120 $(QUIET)$(SED) "s;_VERSION_;$(VERSION);g" en/readme.txt \
121 | $(SED) "s;_BUILD_;$(BUILD);g" \
122 > $(PATH_STAGE_BIN)/en/readme.txt
123
124# substitute macros in docs de
125$(PATH_STAGE_BIN)/de/readme.txt: Config.kmk de/readme.txt
126 $(QUIET)$(SED) "s;_VERSION_;$(VERSION);g" de/readme.txt \
127 | $(SED) "s;_BUILD_;$(BUILD);g" \
128 > $(PATH_STAGE_BIN)/de/readme.txt
129
130# substitute macros in version.h
131version.h: Config.kmk version.h_
132 $(SED) "s;_VERSION_;$(VERSION);g" version.h_ \
133 | $(SED) "s;_WPIVERSION_;$(subst .,\\\,$(VERSION));g" \
134 | $(SED) "s;_BUILD_;$(BUILD);g" \
135 > version.h
136
137# final: zip all files!
138$(PATH_ROOT)/dist/$(PACKAGE_NAME): \
139 $(PATH_STAGE_BIN)/uni.pdr
140 $(QUIET)$(MKDIR) -p $(PATH_ROOT)/dist
141 $(QUIET)$(RM) -f $@
142 -ea2.cmd -e DEFAULT_PORT=UNI $(PATH_STAGE_BIN)/en/uni.pdr
143 -ea2.cmd -e DEFAULT_PORT=UNI $(PATH_STAGE_BIN)/de/uni.pdr
144 zip -9 -r $@ $(PATH_STAGE_BIN)/*
145
Note: See TracBrowser for help on using the repository browser.