source: trunk/client/src/Makefile.kmk@ 788

Last change on this file since 788 was 768, checked in by Herwig Bauernfeind, 12 years ago

Samba Client 2.2: Fix Ticket #218 (missing ndpsmb.ndp)

  • Property svn:eol-style set to native
File size: 7.0 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
17
18DLLS = ndpsmb
19
20# required to get IPFC compiler to work correctly
21export IPFC=$(TOOLKIT)\IPFC
22
23TOOL_GCC3OMF_RCFLAGS += -i=$(TOOLKIT)/h
24
25ndpsmb_SOURCES = \
26 rc/rc.rc \
27 ndpsmb.def \
28 ndpsmb.c \
29 debug.c \
30 printf.c \
31 util.c \
32 dircache.c \
33 smbwrp.c
34
35ndpsmb_CFLAGS = -Zomf
36# YD -O2/O3 triggers stack variable alignment bug in gcc 4.3.2/4.4.0!
37ndpsmb_CFLAGS.release = -g -O1 -march=pentium -mtune=pentium4
38
39ndpsmb_CFLAGS.debug = -g -O0 -DDEBUG_PRINTF
40ndpsmb_LDFLAGS = -Zomf -Zno-fork -Zmap -Zdll -Zhigh-mem
41ndpsmb_LDFLAGS.release = -s
42ndpsmb_LDFLAGS.debug = -g
43
44ndpsmb_DEFS = $(LIBSMB_THREAD_UNSAFE)
45ndpsmb_INCS = ./h ./rc \
46 $(SAMBA) \
47 $(SAMBA)/source3 \
48 $(SAMBA)/source3/include \
49 $(SAMBA)/lib/replace \
50 $(SAMBA)/popt \
51 $(SAMBA)/lib/talloc \
52 $(SAMBA)/librpc \
53 $(SAMBA)/lib/tdb/include \
54 $(SAMBA)/lib/tevent
55
56ndpsmb_LIBS = libsmbclient.a socket.a libtalloc.a libtdb.a libwbclient.a z
57ndpsmb_LIBS += $(GCC_LIB)/binmode.obj
58ndpsmb_LIBPATH = $(SAMBA)/source3/bin $(Z_LIBDIR)
59
60ndpsmb_CLEAN = rc/description.rc $(PATH_STAGE_LIB)/ndpsmb.dll
61
62#build other files (e.g. help)
63OTHER_CLEAN += $(PATH_INST_BIN)/en/ndpsmb.hlp $(PATH_OBJ)/en/ndpsmb.ipf $(PATH_INST_BIN)/readme.txt \
64 $(PATH_INST_BIN)/fr/ndpsmb.hlp $(PATH_OBJ)/fr/ndpsmb.ipf $(PATH_INST_BIN)/readme_fr.txt \
65 $(PATH_INST_BIN)/de/ndpsmb.hlp $(PATH_OBJ)/de/ndpsmb.ipf $(PATH_INST_BIN)/readme_de.txt
66
67# install some more files
68INSTALLS = ndpsmb-docs
69ndpsmb-docs_INST = $(INST_BIN)
70ndpsmb-docs_SOURCES = COPYING resources/ndpsmb.ndp resources/instpl.cmd resources/uninstpl.cmd
71
72OTHER_CLEAN += $(INST_BIN)/COPYING $(INST_BIN)/ndpsmb.ndp $(INST_BIN)/instpl.cmd $(INST_BIN)/uninstpl.cmd $(INST_BIN)/ndpsmb.dll $(PATH_OBJ)/ndpsmb.wis
73
74# packaging stuffs
75ifeq ($(BUILD_TYPE),debug)
76 PACKAGE_NAME = ndpsmb-$(subst .,_,$(VERSION))-$(BUILD)-debug
77else
78 PACKAGE_NAME = ndpsmb-$(subst .,_,$(VERSION))-$(BUILD)
79endif
80PACKING += $(PATH_OUT)/dist/$(PACKAGE_NAME).zip
81PACKING += $(PATH_OUT)/dist/$(PACKAGE_NAME).wpi
82OTHER_CLEAN += $(PATH_OUT)/dist/$(PACKAGE_NAME).zip
83OTHER_CLEAN += $(PATH_OUT)/dist/$(PACKAGE_NAME).wpi
84
85# now include standard code
86include $(PATH_KBUILD)/rules.kMk
87
88# here follows standard gnu make inference rules
89
90# add new dependancy on build level info
91rc/rc.rc : rc/description.rc nversion.h rc/rc.rc_
92 $(QUIET)$(SED) "s;_VERSION_;$(VERSION);g" rc/rc.rc_ \
93 | $(SED) "s;_WPIVERSION_;$(subst .,\\\,$(VERSION));g" \
94 | $(SED) "s;_BUILD_;$(BUILD);g" \
95 | $(SED) "s;_VENDOR_;$(VENDOR);g" \
96 > rc/rc.rc
97
98
99# update bldlevel info
100rc/description.rc: config.kmk
101 @echo Writing build level informations
102 @cp rc/description.rc_ rc/description.rc
103 $(QUIET)cmd /c 'BldLevelInf.cmd -V"$(VERSION)" -N"$(VENDOR)" -D"NDPSMB - SMBFS NetDrive External Plugin Build $(BUILD)" -Len rc\\description.rc'
104
105# compile help file
106$(PATH_INST_BIN)/en/ndpsmb.hlp: ./help/ndpsmb.ipf nversion.h Config.kmk ./help/changelog.txt
107 -@mkdir $(PATH_OBJ)
108 -@mkdir $(PATH_OBJ)\en
109 @ppwizard.cmd ./help/ndpsmb.ipf /Pack:N /output:$(PATH_OBJ)/en/ndpsmb.ipf /other /WarningsRc:0 /Define:en /Define:ipf
110 -@mkdir $(PATH_INST_BIN)
111 -@mkdir $(PATH_INST_BIN)\en
112 $(TOOLKIT)\bin\ipfc.exe $(PATH_OBJ)/en/ndpsmb.ipf $(PATH_INST_BIN)/en/ndpsmb.hlp /COUNTRY=001 /CODEPAGE=850
113
114$(PATH_INST_BIN)/fr/ndpsmb.hlp: ./help/ndpsmb_fr.ipf nversion.h Config.kmk ./help/changelog.txt
115 -@mkdir $(PATH_OBJ)
116 -@mkdir $(PATH_OBJ)\fr
117 @ppwizard.cmd ./help/ndpsmb_fr.ipf /Pack:N /output:$(PATH_OBJ)/fr/ndpsmb.ipf /other /WarningsRc:0 /Define:fr /Define:ipf
118 -@mkdir $(PATH_INST_BIN)
119 -@mkdir $(PATH_INST_BIN)\fr
120 $(TOOLKIT)\bin\ipfc.exe $(PATH_OBJ)/fr/ndpsmb.ipf $(PATH_INST_BIN)/fr/ndpsmb.hlp /COUNTRY=001 /CODEPAGE=850
121
122$(PATH_INST_BIN)/de/ndpsmb.hlp: ./help/ndpsmb_de.ipf nversion.h Config.kmk ./help/changelog.txt
123 -@mkdir $(PATH_OBJ)
124 -@mkdir $(PATH_OBJ)\de
125 @ppwizard.cmd ./help/ndpsmb_de.ipf /Pack:N /output:$(PATH_OBJ)/de/ndpsmb.ipf /other /WarningsRc:0 /Define:de /Define:ipf
126 -@mkdir $(PATH_INST_BIN)
127 -@mkdir $(PATH_INST_BIN)\de
128 $(TOOLKIT)\bin\ipfc.exe $(PATH_OBJ)/de/ndpsmb.ipf $(PATH_INST_BIN)/de/ndpsmb.hlp /COUNTRY=001 /CODEPAGE=850
129
130
131# substitute macros in nversion.h
132nversion.h: Config.kmk nversion.tpl
133 $(QUIET)$(SED) "s;_VERSION_;$(VERSION);g" nversion.tpl \
134 | $(SED) "s;_WPIVERSION_;$(subst .,\\\,$(VERSION));g" \
135 | $(SED) "s;_BUILD_;$(BUILD);g" \
136 | $(SED) "s;_VENDOR_;$(VENDOR);g" \
137 > nversion.h
138
139# substitute macros in docs
140$(PATH_INST_BIN)/readme.txt: Config.kmk ./help/readme.txt nversion.h ./help/changelog.txt
141 @ppwizard.cmd ./help/readme.txt /option:KeepIndent=On /option:LeaveBlankLines=On /Pack:N /output:$(PATH_INST_BIN)/readme.txt /other /WarningsRc:0 /Define:en /Define:txt
142
143$(PATH_INST_BIN)/readme_fr.txt: Config.kmk ./help/readme_fr.txt nversion.h ./help/changelog.txt
144 @ppwizard.cmd ./help/readme_fr.txt /option:KeepIndent=On /option:LeaveBlankLines=On /Pack:N /output:$(PATH_INST_BIN)/readme_fr.txt /other /WarningsRc:0 /Define:fr /Define:txt
145
146$(PATH_INST_BIN)/readme_de.txt: Config.kmk ./help/readme_de.txt nversion.h ./help/changelog.txt
147 @ppwizard.cmd ./help/readme_de.txt /option:KeepIndent=On /option:LeaveBlankLines=On /Pack:N /output:$(PATH_INST_BIN)/readme_de.txt /other /WarningsRc:0 /Define:de /Define:txt
148
149
150# final: zip all files!
151$(PATH_OUT)/dist/$(PACKAGE_NAME).zip: \
152 $(PATH_INST_BIN)/instpl.cmd \
153 $(PATH_INST_BIN)/ndpsmb.ndp \
154 $(PATH_INST_BIN)/uninstpl.cmd \
155 $(PATH_INST_BIN)/ndpsmb.dll \
156 $(PATH_INST_BIN)/COPYING \
157 $(PATH_INST_BIN)/en/ndpsmb.hlp \
158 $(PATH_INST_BIN)/fr/ndpsmb.hlp \
159 $(PATH_INST_BIN)/de/ndpsmb.hlp \
160 $(PATH_INST_BIN)/readme.txt \
161 $(PATH_INST_BIN)/readme_fr.txt \
162 $(PATH_INST_BIN)/readme_de.txt
163 $(QUIET)$(MKDIR) -p $(PATH_OUT)/dist
164 $(QUIET)$(RM) -f $@
165 $(QUIET)$(REDIRECT) -C $(PATH_INST_BIN) -- zip -Sr9 $@ \*
166
167
168# final2: wpi all files!
169$(PATH_OUT)/dist/$(PACKAGE_NAME).wpi: \
170 ./resources/ndpsmb.tpl \
171 $(PATH_INST_BIN)/instpl.cmd \
172 $(PATH_INST_BIN)/ndpsmb.ndp \
173 $(PATH_INST_BIN)/uninstpl.cmd \
174 $(PATH_INST_BIN)/ndpsmb.dll \
175 $(PATH_INST_BIN)/COPYING \
176 $(PATH_INST_BIN)/en/ndpsmb.hlp \
177 $(PATH_INST_BIN)/fr/ndpsmb.hlp \
178 $(PATH_INST_BIN)/de/ndpsmb.hlp \
179 $(PATH_INST_BIN)/readme.txt \
180 $(PATH_INST_BIN)/readme_fr.txt \
181 $(PATH_INST_BIN)/readme_de.txt
182 $(QUIET)$(MKDIR) -p $(PATH_OUT)/dist
183 $(QUIET)$(RM) -f $@
184 @ppwizard.cmd resources/ndpsmb.tpl /Pack:N /output:$(PATH_OBJ)/ndpsmb.wis /other /WarningsRc:0
185 $(QUIET)$(REDIRECT) -C $(PATH_INST_BIN) -- runwic.cmd $(subst /,\\,$@) -a 2 -r ".\en\*.hlp"
186 $(QUIET)$(REDIRECT) -C $(PATH_INST_BIN) -- runwic.cmd $(subst /,\\,$@) -a 3 -r ".\fr\*.hlp"
187 $(QUIET)$(REDIRECT) -C $(PATH_INST_BIN) -- runwic.cmd $(subst /,\\,$@) -a 4 -r ".\de\*.hlp"
188 $(QUIET)$(REDIRECT) -C $(PATH_INST_BIN) -- runwic.cmd $(subst /,\\,$@) -s $(subst /,\\,$(PATH_OBJ))\\ndpsmb.wis -a 1 "*"
Note: See TracBrowser for help on using the repository browser.