source: branches/client-1.5/src/Makefile.kmk@ 426

Last change on this file since 426 was 426, checked in by Herwig Bauernfeind, 15 years ago

German help and stuff

File size: 6.2 KB
Line 
1#
2# Netdrive Samba client plugin
3# kBuild makefile
4# Copyright (C) netlabs.org 2003-2008
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
16ndpsmb_TOOL = GCC3OMF
17ndpsmb_RCTOOL = OPENWATCOM
18
19DLLS = ndpsmb
20
21# required to get IPFC compiler to work correctly
22export IPFC=$(TOOLKIT)\IPFC
23
24ndpsmb_RCTOOL =OPENWATCOM
25TOOL_OPENWATCOM_RCFLAGS += -i=$(TOOLKIT)/h
26
27ndpsmb_SOURCES = \
28 rc/rc.rc \
29 ndpsmb.def \
30 ndpsmb.c \
31 debug.c \
32 printf.c \
33 util.c \
34 smbwrp.c
35
36ndpsmb_CFLAGS = -Zomf
37# YD -O2/O3 triggers stack variable alignment bug in gcc 4.3.2/4.4.0!
38# ndpsmb_CFLAGS.release = -g -O1 -march=pentium -mtune=pentium4
39# SCS when building with gcc 3.3.5 use the below cflags
40# ndpsmb_CFLAGS.release = -s -O3 -march=pentium -mcpu=pentium3
41ndpsmb_CFLAGS.release = -s -O1 -march=pentium -mtune=pentium3
42ndpsmb_CFLAGS.debug = -g -O0 -DDEBUG_PRINTF
43ndpsmb_LDFLAGS = -Zomf -Zno-fork -Zmap -Zbin-files
44ndpsmb_LDFLAGS.release = -s
45ndpsmb_LDFLAGS.debug = -g
46
47ndpsmb_DEFS =
48ndpsmb_INCS = ./h ./rc \
49 $(SAMBA)/source \
50 $(SAMBA)/source/include \
51 $(SAMBA)/source/lib/replace \
52 $(SAMBA)/source/popt \
53 $(SAMBA)/source/lib/talloc \
54 $(SAMBA)/source/librpc \
55 $(SAMBA)/source/tdb/include \
56 $(GCC_INC)
57
58ndpsmb_LIBS = libsmbclient.a socket.a
59ndpsmb_LIBPATH = $(SAMBA)/source/bin
60
61ndpsmb_CLEAN = rc/description.rc $(PATH_BIN)/ndpsmb.dll
62
63
64#build other files (e.g. help)
65OTHERS = $(PATH_BIN)/en/ndpsmb.hlp $(PATH_BIN)/readme.txt \
66 $(PATH_BIN)/fr/ndpsmb.hlp $(PATH_BIN)/readme_fr.txt \
67 $(PATH_BIN)/de/ndpsmb.hlp $(PATH_BIN)/readme_de.txt
68OTHER_CLEAN = $(PATH_BIN)/en/ndpsmb.hlp $(PATH_OBJ)/en/ndpsmb.ipf $(PATH_BIN)/readme.txt \
69 $(PATH_BIN)/fr/ndpsmb.hlp $(PATH_OBJ)/fr/ndpsmb.ipf $(PATH_BIN)/readme_fr.txt \
70 $(PATH_BIN)/de/ndpsmb.hlp $(PATH_OBJ)/de/ndpsmb.ipf $(PATH_BIN)/readme_de.txt
71
72# install some more files
73INSTALLS = ndpsmb-docs
74ndpsmb-docs_INST = bin/
75ndpsmb-docs_SOURCES = $(SAMBA)/COPYING=>COPYING resources/ndpsmb.ndp resources/instpl.cmd
76OTHER_CLEAN += $(PATH_BIN)/COPYING $(PATH_BIN)/ndpsmb.ndp $(PATH_BIN)/instpl.cmd
77
78
79# packaging stuffs
80ifeq ($(BUILD_TYPE),debug)
81 PACKAGE_NAME = ndpsmb-$(subst .,_,$(VERSION))-$(BUILD)-debug
82else
83 PACKAGE_NAME = ndpsmb-$(subst .,_,$(VERSION))-$(BUILD)
84endif
85PACKING += $(PATH_ROOT)/dist/$(PACKAGE_NAME).zip
86PACKING += $(PATH_ROOT)/dist/$(PACKAGE_NAME).wpi
87OTHER_CLEAN += $(PATH_ROOT)/dist/$(PACKAGE_NAME).zip
88OTHER_CLEAN += $(PATH_ROOT)/dist/$(PACKAGE_NAME).wpi
89
90# now include standard code
91include $(PATH_KBUILD)/rules.kMk
92
93# here follows standard gnu make inference rules
94
95# add new dependancy on build level info
96rc/rc.rc : rc/description.rc
97
98# update bldlevel info
99rc/description.rc: config.kmk
100 @echo Writing build level informations
101 @cp rc/description.rc_ rc/description.rc
102 @BldLevelInf0.cmd $(VERSION) $(BUILD)
103
104# compile help file
105$(PATH_BIN)/en/ndpsmb.hlp: ./help/ndpsmb.ipf version.h Config.kmk
106 -@mkdir $(PATH_OBJ)
107 -@mkdir $(PATH_OBJ)\en
108 @ppwizard.cmd ./help/ndpsmb.ipf /Pack:N /output:$(PATH_OBJ)/en/ndpsmb.ipf /other /WarningsRc:0
109 -@mkdir $(PATH_BIN)
110 -@mkdir $(PATH_BIN)\en
111 $(TOOLKIT)\bin\ipfc.exe $(PATH_OBJ)/en/ndpsmb.ipf $(PATH_BIN)/en/ndpsmb.hlp /COUNTRY=001 /CODEPAGE=850
112
113$(PATH_BIN)/fr/ndpsmb.hlp: ./help/ndpsmb_fr.ipf version.h Config.kmk
114 -@mkdir $(PATH_OBJ)
115 -@mkdir $(PATH_OBJ)\fr
116 @ppwizard.cmd ./help/ndpsmb_fr.ipf /Pack:N /output:$(PATH_OBJ)/fr/ndpsmb.ipf /other /WarningsRc:0
117 -@mkdir $(PATH_BIN)
118 -@mkdir $(PATH_BIN)\fr
119 $(TOOLKIT)\bin\ipfc.exe $(PATH_OBJ)/fr/ndpsmb.ipf $(PATH_BIN)/fr/ndpsmb.hlp /COUNTRY=001 /CODEPAGE=850
120
121$(PATH_BIN)/de/ndpsmb.hlp: ./help/ndpsmb_de.ipf version.h Config.kmk
122 -@mkdir $(PATH_OBJ)
123 -@mkdir $(PATH_OBJ)\de
124 @ppwizard.cmd ./help/ndpsmb_de.ipf /Pack:N /output:$(PATH_OBJ)/de/ndpsmb.ipf /other /WarningsRc:0
125 -@mkdir $(PATH_BIN)
126 -@mkdir $(PATH_BIN)\de
127 $(TOOLKIT)\bin\ipfc.exe $(PATH_OBJ)/de/ndpsmb.ipf $(PATH_BIN)/de/ndpsmb.hlp /COUNTRY=001 /CODEPAGE=850
128
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# substitute macros in docs
138$(PATH_BIN)/readme.txt: Config.kmk ./help/readme.txt
139 $(QUIET)$(SED) "s;_VERSION_;$(VERSION);g" ./help/readme.txt \
140 | $(SED) "s;_BUILD_;$(BUILD);g" \
141 > $(PATH_BIN)/readme.txt
142
143$(PATH_BIN)/readme_fr.txt: Config.kmk ./help/readme_fr.txt
144 $(QUIET)$(SED) "s;_VERSION_;$(VERSION);g" ./help/readme_fr.txt \
145 | $(SED) "s;_BUILD_;$(BUILD);g" \
146 > $(PATH_BIN)/readme_fr.txt
147
148$(PATH_BIN)/readme_de.txt: Config.kmk ./help/readme_de.txt
149 $(QUIET)$(SED) "s;_VERSION_;$(VERSION);g" ./help/readme_de.txt \
150 | $(SED) "s;_BUILD_;$(BUILD);g" \
151 > $(PATH_BIN)/readme_de.txt
152
153
154# final: zip all files!
155$(PATH_ROOT)/dist/$(PACKAGE_NAME): \
156 $(PATH_BIN)/ndpsmb.dll \
157 $(PATH_BIN)/en/ndpsmb.hlp \
158 $(PATH_BIN)/fr/ndpsmb.hlp \
159 $(PATH_BIN)/de/ndpsmb.hlp \
160 $(PATH_BIN)/readme.txt \
161 $(PATH_BIN)/readme_fr.txt \
162 $(PATH_BIN)/readme_de.txt
163
164 $(QUIET)$(MKDIR) -p $(PATH_ROOT)/dist
165 $(QUIET)$(RM) -f $@
166 $(QUIET)zip -9 -j $@ $(PATH_BIN)/*
167
168# final2: wpi all files!
169$(PATH_ROOT)/dist/$(PACKAGE_NAME).wpi: \
170 ./resources/ndpsmb.wis_ \
171 $(PATH_BIN)/ndpsmb.dll \
172 $(PATH_BIN)/en/ndpsmb.hlp \
173 $(PATH_BIN)/fr/ndpsmb.hlp \
174 $(PATH_BIN)/de/ndpsmb.hlp \
175 $(PATH_BIN)/readme.txt \
176 $(PATH_BIN)/readme_fr.txt \
177 $(PATH_BIN)/readme_de.txt
178 $(QUIET)$(MKDIR) -p $(PATH_ROOT)/dist
179 $(QUIET)$(RM) -f $@
180 @ppwizard.cmd resources/ndpsmb.wis_ /Pack:N /output:$(PATH_OBJ)/ndpsmb.wis /other /WarningsRc:0
181 $(QUIET)$(REDIRECT) -C $(PATH_BIN)/en -- runwic.cmd $(subst /,\\,$@) -a 2 -r "*"
182 $(QUIET)$(REDIRECT) -C $(PATH_BIN)/fr -- runwic.cmd $(subst /,\\,$@) -a 2 -r "*"
183 $(QUIET)$(REDIRECT) -C $(PATH_BIN)/de -- runwic.cmd $(subst /,\\,$@) -a 2 -r "*"
184 $(QUIET)$(REDIRECT) -C $(PATH_BIN) -- runwic.cmd $(subst /,\\,$@) -s $(subst /,\\,$(PATH_OBJ))\\ndpsmb.wis -a 1 "*"
Note: See TracBrowser for help on using the repository browser.