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

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

kmk makefile and related changes

File size: 2.4 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 rc/uni.rc \
28 uni.def \
29 uni.c
30
31uni_CFLAGS = -Zomf
32uni_CFLAGS.release = -s -O3 -march=pentium -mcpu=pentium4
33uni_CFLAGS.debug = -g -O0 -DDEBUG
34uni_LDFLAGS = -Zomf -Zno-fork -Zmap -Zbin-files
35uni_LDFLAGS.release = -s
36uni_LDFLAGS.debug = -g
37
38uni_DEFS =
39uni_INCS = ./h ./rc
40
41uni_CLEAN = /rc/description.rc $(PATH_BIN)/uni.pdr $(PATH_BIN)/uni.dll
42
43#build other files (e.g. help)
44OTHERS = /rc/uni.ipf $(PATH_BIN)/uni.hlp $(PATH_BIN)/readme.txt $(PATH_BIN)/uni.pdr
45OTHER_CLEAN = $(PATH_BIN)/uni.hlp $(PATH_BIN)/readme.txt
46
47
48# packaging stuffs
49ifeq ($(BUILD_TYPE),debug)
50 PACKAGE_NAME = uni-$(subst .,_,$(VERSION))-$(BUILD)-debug
51else
52 PACKAGE_NAME = uni-$(subst .,_,$(VERSION))-$(BUILD)
53endif
54PACKING += $(PATH_ROOT)/dist/$(PACKAGE_NAME).zip
55OTHER_CLEAN += $(PATH_ROOT)/dist/$(PACKAGE_NAME).zip
56
57# now include standard code
58include $(PATH_KBUILD)/rules.kMk
59
60# here follows standard gnu make inference rules
61
62# add new dependancy on build level info
63rc/uni.rc : rc/description.rc
64
65# update bldlevel info
66rc/description.rc: config.kmk
67 @echo Writing build level informations
68 @cp rc/description.rc_ rc/description.rc
69 @BldLevelInf0.cmd $(VERSION) $(BUILD)
70
71# substitute macros in ipf file
72/rc/uni.ipf: Config.kmk ./rc/uni.ipf
73 $(QUIET)$(SED) "s;_VERSION_;$(VERSION);g" ./rc/uni.ipf \
74 | $(SED) "s;_BUILD_;$(BUILD);g" \
75 > uni.ipf
76
77# compile english help file
78$(PATH_BIN)/uni.hlp: uni.ipf ./rc/uni.h ./H/hmacros.h config.kmk
79 -gcc -E -I./h -I./rc -x c uni.ipf > uni.i
80 -@mkdir $(PATH_BIN)
81 $(TOOLKIT)\bin\ipfc.exe uni.i $(PATH_BIN)/uni.hlp /COUNTRY=001 /CODEPAGE=850
82 rm uni.i
83 rm uni.ipf
84
85
86# substitute macros in docs
87$(PATH_BIN)/readme.txt: Config.kmk readme.txt
88 $(QUIET)$(SED) "s;_VERSION_;$(VERSION);g" readme.txt \
89 | $(SED) "s;_BUILD_;$(BUILD);g" \
90 > $(PATH_BIN)/readme.txt
91
92#rename the dll to pdr
93$(PATH_BIN)/uni.pdr: config.kmk
94 cp $(PATH_TARGET)/uni/uni.dll $(PATH_BIN)/uni.pdr
95
96
Note: See TracBrowser for help on using the repository browser.