Updates regarding ASN-code generation (mostly).
[yaz-moved-to-github.git] / win / makefile
1 # makefile.mak - makefile for MS NMAKE 
2 # $Id: makefile,v 1.17 2000-10-06 12:01:12 adam Exp $
3 #
4 # Programmed by
5 #  HL: Heikki Levanto, Index Data
6 #
7 # Log at the end of the file
8 #
9 # Missing
10 # - Move MS-C's whatnots into win direcotry
11 # - The TCL script produces C and H files in the same dir as the 
12 #   ASN files. H's are copied to INCL, C's are left there.
13 #   They should be produced into OBJ...
14 #  
15 # Envoronment problems
16 # - You need to have the proper path and environment for VC set
17 #   up. There is a bat file VCVARS32.BAT that sets most of it up
18 #   for you. You can find this somewhere near DevStudio\VC\BIN
19 # - RegSvr32 must also be along the path, often in WINDOWS\SYSTEM
20 # - TCL has to be available too, if compiling for NEW_Z3950
21
22 ###########################################################
23 ############### Parameters 
24 ###########################################################
25
26 DEBUG=1   # 0 for release, 1 for debug
27
28 NEW_Z3950=1  # 0= use old asn files
29              # 1= generate files from *.asn (needs tcl)
30
31
32 default: all
33
34 all: dirs proto_h dll client ztest 
35
36 generate: generated_files
37
38 ###########################################################
39 ############### Directories
40 ###########################################################
41 # The current directory is supposed to be something like
42 # ..../Yaz/Win, everything is relative to that
43 ROOTDIR=..   # The home of Yaz
44
45 INCLDIR=$(ROOTDIR)\include  # our includes
46 LIBDIR=$(ROOTDIR)\lib       # We produce .lib, .exp etc there
47 BINDIR=$(ROOTDIR)\bin       # We produce exes and dlls there
48 WINDIR=$(ROOTDIR)\win       # all these Win make things
49 OBJDIR=$(WINDIR)\obj        # where we store intermediate files
50 UNIXDIR=$(ROOTDIR)\unix     # corresponding unix things
51 SRCDIR=$(ROOTDIR)           # for the case we move them under src
52
53 ASNDIR=$(SRCDIR)\ASN
54 COMSTACKDIR=$(SRCDIR)\COMSTACK
55 ODRDIR=$(SRCDIR)\ODR
56 UTILDIR=$(SRCDIR)\UTIL
57 ZUTILDIR=$(SRCDIR)\ZUTIL
58 RETDIR=$(SRCDIR)\RETRIEVAL
59 Z3950DIR=$(SRCDIR)\Z39.50
60 ILLDIR=$(SRCDIR)\ill
61
62 CLIENTDIR=$(SRCDIR)\CLIENT
63 SERVERDIR=$(SRCDIR)\SERVER
64 ZTESTDIR=$(SRCDIR)\ZTEST
65
66 TMPDIR=$(ROOTDIR)\win\tmp
67 TMP=$(TMPDIR)
68
69 ###########################################################
70 ############### Targets - what to make
71 ###########################################################
72
73
74 DLL=$(BINDIR)\Yaz.dll
75 IMPLIB=$(LIBDIR)\Yaz.lib
76
77 CLIENT=$(BINDIR)\yaz-client.exe
78 ZTEST=$(BINDIR)\yaz-ztest.exe
79 PROTOH=$(INCLDIR)\yaz\proto.h
80
81 # shortcut names defined here
82 dll : $(DLL) 
83 client: $(CLIENT)
84 ztest: $(ZTEST)
85 proto_h: $(PROTOH)
86
87 ###########################################################
88 ############### Compiler and linker options 
89 ###########################################################
90
91
92 ### C and CPP compiler  (the same thing)
93 # Note: $(CPP) has already been defined in the environment
94 # (if you set things up right!)
95
96 COMMON_C_OPTIONS=          \
97   /nologo /W3 /GX /FD /c   \
98   /D "WIN32" /D "_WINDOWS" \
99   /FR"$(OBJDIR)\\"         \
100   /Fo"$(OBJDIR)\\"         \
101   /Fd"$(OBJDIR)\\" 
102
103 COMMON_C_INCLUDES= \
104   /I"$(SRCDIR)\include"
105
106 DEBUG_C_OPTIONS=  \
107   /D "_DEBUG"      \
108   /MDd  /Od /YX /Zi /Gm
109
110 RELEASE_C_OPTIONS=  \
111   /D "NDEBUG"        \
112   /MD /O2
113
114 # /W3  = warning level
115 # /GX  = Enable exception handling
116 # /FD  = Generate file dependencies (what ever they are)
117 # /c   = compile without linking
118 # /FR  = Generate browse info (.sbr file that gets combined into .bsc)
119 # /Fo  = object file name (or at least path)
120 # /Fd  = debug database name (or path)
121 # /MD  = Runtime library: Multithread DLL
122 # /MDd = Runtime library: Multithread DLL (debug)
123 # /Od  = Disable optimising (debug)
124 # /O2  = Optimize for speed
125 # /YX  = Automatic use of precomipled headers
126 # /Gm  = Minimal rebuild (some cpp class stuff)
127 # /Zi  = Program database for debuggers
128 # /ZI  = Pgm database with special "edit&continue" stuff - not available in C5
129
130
131 ### Linker options
132 LINK=link.exe
133
134 LINK_LIBS= kernel32.lib user32.lib   gdi32.lib   winspool.lib \
135            comdlg32.lib advapi32.lib shell32.lib ole32.lib    \
136            oleaut32.lib uuid.lib     odbc32.lib  odbccp32.lib \
137            wsock32.lib  advapi32.lib
138
139 COMMON_LNK_OPTIONS= /nologo \
140                     /subsystem:windows \
141                     /machine:i386 \
142                           /incremental:no
143
144 DEBUG_LNK_OPTIONS= /debug 
145
146 RELEASE_LNK_OPTIONS=  /pdb:none
147
148 DLL_LINK_OPTIONS= /dll  
149 CLIENT_LINK_OPTIONS = /subsystem:console  
150 SERVER_LINK_OPTIONS = -lib 
151 ZTEST_LINK_OPTIONS = /subsystem:console  
152
153 # TCL
154 TCL="C:\Program Files\Tcl\bin\tclsh83.exe"
155 HAVE_TCL=1
156
157 COMMON_TCL_OPTIONS= ..\util\yaz-comp -I$(INCLDIR) -i yaz
158
159 # Final opt variables
160 !if $(DEBUG)
161 COPT=   $(COMMON_C_OPTIONS)   $(DEBUG_C_OPTIONS)     $(COMMON_C_INCLUDES)
162 MTLOPT= $(COMMON_MTL_OPTIONS) $(DEBUG_MTL_OPTIONS)
163 RCOPT=  $(COMMON_RC_OPTIONS)  $(DEBUG_RC_OPTIONS)
164 LNKOPT= $(COMMON_LNK_OPTIONS) $(DEBUG_LNK_OPTIONS)   $(LNK_LIBS)
165 TCLOPT= $(COMMON_TCL_OPTIONS)
166
167 !else
168 COPT=   $(COMMON_C_OPTIONS)   $(RELEASE_C_OPTIONS)   $(COMMON_C_INCLUDES) 
169 MTLOPT= $(COMMON_MTL_OPTIONS) $(RELEASE_MTL_OPTIONS)
170 RCOPT=  $(COMMON_RC_OPTIONS)  $(RELEASE_RC_OPTIONS)
171 LNKOPT= $(COMMON_LNK_OPTIONS) $(RELEASE_LNK_OPTIONS) $(LNK_LIBS)
172 TCLOPT= $(COMMON_TCL_OPTIONS)
173 !endif
174
175
176
177 ###########################################################
178 ###############  Source and object modules
179 ###########################################################
180
181 # Note: Ordinary source files are not specified here at 
182 # all, make finds them in suitable dirs. The object modules
183 # need to be specified, though
184
185 YAZ_CLIENT_OBJS= \
186    $(OBJDIR)\client.obj \
187    $(OBJDIR)\admin.obj
188
189 YAZ_SERVER_OBJS= \
190         "$(OBJDIR)\eventl.obj" \
191         "$(OBJDIR)\requestq.obj" \
192         "$(OBJDIR)\service.obj" \
193         "$(OBJDIR)\seshigh.obj" \
194         "$(OBJDIR)\statserv.obj" \
195         "$(OBJDIR)\tcpdchk.obj" 
196
197 ZTEST_OBJS= \
198         "$(OBJDIR)\read-grs.obj" \
199         "$(OBJDIR)\ztest.obj" 
200
201 YAZ_ASN_OBJS= \
202    $(OBJDIR)\proto.obj \
203    $(OBJDIR)\prt-acc.obj \
204    $(OBJDIR)\prt-add.obj \
205    $(OBJDIR)\prt-arc.obj \
206    $(OBJDIR)\prt-dat.obj \
207    $(OBJDIR)\prt-dia.obj \
208    $(OBJDIR)\prt-esp.obj \
209    $(OBJDIR)\prt-exd.obj \
210    $(OBJDIR)\prt-exp.obj \
211    $(OBJDIR)\prt-grs.obj \
212    $(OBJDIR)\prt-rsc.obj \
213    $(OBJDIR)\prt-univ.obj 
214
215 YAZ_COMSTACK_OBJS= \
216    $(OBJDIR)\comstack.obj \
217    $(OBJDIR)\tcpip.obj \
218    $(OBJDIR)\waislen.obj 
219
220 YAZ_ODR_OBJS= \
221    $(OBJDIR)\ber_any.obj \
222    $(OBJDIR)\ber_bit.obj \
223    $(OBJDIR)\ber_bool.obj \
224    $(OBJDIR)\ber_int.obj \
225    $(OBJDIR)\ber_len.obj \
226    $(OBJDIR)\ber_null.obj \
227    $(OBJDIR)\ber_oct.obj \
228    $(OBJDIR)\ber_oid.obj \
229    $(OBJDIR)\ber_tag.obj \
230    $(OBJDIR)\dumpber.obj \
231    $(OBJDIR)\odr.obj \
232    $(OBJDIR)\odr_any.obj \
233    $(OBJDIR)\odr_bit.obj \
234    $(OBJDIR)\odr_bool.obj \
235    $(OBJDIR)\odr_choice.obj \
236    $(OBJDIR)\odr_cons.obj \
237    $(OBJDIR)\odr_enum.obj \
238    $(OBJDIR)\odr_int.obj \
239    $(OBJDIR)\odr_mem.obj \
240    $(OBJDIR)\odr_null.obj \
241    $(OBJDIR)\odr_oct.obj \
242    $(OBJDIR)\odr_oid.obj \
243    $(OBJDIR)\odr_seq.obj \
244    $(OBJDIR)\odr_tag.obj \
245    $(OBJDIR)\odr_use.obj \
246    $(OBJDIR)\odr_util.obj 
247
248 YAZ_UTIL_OBJS= \
249    $(OBJDIR)\atoin.obj \
250    $(OBJDIR)\log.obj \
251    $(OBJDIR)\marcdisp.obj \
252    $(OBJDIR)\nmem.obj \
253    $(OBJDIR)\nmemsdup.obj \
254    $(OBJDIR)\oid.obj \
255    $(OBJDIR)\options.obj \
256    $(OBJDIR)\readconf.obj \
257    $(OBJDIR)\tpath.obj \
258    $(OBJDIR)\wrbuf.obj \
259    $(OBJDIR)\xmalloc.obj \
260    $(OBJDIR)\matchstr.obj 
261
262 YAZ_ZUTIL_OBJS= \
263    $(OBJDIR)\diagbib1.obj \
264    $(OBJDIR)\zget.obj \
265    $(OBJDIR)\prt-ext.obj \
266    $(OBJDIR)\logrpn.obj \
267    $(OBJDIR)\pquery.obj \
268    $(OBJDIR)\yaz-ccl.obj \
269    $(OBJDIR)\otherinfo.obj
270
271 YAZ_RET_OBJS= \
272    $(OBJDIR)\d1_absyn.obj\
273    $(OBJDIR)\d1_attset.obj\
274    $(OBJDIR)\d1_doespec.obj\
275    $(OBJDIR)\d1_espec.obj\
276    $(OBJDIR)\d1_expout.obj\
277    $(OBJDIR)\d1_grs.obj\
278    $(OBJDIR)\d1_handle.obj\
279    $(OBJDIR)\d1_map.obj\
280    $(OBJDIR)\d1_marc.obj\
281    $(OBJDIR)\d1_prtree.obj\
282    $(OBJDIR)\d1_read.obj\
283    $(OBJDIR)\d1_soif.obj\
284    $(OBJDIR)\d1_sumout.obj\
285    $(OBJDIR)\d1_sutrs.obj\
286    $(OBJDIR)\d1_tagset.obj\
287    $(OBJDIR)\d1_varset.obj\
288    $(OBJDIR)\d1_write.obj\
289    $(OBJDIR)\d1_if.obj
290
291 Z3950_OBJS= \
292    $(OBJDIR)\z-date.obj\
293    $(OBJDIR)\z-univ.obj\
294    $(OBJDIR)\zes-update.obj\
295    $(OBJDIR)\zes-admin.obj \
296    $(OBJDIR)\z-accdes1.obj \
297    $(OBJDIR)\z-accform1.obj \
298    $(OBJDIR)\z-acckrb1.obj \
299    $(OBJDIR)\z-core.obj \
300    $(OBJDIR)\z-diag1.obj \
301    $(OBJDIR)\z-espec1.obj \
302    $(OBJDIR)\z-estask.obj \
303    $(OBJDIR)\z-exp.obj \
304    $(OBJDIR)\z-grs.obj \
305    $(OBJDIR)\z-opac.obj \
306    $(OBJDIR)\z-uifr1.obj \
307    $(OBJDIR)\z-rrf1.obj \
308    $(OBJDIR)\z-rrf2.obj \
309    $(OBJDIR)\z-sum.obj \
310    $(OBJDIR)\z-sutrs.obj \
311    $(OBJDIR)\zes-expi.obj \
312    $(OBJDIR)\zes-exps.obj \
313    $(OBJDIR)\zes-order.obj \
314    $(OBJDIR)\zes-pquery.obj \
315    $(OBJDIR)\zes-psched.obj \
316    $(OBJDIR)\zes-pset.obj \
317    $(OBJDIR)\zes-update0.obj
318
319 ILL_OBJS= \
320    $(OBJDIR)\ill-get.obj\
321    $(OBJDIR)\ill-core.obj\
322    $(OBJDIR)\item-req.obj
323
324 COMMON_YAZ_OBJS= \
325    $(YAZ_UTIL_OBJS) \
326    $(YAZ_ODR_OBJS) \
327    $(YAZ_COMSTACK_OBJS) \
328    $(YAZ_ZUTIL_OBJS) \
329    $(YAZ_RET_OBJS) \
330    $(YAZ_SERVER_OBJS)
331
332 !if $(NEW_Z3950)
333 YAZ_OBJS= \
334         $(COMMON_YAZ_OBJS) \
335         $(Z3950_OBJS) \
336         $(ILL_OBJS) 
337 !else
338 YAZ_OBJS= \
339         $(COMMON_YAZ_OBJS) \
340         $(YAZ_ASN_OBJS)
341 !endif
342
343 DLL_OBJS= $(YAZ_OBJS)
344
345 ALL_OBJS= \
346         $(YAZ_OBJS) \
347         $(YAZ_CLIENT_OBJS) \
348         $(ZTEST_OBJS)
349
350
351 ##########################################################
352 ############## proto.h
353 ##########################################################
354
355 !if $(NEW_Z3950)
356 $(PROTOH): makefile $(INCLDIR)\yaz\z-proto.h
357         type $(INCLDIR)\yaz\z-proto.h > $(PROTOH)
358 !else   
359 $(PROTOH): makefile $(INCLDIR)\yaz\prt-proto.h 
360         copy $(ASNDIR)\*.h $(INCLDIR)\yaz
361         type $(INCLDIR)\yaz\prt-proto.h > $(PROTOH)
362 !endif
363
364
365 ###########################################################
366 ############### Generated C and H files
367 #####
368 ######################################################
369
370
371 Z3950_C_DIR=$(Z3950DIR)   
372 ILL_C_DIR=$(ILLDIR)
373 #!!! Should be moved to OBJ, but that requires too much trickery
374
375 # Files generated from datetime.asn
376 DATETIME_H_FILES = $(INCLDIR)\yaz\z-date.h
377 DATETIME_C_FILES = $(Z3950_C_DIR)\z-date.c
378
379 # Files generated from univres.asn
380 UNIVRES_H_FILES = $(INCLDIR)\yaz\z-univ.h
381 UNIVRES_C_FILES = $(Z3950_C_DIR)\z-univ.c
382
383 # Files generated from esupdate.asn
384 ESUPDATE_H_FILES = $(INCLDIR)\yaz\zes-update.h
385 ESUPDATE_C_FILES = $(Z3950_C_DIR)\zes-update.c
386
387 # Files generated from esadmin.asn
388 ESADMIN_H_FILES = $(INCLDIR)\yaz\zes-admin.h
389 ESADMIN_C_FILES = $(Z3950_C_DIR)\zes-admin.c
390
391 # Files created from z3950v3.asn
392 Z3950V3_H_FILES= \
393    $(INCLDIR)\yaz\z-accdes1.h \
394    $(INCLDIR)\yaz\z-core.h
395
396 Z3950V3_C_FILES= \
397    $(Z3950_C_DIR)\z-accdes1.c \
398    $(Z3950_C_DIR)\z-accform1.c \
399    $(Z3950_C_DIR)\z-acckrb1.c \
400    $(Z3950_C_DIR)\z-core.c \
401    $(Z3950_C_DIR)\z-diag1.c \
402    $(Z3950_C_DIR)\z-espec1.c \
403    $(Z3950_C_DIR)\z-estask.c \
404    $(Z3950_C_DIR)\z-exp.c \
405    $(Z3950_C_DIR)\z-grs.c \
406    $(Z3950_C_DIR)\z-opac.c \
407    $(Z3950_C_DIR)\z-uifr1.c \
408    $(Z3950_C_DIR)\z-rrf1.c \
409    $(Z3950_C_DIR)\z-rrf2.c \
410    $(Z3950_C_DIR)\z-sum.c \
411    $(Z3950_C_DIR)\z-sutrs.c \
412    $(Z3950_C_DIR)\zes-expi.c \
413    $(Z3950_C_DIR)\zes-exps.c \
414    $(Z3950_C_DIR)\zes-order.c \
415    $(Z3950_C_DIR)\zes-pquery.c \
416    $(Z3950_C_DIR)\zes-psched.c \
417    $(Z3950_C_DIR)\zes-pset.c \
418    $(Z3950_C_DIR)\zes-update0.c
419
420 # Files generated from ill9702.asn
421 ILL_CORE_H_FILES= \
422    $(INCLDIR)\yaz\ill-core.h
423
424 ILL_CORE_C_FILES= \
425    $(ILL_C_DIR)\ill-core.c
426
427 # Files generated from itemreq.asn
428 ITEM_REQ_H_FILES= \
429    $(INCLDIR)\yaz\item-req.h
430
431 ITEM_REQ_C_FILES= \
432    $(ILL_C_DIR)\item-req.c
433
434 # Combined..
435 DATETIME_FILES = $(DATETIME_H_FILES) $(DATETIME_C_FILES)
436 UNIVRES_FILES = $(UNIVRES_H_FILES) $(UNIVRES_C_FILES)
437 ESUPDATE_FILES = $(ESUPDATE_H_FILES) $(ESUPDATE_C_FILES)
438 ESADMIN_FILES = $(ESADMIN_H_FILES) $(ESADMIN_C_FILES)
439 Z3950V3_FILES= $(Z3950V3_C_FILES) $(Z3950V3_H_FILES)
440 ILL_CORE_FILES= $(ILL_CORE_C_FILES) $(ILL_CORE_H_FILES)
441 ITEM_REQ_FILES= $(ITEM_REQ_C_FILES) $(ITEM_REQ_H_FILES)
442
443 GENERATED_C_FILES= \
444    $(Z3950V3_C_FILES)  \
445    $(ESUPDATE_C_FILES) \
446    $(UNIVRES_C_FILES)  \
447    $(DATETIME_C_FILES) \
448    $(ESADMIN_C_FILES)
449
450 GENERATED_H_FILES= \
451    $(Z3950V3_H_FILES)  \
452    $(ESUPDATE_H_FILES) \
453    $(UNIVRES_H_FILES)  \
454    $(DATETIME_H_FILES) \
455    $(ESADMIN_H_FILES)
456
457 generated_files: \
458         $(GENERATED_H_FILES) \
459         $(GENERATED_C_FILES) \
460         $(PROTOH)
461
462
463 ###########################################################
464 ############### Compiling 
465 ###########################################################
466
467 # Note: This defines where to look for the necessary
468 # source files. Funny way of doing it, but it works.
469
470 # DLL sources
471 {$(SRCDIR)}.cpp{$(OBJDIR)}.obj:
472         @$(CPP) $(COPT) $<
473
474 # Yaz client
475 {$(CLIENTDIR)}.c{$(OBJDIR)}.obj:
476         @$(CPP) $(COPT) $< /D"_CONSOLE"
477
478 # Ztest
479 {$(ZTESTDIR)}.c{$(OBJDIR)}.obj:
480         @$(CPP) $(COPT) $< /D"_CONSOLE"
481
482 # Server
483 {$(SERVERDIR)}.c{$(OBJDIR)}.obj:
484         @$(CPP) $(COPT) $< 
485
486 # Various YAZ source directories
487 {$(ASNDIR)}.c{$(OBJDIR)}.obj:
488         @$(CPP) $(COPT) $< 
489
490 {$(COMSTACKDIR)}.c{$(OBJDIR)}.obj:
491         @$(CPP) $(COPT) $< 
492
493 {$(ODRDIR)}.c{$(OBJDIR)}.obj:
494         @$(CPP) $(COPT) $< 
495
496 {$(UTILDIR)}.c{$(OBJDIR)}.obj:
497         @$(CPP) $(COPT) $< 
498
499 {$(ZUTILDIR)}.c{$(OBJDIR)}.obj:
500         @$(CPP) $(COPT) $< 
501
502 {$(RETDIR)}.c{$(OBJDIR)}.obj:
503         @$(CPP) $(COPT) $<
504
505 {$(Z3950_C_DIR)}.c{$(OBJDIR)}.obj:
506         @$(CPP) $(COPT) $< 
507
508 {$(ILL_C_DIR)}.c{$(OBJDIR)}.obj:
509         @$(CPP) $(COPT) $< 
510
511 ############### ASN-generated files
512
513 !if $(HAVE_TCL)
514
515 $(Z3950V3_FILES): $(Z3950DIR)\z3950v3.asn
516         @cd $(Z3950DIR)
517         $(TCL) $(TCLOPT) -d z.tcl z3950v3.asn
518         @cd $(WINDIR)
519
520 $(DATETIME_FILES): $(Z3950DIR)\datetime.asn
521         @cd $(Z3950DIR)
522         $(TCL) $(TCLOPT) -d z.tcl datetime.asn
523         @cd $(WINDIR)
524
525 $(UNIVRES_FILES): $(Z3950DIR)\univres.asn
526         @cd $(Z3950DIR)
527         $(TCL) $(TCLOPT) -d z.tcl univres.asn
528         @cd $(WINDIR)
529
530 $(ESUPDATE_FILES): $(Z3950DIR)\esupdate.asn
531         @cd $(Z3950DIR)
532         $(TCL) $(TCLOPT) -d z.tcl esupdate.asn
533         @cd $(WINDIR)
534
535 $(ESADMIN_FILES): $(Z3950DIR)\esadmin.asn
536         @cd $(Z3950DIR)
537         $(TCL) $(TCLOPT) -d z.tcl esadmin.asn
538         @cd $(WINDIR)
539
540 $(ILL_CORE_FILES): $(ILLDIR)\ill9702.asn
541         @cd $(ILLDIR)
542         $(TCL) $(TCLOPT) -d ill.tcl ill9702.asn
543         @cd $(WINDIR)
544
545 $(ITEM_REQ_FILES): $(ILLDIR)\item-req.asn
546         @cd $(ILLDIR)
547         $(TCL) $(TCLOPT) -d ill.tcl item-req.asn
548         @cd $(WINDIR)
549
550 !endif
551
552 ###########################################################
553 ############### Linking
554 ###########################################################
555
556 $(DLL) $(IMPLIB): "$(BINDIR)" $(DLL_OBJS) 
557         @echo Linking the dll  $(DLL)
558         $(LINK) @<<
559                 $(LNKOPT) 
560                 $(LINK_LIBS) 
561                 $(DLL_LINK_OPTIONS)
562                 $(DLL_OBJS) 
563                 /out:$(DLL) 
564                 /implib:"$(LIBDIR)\yaz.lib"
565                 /pdb:"$(LIBDIR)\yaz.pdb" 
566                 /map:"$(LIBDIR)\yaz.map"  
567 <<
568
569 $(CLIENT) : "$(BINDIR)" $(YAZ_CLIENT_OBJS) 
570         @echo Linking the client  $(CLIENT)
571         $(LINK) @<<
572         $(LNKOPT) 
573                 $(CLIENT_LINK_OPTIONS)
574                 $(LINK_LIBS) 
575                 $(IMPLIB)
576                 $(YAZ_CLIENT_OBJS)
577                 /pdb:"$(LIBDIR)\yaz-client.pdb"
578                 /map:"$(LIBDIR)\yaz-client.map"
579                 /out:$(CLIENT)
580 <<
581
582 $(ZTEST) : "$(BINDIR)" $(ZTEST_OBJS) $(DLL)
583         @echo Linking the ztest  $(ZTEST)
584         $(LINK) @<<
585         $(LNKOPT) 
586                 $(ZTEST_LINK_OPTIONS)
587                 $(LINK_LIBS) 
588                 shell32.lib
589                 $(IMPLIB)
590                 $(ZTEST_OBJS) 
591                 /implib:"$(LIBDIR)\yaz-ztest.lib"
592                 /pdb:"$(LIBDIR)\yaz-ztest.pdb"
593                 /map:"$(LIBDIR)\yaz-ztest.map"
594                 /out:$(ZTEST) 
595 <<
596
597
598 # note that this links a lib, so it uses completely different options.
599
600 ###########################################################
601 ############### Special operations
602 ###########################################################
603
604
605 ############## clean
606 clean:
607         del $(DLL) 
608         del $(CLIENT)
609         del $(ZTEST)
610         del $(TMPDIR)\*.
611
612         del $(LIBDIR)\*.MAP
613
614         del $(LIBDIR)\*.LIB
615         del $(OBJDIR)\*.OBJ
616
617         del $(PROTOH)
618
619 realclean: clean
620         del $(Z3950_C_DIR)\*.c
621         del $(Z3950_C_DIR)\*.h
622         del $(INCLDIR)\yaz\z-accdes1.h
623         del $(INCLDIR)\yaz\z-core.h
624         del $(DATETIME_H_FILES)
625         del $(UNIVRES_H_FILES)
626         del $(ESUPDATE_H_FILES)
627
628 # Because DOS del will only accept one file name to delete,
629 # the _H_ files work only on sets that have just one file.
630 # Z3950_H_FILES had to be spelled out. One more point for MS!
631
632 ########### check directories and create if needed
633 dirs: $(OBJDIR) $(WINDIR) $(LIBDIR) $(BINDIR) $(TMPDIR)
634
635 $(OBJDIR) $(WINDIR) $(LIBDIR) $(BINDIR) $(TMPDIR):
636         if not exist "$@/$(NUL)" mkdir "$@"
637
638
639 ###########################################################
640 ############### Explicit dependencies
641 ###########################################################
642
643 $(ALL_OBJS): $(PROTOH)
644
645 # force recompilation of everything, if makefile changed
646
647 $(Z3950_OBJS): $(GENERATED_C_FILES) $(GENERATED_H_FILES)
648
649 $(ILL_OBJS): $(ILL_CORE_FILES) $(ITEM_REQ_FILES)
650
651 !if $(NEW_Z3950)
652 $(PROTOH): $(GENERATED_C_FILES) $(GENERATED_H_FILES)
653 !endif
654 # makes sure we generate before compiling anything, as the
655 # new proto.h refers to the generated files, and is included
656 # in various places
657
658 ###########################################################
659 ############### Log
660 ###########################################################
661 #
662 # $Log: makefile,v $
663 # Revision 1.17  2000-10-06 12:01:12  adam
664 # Updates regarding ASN-code generation (mostly).
665 #
666 # Revision 1.16  2000/05/05 13:48:15  adam
667 # Minor changes.
668 #
669 # Revision 1.15  2000/04/17 14:21:38  adam
670 # WIN32 update.
671 #
672 # Revision 1.14  2000/03/02 08:48:21  adam
673 # Renamed ASN.1 compiler to yaz-comp (used to be yc.tcl).
674 #
675 # Revision 1.13  2000/02/28 11:13:03  adam
676 # Removed odr_priv.obj.
677 #
678 # Revision 1.12  2000/01/06 11:27:16  adam
679 # Updated for ILL.
680 #
681 # Revision 1.11  1999/12/21 14:16:20  ian
682 # Changed retrieval module to allow data1 trees with no associated absyn.
683 # Also added a simple interface for extracting values from data1 trees using
684 # a string based tagpath.
685 #
686 # Revision 1.10  1999/12/08 13:10:48  adam
687 # New version.
688 #
689 # Revision 1.9  1999/11/30 13:47:12  adam
690 # Improved installation. Moved header files to include/yaz.
691 #
692 # Revision 1.8  1999/07/21 08:48:02  adam
693 # Removed dmalloc.obj.
694 #
695 # Revision 1.7  1999/06/09 15:10:08  heikki
696 # Cleaning up. Seems to work all right
697 #
698 # Revision 1.6  1999/06/09 13:33:32  heikki
699 # Compiles and links both old and new type stuff all right
700 #
701 # Revision 1.5  1999/06/09 11:05:30  heikki
702 # At least it can compile
703 #
704 # Revision 1.4  1999/06/09 09:41:09  heikki
705 # More work on the ASN-generated files.
706 #
707 # Revision 1.3  1999/06/08 14:32:30  heikki
708 # Proto.h works all right, removed linker warnings from server.lib
709 #
710 # Revision 1.2  1999/06/08 14:07:24  heikki
711 # Renamed a pile of files
712 # Tmpdir (to get around Ms leaving temp files around, and crashing
713 # when too many with same number...)
714 #
715 # Revision 1.1  1999/06/08 12:15:41  heikki
716 # Renamed to makefile (.nothing) (from .mak)
717 # Working on the proto.h problems and alternative confiigurations
718 #
719 # Revision 1.5  1999/06/04 10:04:28  heikki
720 # Cleaning up
721 #
722 # Revision 1.4  1999/06/02 13:23:29  heikki
723 # Debug options for C compiler
724 #
725 # Revision 1.3  1999/05/19 08:26:22  heikki
726 # Added comments
727 #
728 #
729
730
731