Fix fscan return val check
[idzebra-moved-to-github.git] / win / makefile
1 # Zebra makefile for MS NMAKE
2  
3 ###########################################################
4 ############### Parameters 
5 ###########################################################
6
7 DEBUG=0   # 0 for release, 1 for debug
8
9 # TCL is optional - ONLY needed for source straight from Git
10 TCL="C:\Tcl\bin\tclsh85.exe"
11 HAVE_TCL=1
12
13 # EXPAT is optional. It's required for grs.xml-filters.
14 HAVE_EXPAT=1
15 EXPAT_DIR=c:\Program files\Expat 2.0.1
16
17 # iconv is optional
18 HAVE_ICONV=1
19 ICONV_DIR=c:\iconv-1.9.2.win32
20
21 # libxslt. For mod_dom and mod_alvis
22 HAVE_LIBXSLT=1
23 LIBXSLT_DIR=c:\libxslt-1.1.24.win32
24
25 # libxml2. Used by libxslt
26 HAVE_LIBXML2=1
27 LIBXML2_DIR=c:\libxml2-2.7.1.win32
28
29 # zlib compression.  Used by libxml2
30 ZLIB_DIR = c:\zlib-1.2.3.win32
31
32 # get WIN32 binaries libxml2 & iconv & zlib from here:
33 #  http://www.zlatkovic.com/libxml.en.html
34
35 # ICU support
36 # get icu libraries from http://www.icu-project.org
37 HAVE_ICU=1
38 ICU_DIR=c:\icu
39
40
41 default: all
42 all: dirs generate expat iconv libxml2 libxslt icu yaz dll zserver zebraidx tstflock
43
44 # Directories
45 # The current directory is supposed to be something like
46 # ..../Zebra/Win, everything is relative to that
47 ROOTDIR=..   # The home of zebra
48
49 # YAZ include files, libraries, etc.
50 YAZDIR=$(ROOTDIR)\..\yaz  # or \program files\yaz
51
52 YAZBINDIR=$(YAZDIR)\bin
53 !if $(DEBUG)
54 YAZLIB="$(YAZDIR)\lib\yaz3d.lib"
55 !if $(HAVE_ICU)
56 YAZLIB=$(YAZLIB) "$(YAZDIR)\lib\yaz_icu3d.lib"
57 !endif
58 YAZ_DLL_SOURCE="$(YAZBINDIR)\yaz3d.dll"
59 YAZ_DLL_TARGET="$(BINDIR)\yaz3d.dll"
60 !else
61 YAZLIB="$(YAZDIR)\lib\yaz3.lib"
62 !if $(HAVE_ICU)
63 YAZLIB=$(YAZLIB) "$(YAZDIR)\lib\yaz_icu3.lib"
64 !endif
65 YAZ_DLL_SOURCE="$(YAZBINDIR)\yaz3.dll"
66 YAZ_DLL_TARGET="$(BINDIR)\yaz3.dll"
67 !endif
68
69 # BZIP2 settings. Uncomment and specify if you wish to use LIBBZIP2.
70 # (C) 1996-1999 Julian Seward <jseward@acm.org> http://www.bzip2.org
71
72 #BZIP2INCLUDE=/I"$(ROOTDIR)\..\bzip2-0.9.5d"
73 #BZIP2LIB=$(ROOTDIR)\..\bzip2-0.9.5d\libbz2.lib
74 #BZIP2DEF=/D"HAVE_BZLIB_H=1"
75
76 # ZEBRA Include files, libraries, programs, etc.
77 INCLDIR=$(ROOTDIR)\include  # our includes
78 LIBDIR=$(ROOTDIR)\lib       # We produce .lib, .exp etc there
79 BINDIR=$(ROOTDIR)\bin       # We produce exes and dlls there
80 WINDIR=$(ROOTDIR)\win       # all these Win make things
81 !if $(DEBUG)
82 OBJDIR=$(WINDIR)\dobj       # where we store intermediate files
83 !else
84 OBJDIR=$(WINDIR)\obj        # where we store intermediate files
85 !endif
86 UNIXDIR=$(ROOTDIR)\unix     # corresponding unix things
87 SRCDIR=$(ROOTDIR)           # for the case we move them under src
88
89 INDEXDIR=$(SRCDIR)\INDEX
90 BFILEDIR=$(SRCDIR)\BFILE
91 DFADIR=$(SRCDIR)\DFA
92 DICTDIR=$(SRCDIR)\DICT
93 ISAMSDIR=$(SRCDIR)\ISAMS
94 ISAMCDIR=$(SRCDIR)\ISAMC
95 ISAMBDIR=$(SRCDIR)\ISAMB
96 RSETDIR=$(SRCDIR)\RSET
97 UTILDIR=$(SRCDIR)\UTIL
98 DATA1DIR=$(SRCDIR)\DATA1
99
100 # Force temp files in a local temp, easier to clean
101 # when nmake crashes and leaves a lot of rubbish behind
102 TMPDIR=$(ROOTDIR)\win\tmp
103 TMP=$(TMPDIR)
104 TEMP=$(TMPDIR)
105
106 # NSIS
107 NSIS="c:\program files\nsis\makensis.exe"
108
109 dist:
110         nmake DEBUG=1 clean
111         nmake DEBUG=0 clean
112         nmake DEBUG=0
113         $(NSIS) zebra.nsi
114
115 nsis:
116         $(NSIS) zebra.nsi
117
118 # Targets - what to make
119
120 !if $(DEBUG)
121 DLL=$(BINDIR)\idzebrad.dll
122 IMPLIB=$(LIBDIR)\idzebrad.lib
123 !else
124 DLL=$(BINDIR)\idzebra.dll
125 IMPLIB=$(LIBDIR)\idzebra.lib
126 !endif
127
128 ZSERVER=$(BINDIR)\zebrasrv.exe
129 ZEBRAIDX=$(BINDIR)\zebraidx.exe
130 TSTFLOCK=$(BINDIR)\tstflock.exe
131
132 # shortcut names defined here
133 zebraidx: $(ZEBRAIDX)
134 zserver: $(ZSERVER)
135 tstflock: $(TSTFLOCK)
136 dll: $(DLL) 
137
138 # External libs and modules (enabled or disabled)
139
140 !if $(HAVE_EXPAT)
141 EXPAT_DEF= /D HAVE_EXPAT_H=1 /I"$(EXPAT_DIR)\source\lib"
142 EXPAT_LIB= "$(EXPAT_DIR)\bin\libexpat.lib"
143 EXPAT_DLL_SOURCE= "$(EXPAT_DIR)\bin\libexpat.dll"
144 EXPAT_DLL_TARGET= "$(BINDIR)\libexpat.dll"
145 expat: $(EXPAT_DLL_TARGET)
146
147 $(EXPAT_DLL_TARGET) : $(EXPAT_DLL_SOURCE)
148         copy $(EXPAT_DLL_SOURCE) $(EXPAT_DLL_TARGET)
149 !else
150 EXPAT_DEF= /D HAVE_EXPAT_H=0
151 EXPAT_LIB=
152 EXPAT_DLL_SOURCE=
153 EXPAT_DLL_TARGET=
154 expat:
155 !endif
156
157 !if $(HAVE_ICONV)
158 ICONV_DEF= /D HAVE_ICONV_H=1 /I"$(ICONV_DIR)\include"
159 ICONV_LIB= $(ICONV_DIR)\lib\iconv.lib
160 iconv: $(BINDIR)\iconv.dll
161
162 $(BINDIR)\iconv.dll:
163         copy "$(ICONV_DIR)\bin\iconv.dll" $(BINDIR)
164 !else
165 ICONV_DEF= /D HAVE_ICONV_H=0
166 ICONV_LIB=
167 iconv:
168 !endif
169
170 !if $(HAVE_LIBXML2)
171 LIBXML2_LIB="$(LIBXML2_DIR)\lib\libxml2.lib"
172 LIBXML2_DEF=/DYAZ_HAVE_XML2=1 /D HAVE_XML2=1 /I"$(LIBXML2_DIR)\include"
173 libxml2: $(BINDIR)\libxml2.dll $(BINDIR)\zlib1.dll
174
175 $(BINDIR)\libxml2.dll:
176   copy "$(LIBXML2_DIR)\bin\libxml2.dll" $(BINDIR)
177
178 $(BINDIR)\zlib1.dll:
179   copy "$(ZLIB_DIR)\bin\zlib1.dll" $(BINDIR)
180
181 !else
182 LIBXML2_LIB=
183 LIBXML2_DEF=/D HAVE_XML2=0
184 libxml2: 
185
186 !endif
187
188 !if $(HAVE_LIBXSLT)
189 LIBXSLT_LIB="$(LIBXSLT_DIR)\lib\libxslt.lib"
190 LIBXSLT_DEF=/D HAVE_XSLT=1 /I"$(LIBXSLT_DIR)\include"
191 libxslt: $(BINDIR)\libxslt.dll 
192
193 $(BINDIR)\libxslt.dll:
194   copy "$(LIBXSLT_DIR)\bin\libxslt.dll" $(BINDIR)
195
196 !else
197 LIBXSLT_LIB=
198 LIBXSLT_DEF=/D HAVE_XSLT=0
199 libxslt: 
200
201 !endif
202
203 !if $(HAVE_ICU)
204 ICU_DEF= /DYAZ_HAVE_ICU=1  /I"$(ICU_DIR)\include"
205 ICU_LIB= $(ICU_DIR)\lib\icudt.lib $(ICU_DIR)\lib\icuin.lib $(ICU_DIR)\lib\icuuc.lib
206 icu: $(BINDIR)\icudt40.dll $(BINDIR)\icuin40.dll $(BINDIR)\icuuc40.dll
207
208 $(BINDIR)\icudt40.dll:
209           copy "$(ICU_DIR)\bin\icudt40.dll" $(BINDIR)
210 $(BINDIR)\icuin40.dll:
211           copy "$(ICU_DIR)\bin\icuin40.dll" $(BINDIR)
212 $(BINDIR)\icuuc40.dll:
213           copy "$(ICU_DIR)\bin\icuuc40.dll" $(BINDIR)
214 !else
215 ICU_DEF=  /DYAZ_HAVE_ICU=0
216 ICU_LIB=
217 icu:
218 !endif
219
220 !if $(HAVE_LIBXSLT)
221 MOD_ALVIS_OBJS= $(OBJDIR)\mod_alvis.obj
222 MOD_ALVIS_CFLAGS=/DIDZEBRA_STATIC_ALVIS=1
223
224 MOD_DOM_OBJS= $(OBJDIR)\mod_dom.obj
225 MOD_DOM_CFLAGS=/DIDZEBRA_STATIC_DOM=1
226 !else
227 MOD_ALVIS_OBJS=
228 MOD_ALVIS_CFLAGS=
229
230 MOD_DOM_OBJS=
231 MOD_DOM_CFLAGS=
232 !endif
233
234 ### C and CPP compiler  (the same thing)
235 # Note: $(CPP) has already been defined in the environment
236 # (if you set things up right!)
237
238 COMMON_C_OPTIONS=          \
239   /nologo /W3 /EHsc /FD /c \
240   /D "WIN32"               \
241   /D"_CONSOLE" /D"_MBCS"   \
242   /DYAZ_USE_NEW_LOG=1      \
243   /D"_CRT_SECURE_NO_DEPRECATE" \
244   /D"_CRT_NONSTDC_NO_DEPRECATE" \
245   $(ICONV_DEF)             \
246   $(EXPAT_DEF)             \
247   $(LIBXML2_DEF)           \
248   $(LIBXSLT_DEF)           \
249   $(ICU_DEF)               \
250   /FR"$(OBJDIR)\\"         \
251   /Fo"$(OBJDIR)\\"         \
252   /Fd"$(OBJDIR)\\"         \
253   /DDEFAULT_PROFILE_PATH=0 \
254   /DDEFAULT_MODULE_PATH=0  \
255   /DIDZEBRA_STATIC_GRS_SGML=1 \
256   /DIDZEBRA_STATIC_TEXT=1  \
257   /DIDZEBRA_STATIC_GRS_XML=1 \
258   /DIDZEBRA_STATIC_GRS_REGX=1 \
259   /DIDZEBRA_STATIC_GRS_MARC=1 \
260   /DIDZEBRA_STATIC_GRS_DANBIB=1 \
261   $(MOD_ALVIS_CFLAGS) \
262   $(MOD_DOM_CFLAGS) \
263   /DIDZEBRA_STATIC_SAFARI=1 \
264   $(BZIP2DEF)
265
266 COMMON_C_INCLUDES= \
267   /I"$(SRCDIR)\include" \
268   /I"$(YAZDIR)\include" \
269   $(BZIP2INCLUDE)
270
271 DEBUG_C_OPTIONS=  \
272   /D "_DEBUG"      \
273   /MDd  /Od /YX /Zi /Gm
274
275 RELEASE_C_OPTIONS=  \
276   /D "NDEBUG"        \
277   /MD /O2
278
279 # /W3  = warning level
280 # /GX  = Enable exception handling
281 # /FD  = Generate file dependencies (what ever they are)
282 # /c   = compile without linking
283 # /FR  = Generate browse info (.sbr file that gets combined into .bsc)
284 # /Fo  = object file name (or at least path)
285 # /Fd  = debug database name (or path)
286 # /MD  = Runtime library: Multithread DLL
287 # /MDd = Runtime library: Multithread DLL (debug)
288 # /Od  = Disable optimising (debug)
289 # /O2  = Optimize for speed
290 # /YX  = Automatic use of precomipled headers
291 # /Gm  = Minimal rebuild (some cpp class stuff)
292 # /Zi  = Program database for debuggers
293 # /ZI  = Pgm database with special "edit&continue" stuff - not available in C5
294
295 ### Linker options
296 LINK=link.exe
297
298 LINK_LIBS= kernel32.lib user32.lib   gdi32.lib   winspool.lib \
299            comdlg32.lib advapi32.lib shell32.lib ole32.lib    \
300            oleaut32.lib uuid.lib     odbc32.lib  odbccp32.lib \
301            wsock32.lib  advapi32.lib \
302            $(ICONV_LIB) $(EXPAT_LIB) $(LIBXML2_LIB) $(LIBXSLT_LIB) $(ICU_LIB)
303
304 COMMON_LNK_OPTIONS= /nologo /machine:i386 /incremental:no
305
306 DEBUG_LNK_OPTIONS= /debug 
307
308 RELEASE_LNK_OPTIONS= 
309
310 ZEBRALIB_LINK_OPTIONS= -lib 
311
312 DLL_LINK_OPTIONS= /dll  
313
314 CLIENT_LINK_OPTIONS= /subsystem:console  
315
316 # Final opt variables
317 !if $(DEBUG)
318 COPT=   $(COMMON_C_OPTIONS)   $(DEBUG_C_OPTIONS)     $(COMMON_C_INCLUDES)
319 MTLOPT= $(COMMON_MTL_OPTIONS) $(DEBUG_MTL_OPTIONS)
320 RCOPT=  $(COMMON_RC_OPTIONS)  $(DEBUG_RC_OPTIONS)
321 LNKOPT= $(COMMON_LNK_OPTIONS) $(DEBUG_LNK_OPTIONS)   $(LNK_LIBS)
322
323 !else
324 COPT=   $(COMMON_C_OPTIONS)   $(RELEASE_C_OPTIONS)   $(COMMON_C_INCLUDES) 
325 MTLOPT= $(COMMON_MTL_OPTIONS) $(RELEASE_MTL_OPTIONS)
326 RCOPT=  $(COMMON_RC_OPTIONS)  $(RELEASE_RC_OPTIONS)
327 LNKOPT= $(COMMON_LNK_OPTIONS) $(RELEASE_LNK_OPTIONS) $(LNK_LIBS)
328 !endif
329
330 LINK_PROGRAM= $(LINK) \
331                 $(LNKOPT) \
332                 $(CLIENT_LINK_OPTIONS) \
333                 $(IMPLIB) \
334                 $(YAZLIB) \
335                 $(BZIP2LIB) \
336                 $(LINK_LIBS)
337
338
339 # Generated sources
340 generate: $(INCLDIR)\idzebra\version.h
341
342 $(INCLDIR)\idzebra\version.h:
343         @cd $(ROOTDIR)\util
344         $(TCL) mk_version.tcl $(ROOTDIR)/configure.ac $(INCLDIR)\idzebra\version.h
345
346 # Source and object modules
347 # Note: Ordinary source files are not specified here at 
348 # all, make finds them in suitable dirs. The object modules
349 # need to be specified, though
350
351 ZSERVER_OBJS= \
352         $(OBJDIR)\zebrasrv.obj 
353
354 ZEBRAIDX_OBJS= \
355         $(OBJDIR)\zebraidx.obj 
356 TSTFLOCK_OBJS= \
357         $(OBJDIR)\tstflock.obj
358
359 ZEBRALIB_OBJS= \
360         $(MOD_ALVIS_OBJS) \
361         $(MOD_DOM_OBJS) \
362         $(OBJDIR)\atoi_zn.obj \
363         $(OBJDIR)\attribute.obj \
364         $(OBJDIR)\attrfind.obj \
365         $(OBJDIR)\bfile.obj \
366         $(OBJDIR)\bset.obj \
367         $(OBJDIR)\cfile.obj \
368         $(OBJDIR)\check_res.obj \
369         $(OBJDIR)\charmap.obj \
370         $(OBJDIR)\close.obj \
371         $(OBJDIR)\commit.obj \
372         $(OBJDIR)\compact.obj \
373         $(OBJDIR)\d1_absyn.obj \
374         $(OBJDIR)\d1_attset.obj \
375         $(OBJDIR)\d1_doespec.obj \
376         $(OBJDIR)\d1_espec.obj \
377         $(OBJDIR)\d1_expout.obj \
378         $(OBJDIR)\d1_grs.obj \
379         $(OBJDIR)\d1_handle.obj \
380         $(OBJDIR)\d1_if.obj \
381         $(OBJDIR)\d1_map.obj \
382         $(OBJDIR)\d1_marc.obj \
383         $(OBJDIR)\d1_prtree.obj \
384         $(OBJDIR)\d1_read.obj \
385         $(OBJDIR)\d1_soif.obj \
386         $(OBJDIR)\d1_sumout.obj \
387         $(OBJDIR)\d1_sutrs.obj \
388         $(OBJDIR)\d1_tagset.obj \
389         $(OBJDIR)\d1_utils.obj \
390         $(OBJDIR)\d1_varset.obj \
391         $(OBJDIR)\d1_write.obj \
392         $(OBJDIR)\dclose.obj \
393         $(OBJDIR)\dcompact.obj \
394         $(OBJDIR)\delete.obj \
395         $(OBJDIR)\dfa.obj \
396         $(OBJDIR)\dir.obj \
397         $(OBJDIR)\dirent.obj \
398         $(OBJDIR)\dirs.obj \
399         $(OBJDIR)\dopen.obj \
400         $(OBJDIR)\drdwr.obj \
401         $(OBJDIR)\exit.obj \
402         $(OBJDIR)\extract.obj \
403         $(OBJDIR)\flock.obj \
404         $(OBJDIR)\imalloc.obj \
405         $(OBJDIR)\inline.obj \
406         $(OBJDIR)\insert.obj \
407         $(OBJDIR)\invstat.obj \
408         $(OBJDIR)\isamb.obj \
409         $(OBJDIR)\isamc.obj \
410         $(OBJDIR)\isams.obj \
411         $(OBJDIR)\isam_methods.obj \
412         $(OBJDIR)\it_key.obj \
413         $(OBJDIR)\kcontrol.obj \
414         $(OBJDIR)\key_block.obj \
415         $(OBJDIR)\kinput.obj \
416         $(OBJDIR)\limit.obj \
417         $(OBJDIR)\lookgrep.obj \
418         $(OBJDIR)\lookup.obj \
419         $(OBJDIR)\lookupec.obj \
420         $(OBJDIR)\marcomp.obj \
421         $(OBJDIR)\mod_grs_marc.obj \
422         $(OBJDIR)\merge.obj \
423         $(OBJDIR)\mfile.obj \
424         $(OBJDIR)\open.obj \
425         $(OBJDIR)\orddict.obj \
426         $(OBJDIR)\passwddb.obj \
427         $(OBJDIR)\rank1.obj \
428         $(OBJDIR)\ranksimilarity.obj \
429         $(OBJDIR)\rankstatic.obj \
430         $(OBJDIR)\recctrl.obj \
431         $(OBJDIR)\recgrs.obj \
432         $(OBJDIR)\records.obj \
433         $(OBJDIR)\recindex.obj \
434         $(OBJDIR)\reckeys.obj \
435         $(OBJDIR)\mod_text.obj \
436         $(OBJDIR)\mod_grs_regx.obj \
437         $(OBJDIR)\res.obj \
438         $(OBJDIR)\retrieve.obj \
439         $(OBJDIR)\rpnscan.obj \
440         $(OBJDIR)\rpnsearch.obj \
441         $(OBJDIR)\rsbetween.obj \
442         $(OBJDIR)\rsbool.obj \
443         $(OBJDIR)\rset.obj \
444         $(OBJDIR)\rset_isam.obj \
445         $(OBJDIR)\rsisamb.obj \
446         $(OBJDIR)\rsisamc.obj \
447         $(OBJDIR)\rsisams.obj \
448         $(OBJDIR)\rsmultiandor.obj \
449         $(OBJDIR)\rsnull.obj \
450         $(OBJDIR)\rsprox.obj \
451         $(OBJDIR)\rstemp.obj \
452         $(OBJDIR)\mod_safari.obj \
453         $(OBJDIR)\scan.obj \
454         $(OBJDIR)\set.obj \
455         $(OBJDIR)\mod_grs_sgml.obj \
456         $(OBJDIR)\snippet.obj \
457         $(OBJDIR)\sortidx.obj \
458         $(OBJDIR)\states.obj \
459         $(OBJDIR)\stream.obj \
460         $(OBJDIR)\strmap.obj \
461         $(OBJDIR)\su_codec.obj \
462         $(OBJDIR)\trunc.obj \
463         $(OBJDIR)\untrans.obj \
464         $(OBJDIR)\update_path.obj \
465         $(OBJDIR)\update_file.obj \
466         $(OBJDIR)\version.obj \
467         $(OBJDIR)\mod_grs_xml.obj \
468         $(OBJDIR)\xpath.obj \
469         $(OBJDIR)\zaptterm.obj \
470         $(OBJDIR)\zebra-lock.obj \
471         $(OBJDIR)\zebraapi.obj \
472         $(OBJDIR)\zebramap.obj \
473         $(OBJDIR)\zinfo.obj \
474         $(OBJDIR)\zint.obj \
475         $(OBJDIR)\zsets.obj
476
477 # Compiling 
478 # Note: This defines where to look for the necessary
479 # source files. Funny way of doing it, but it works.
480
481 {$(INDEXDIR)}.c{$(OBJDIR)}.obj:
482         $(CPP) $(COPT) $< 
483
484 {$(BFILEDIR)}.c{$(OBJDIR)}.obj:
485         $(CPP) $(COPT) $< 
486
487 {$(DFADIR)}.c{$(OBJDIR)}.obj:
488         $(CPP) $(COPT) $< 
489
490 {$(DICTDIR)}.c{$(OBJDIR)}.obj:
491         $(CPP) $(COPT) $< 
492
493 {$(ISAMSDIR)}.c{$(OBJDIR)}.obj:
494         $(CPP) $(COPT) $< 
495
496 {$(ISAMCDIR)}.c{$(OBJDIR)}.obj:
497         $(CPP) $(COPT) $< 
498
499 {$(ISAMBDIR)}.c{$(OBJDIR)}.obj:
500         $(CPP) $(COPT) $< 
501
502 {$(RSETDIR)}.c{$(OBJDIR)}.obj:
503         $(CPP) $(COPT) $< 
504
505 {$(UTILDIR)}.c{$(OBJDIR)}.obj:
506         $(CPP) $(COPT) $< 
507
508 {$(DATA1DIR)}.c{$(OBJDIR)}.obj:
509         $(CPP) $(COPT) $< 
510
511 # Linking
512
513 $(ZSERVER) : "$(BINDIR)" $(ZSERVER_OBJS) $(IMPLIB)
514         $(LINK_PROGRAM) \
515                 $(ZSERVER_OBJS) \
516                 /out:$(ZSERVER)
517
518 $(ZEBRAIDX) : "$(BINDIR)" $(ZEBRAIDX_OBJS) $(IMPLIB)
519         $(LINK_PROGRAM) \
520                 $(ZEBRAIDX_OBJS) \
521                 /out:$(ZEBRAIDX)
522
523 $(TSTFLOCK) : "$(BINDIR)" $(TSTFLOCK_OBJS) $(IMPLIB)
524         $(LINK_PROGRAM) \
525                 $(TSTFLOCK_OBJS) \
526                 /out:$(TSTFLOCK) 
527
528 # Resources
529 RES=$(OBJDIR)\zebra.res
530 RC=$(WINDIR)\zebra.rc
531
532 RSC=rc.exe
533 !if $(DEBUG)
534 RSOPT=/d_DEBUG
535 !else
536 RSOPT=/d_NDEBUG
537 !endif
538
539
540 $(RES): $(RC)
541         $(RSC) $(RSOPT) /I"../include" /I"$(YAZDIR)\include" /fo"$(RES)" $(RC)
542
543 $(DLL) $(IMPLIB): "$(BINDIR)" $(ZEBRALIB_OBJS) $(RES)
544         $(LINK) \
545                 $(LNKOPT) \
546                 $(LINK_LIBS) \
547                 $(DLL_LINK_OPTIONS) \
548                 $(ZEBRALIB_OBJS) \
549                 $(RES) \
550                 /out:$(DLL) \
551                 $(YAZLIB) \
552                 /implib:"$(IMPLIB)" \
553                 /map:"$(LIBDIR)\idzebra.map" \
554
555 # Other rules
556
557 clean:
558         -del $(OBJDIR)\*.obj
559         -del $(OBJDIR)\*.sbr
560         -del $(BINDIR)\*.exe
561         -del $(BINDIR)\*.dll
562         -del $(TMPDIR)\*.
563         -del $(LIBDIR)\*.lib
564
565 dirs: $(OBJDIR) $(WINDIR) $(LIBDIR) $(BINDIR) $(TMPDIR)
566
567 $(OBJDIR) $(WINDIR) $(LIBDIR) $(BINDIR) $(TMPDIR):
568         if not exist "$@/$(NUL)" mkdir "$@"
569
570 yaz: $(YAZ_DLL_TARGET)
571
572 $(YAZ_DLL_TARGET) : $(YAZ_DLL_SOURCE)
573 #       copy "$(YAZBINDIR)\*.dll.manifest" $(BINDIR)
574         copy "$(YAZBINDIR)\*.dll" $(BINDIR)
575
576