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

Last change on this file since 30 was 26, checked in by diver, 15 years ago

major rework

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