e7de5bfbc60704da9b8b8b9fa174bcd0d13c1b21
[yaz-moved-to-github.git] / win / makefile
1 # Makefile.mak - makefile for MS NMAKE 
2 # $Id: makefile,v 1.4 1999-06-09 09:41:09 heikki 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=0   # 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 server ztest 
35
36
37 ###########################################################
38 ############### Directories
39 ###########################################################
40 # The current directory is supposed to be something like
41 # ..../Yaz/Win, everything is relative to that
42 ROOTDIR=..   # The home of Yaz
43
44 INCLDIR=$(ROOTDIR)\include  # our includes
45 LIBDIR=$(ROOTDIR)\lib       # We produce .lib, .exp etc there
46 BINDIR=$(ROOTDIR)\bin       # We produce exes and dlls there
47 WINDIR=$(ROOTDIR)\win       # all these Win make things
48 OBJDIR=$(WINDIR)\obj        # where we store intermediate files
49 UNIXDIR=$(ROOTDIR)\unix     # corresponding unix things
50 SRCDIR=$(ROOTDIR)           # for the case we move them under src
51
52 ASNDIR=$(SRCDIR)\ASN
53 COMSTACKDIR=$(SRCDIR)\COMSTACK
54 ODRDIR=$(SRCDIR)\ODR
55 UTILDIR=$(SRCDIR)\UTIL
56 ZUTILDIR=$(SRCDIR)\ZUTIL
57 RETDIR=$(SRCDIR)\RETRIEVAL
58 Z3950DIR=$(SRCDIR)\Z39.50
59
60 CLIENTDIR=$(SRCDIR)\CLIENT
61 SERVERDIR=$(SRCDIR)\SERVER
62 ZTESTDIR=$(SRCDIR)\ZTEST
63
64 TMPDIR=$(ROOTDIR)\win\tmp
65 TMP=$(TMPDIR)
66
67 ###########################################################
68 ############### Targets - what to make
69 ###########################################################
70
71
72 DLL=$(BINDIR)\Yaz.dll
73 IMPLIB=$(LIBDIR)\Yaz.lib
74
75 CLIENT=$(BINDIR)\client.exe
76 SERVER=$(LIBDIR)\server.lib
77 ZTEST=$(BINDIR)\ztest.exe
78 PROTOH=$(INCLDIR)\proto.h
79
80 # shortcut names defined here
81 dll : $(DLL) 
82 client: $(CLIENT)
83 server: $(SERVER)
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 ### The RC compiler (resource files)
131 RSC=rc.exe
132 COMMON_RC_OPTIONS= /l 0x406 /i"$(ROOTDIR)" 
133 DEBUG_RC_OPTIONS=/d "_DEBUG"
134 RELEASE_RC_OPTIONS=/d "NDEBUG"
135
136
137 ### Linker options
138 LINK=link.exe
139
140 LINK_LIBS= kernel32.lib user32.lib   gdi32.lib   winspool.lib \
141            comdlg32.lib advapi32.lib shell32.lib ole32.lib    \
142            oleaut32.lib uuid.lib     odbc32.lib  odbccp32.lib \
143            wsock32.lib  advapi32.lib
144
145 COMMON_LNK_OPTIONS= /nologo \
146                     /subsystem:windows \
147                     /machine:i386 \
148                           /incremental:no
149
150 DEBUG_LNK_OPTIONS= /debug 
151
152 RELEASE_LNK_OPTIONS=  /pdb:none
153
154 DLL_LINK_OPTIONS= /dll  
155 CLIENT_LINK_OPTIONS = /subsystem:console  
156 SERVER_LINK_OPTIONS = -lib 
157 ZTEST_LINK_OPTIONS = /subsystem:console  
158
159 # TCL
160 TCL="C:\Program Files\Tcl\bin\tclsh80.exe"
161
162 COMMON_TCL_OPTIONS= ..\util\yc.tcl -d z.tcl
163
164
165 # Final opt variables
166 !if $(DEBUG)
167 COPT=   $(COMMON_C_OPTIONS)   $(DEBUG_C_OPTIONS)     $(COMMON_C_INCLUDES)
168 MTLOPT= $(COMMON_MTL_OPTIONS) $(DEBUG_MTL_OPTIONS)
169 RCOPT=  $(COMMON_RC_OPTIONS)  $(DEBUG_RC_OPTIONS)
170 LNKOPT= $(COMMON_LNK_OPTIONS) $(DEBUG_LNK_OPTIONS)   $(LNK_LIBS)
171 TCLOPT= $(COMMON_TCL_OPTIONS)
172
173 !else
174 COPT=   $(COMMON_C_OPTIONS)   $(RELEASE_C_OPTIONS)   $(COMMON_C_INCLUDES) 
175 MTLOPT= $(COMMON_MTL_OPTIONS) $(RELEASE_MTL_OPTIONS)
176 RCOPT=  $(COMMON_RC_OPTIONS)  $(RELEASE_RC_OPTIONS)
177 LNKOPT= $(COMMON_LNK_OPTIONS) $(RELEASE_LNK_OPTIONS) $(LNK_LIBS)
178 TCLOPT= $(COMMON_TCL_OPTIONS)
179 !endif
180
181
182
183 ###########################################################
184 ###############  Source and object modules
185 ###########################################################
186
187 # The resource files
188
189 RCFILE=$(SRCDIR)\compmak.rc
190 # Horrible Hack: The resfile contains just one line, pointing
191 # to the component.tlb file (which is created by the idl compiler)
192 # Devstudio wants that file to live in YazX3950, this makefile in
193 # win/obj. So we need to RC files!
194
195 RESFILE=$(OBJDIR)\component.res
196
197
198 # The def file
199 #DEF_FILE= $(ROOTDIR)\component.def 
200
201
202
203 # Note: Ordinary source files are not specified here at 
204 # all, make finds them in suitable dirs. The object modules
205 # need to be specified, though
206
207 YAZ_CLIENT_OBJS= \
208    $(OBJDIR)\client.obj
209
210 YAZ_SERVER_OBJS= \
211         "$(OBJDIR)\eventl.obj" \
212         "$(OBJDIR)\requestq.obj" \
213         "$(OBJDIR)\service.obj" \
214         "$(OBJDIR)\seshigh.obj" \
215         "$(OBJDIR)\statserv.obj" \
216         "$(OBJDIR)\tcpdchk.obj" 
217
218 ZTEST_OBJS= \
219         "$(OBJDIR)\read-grs.obj" \
220         "$(OBJDIR)\ztest.obj" 
221         
222
223 YAZ_ASN_OBJS= \
224    $(OBJDIR)\proto.obj \
225    $(OBJDIR)\prt-acc.obj \
226    $(OBJDIR)\prt-add.obj \
227    $(OBJDIR)\prt-arc.obj \
228    $(OBJDIR)\prt-dat.obj \
229    $(OBJDIR)\prt-dia.obj \
230    $(OBJDIR)\prt-esp.obj \
231    $(OBJDIR)\prt-exd.obj \
232    $(OBJDIR)\prt-exp.obj \
233    $(OBJDIR)\prt-grs.obj \
234    $(OBJDIR)\prt-rsc.obj \
235    $(OBJDIR)\prt-univ.obj 
236
237 YAZ_COMSTACK_OBJS= \
238    $(OBJDIR)\comstack.obj \
239    $(OBJDIR)\tcpip.obj \
240    $(OBJDIR)\waislen.obj 
241
242 YAZ_ODR_OBJS= \
243    $(OBJDIR)\ber_any.obj \
244    $(OBJDIR)\ber_bit.obj \
245    $(OBJDIR)\ber_bool.obj \
246    $(OBJDIR)\ber_int.obj \
247    $(OBJDIR)\ber_len.obj \
248    $(OBJDIR)\ber_null.obj \
249    $(OBJDIR)\ber_oct.obj \
250    $(OBJDIR)\ber_oid.obj \
251    $(OBJDIR)\ber_tag.obj \
252    $(OBJDIR)\dumpber.obj \
253    $(OBJDIR)\odr.obj \
254    $(OBJDIR)\odr_any.obj \
255    $(OBJDIR)\odr_bit.obj \
256    $(OBJDIR)\odr_bool.obj \
257    $(OBJDIR)\odr_choice.obj \
258    $(OBJDIR)\odr_cons.obj \
259    $(OBJDIR)\odr_enum.obj \
260    $(OBJDIR)\odr_int.obj \
261    $(OBJDIR)\odr_mem.obj \
262    $(OBJDIR)\odr_null.obj \
263    $(OBJDIR)\odr_oct.obj \
264    $(OBJDIR)\odr_oid.obj \
265    $(OBJDIR)\odr_priv.obj \
266    $(OBJDIR)\odr_seq.obj \
267    $(OBJDIR)\odr_tag.obj \
268    $(OBJDIR)\odr_use.obj \
269    $(OBJDIR)\odr_util.obj 
270
271 YAZ_UTIL_OBJS= \
272    $(OBJDIR)\atoin.obj \
273    $(OBJDIR)\dmalloc.obj \
274    $(OBJDIR)\log.obj \
275    $(OBJDIR)\marcdisp.obj \
276    $(OBJDIR)\nmem.obj \
277    $(OBJDIR)\nmemsdup.obj \
278    $(OBJDIR)\oid.obj \
279    $(OBJDIR)\options.obj \
280    $(OBJDIR)\readconf.obj \
281    $(OBJDIR)\tpath.obj \
282    $(OBJDIR)\wrbuf.obj \
283    $(OBJDIR)\xmalloc.obj \
284    $(OBJDIR)\matchstr.obj 
285
286 YAZ_ZUTIL_OBJS= \
287    $(OBJDIR)\diagbib1.obj \
288    $(OBJDIR)\zget.obj \
289    $(OBJDIR)\prt-ext.obj \
290    $(OBJDIR)\logrpn.obj \
291    $(OBJDIR)\pquery.obj \
292    $(OBJDIR)\query.obj \
293    $(OBJDIR)\yaz-ccl.obj \
294    $(OBJDIR)\otherinfo.obj
295
296 YAZ_RET_OBJS= \
297    $(OBJDIR)\d1_absyn.obj\
298    $(OBJDIR)\d1_attset.obj\
299    $(OBJDIR)\d1_doespec.obj\
300    $(OBJDIR)\d1_espec.obj\
301    $(OBJDIR)\d1_expout.obj\
302    $(OBJDIR)\d1_grs.obj\
303    $(OBJDIR)\d1_handle.obj\
304    $(OBJDIR)\d1_map.obj\
305    $(OBJDIR)\d1_marc.obj\
306    $(OBJDIR)\d1_prtree.obj\
307    $(OBJDIR)\d1_read.obj\
308    $(OBJDIR)\d1_soif.obj\
309    $(OBJDIR)\d1_sumout.obj\
310    $(OBJDIR)\d1_sutrs.obj\
311    $(OBJDIR)\d1_tagset.obj\
312    $(OBJDIR)\d1_varset.obj\
313    $(OBJDIR)\d1_write.obj
314
315
316 Z3950_OBJS= \
317    $(OBJDIR)\z-accdes1.obj \
318    $(OBJDIR)\z-accform1.obj \
319    $(OBJDIR)\z-acckrb1.obj \
320    $(OBJDIR)\z-core.obj \
321    $(OBJDIR)\z-diag1.obj \
322    $(OBJDIR)\z-espec1.obj \
323    $(OBJDIR)\z-estask.obj \
324    $(OBJDIR)\z-exp.obj \
325    $(OBJDIR)\z-grs.obj \
326    $(OBJDIR)\z-opac.obj \
327    $(OBJDIR)\z-uifr1.obj \
328    $(OBJDIR)\z-rrf1.obj \
329    $(OBJDIR)\z-rrf2.obj \
330    $(OBJDIR)\z-sum.obj \
331    $(OBJDIR)\z-sutrs.obj \
332    $(OBJDIR)\zes-expi.obj \
333    $(OBJDIR)\zes-exps.obj \
334    $(OBJDIR)\zes-order.obj \
335    $(OBJDIR)\zes-pquery.obj \
336    $(OBJDIR)\zes-psched.obj \
337    $(OBJDIR)\zes-pset.obj \
338    $(OBJDIR)\zes-update0.obj 
339
340 COMMON_YAZ_OBJS= \
341    $(YAZ_COMSTACK_OBJS) \
342    $(YAZ_ODR_OBJS) \
343    $(YAZ_UTIL_OBJS) \
344    $(YAZ_ZUTIL_OBJS) \
345    $(YAZ_RET_OBJS)
346
347 !if $(NEW_Z3950)
348 YAZ_OBJS= \
349         $(COMMON_YAZ_OBJS) \
350         $(Z3950_OBJS)
351 !else
352 YAZ_OBJS= \
353         $(COMMON_YAZ_OBJS) \
354         $(YAZ_ASN_OBJS)
355 !endif
356
357 DLL_OBJS= $(YAZ_OBJS)
358
359
360
361 ##########################################################
362 ############## proto.h
363 ##########################################################
364
365 !if $(NEW_Z3950)
366 $(PROTOH): makefile $(INCLDIR)\z-proto.h $(Z3950V3_H_FILES)
367         copy $(INCLDIR)\z-proto.h $(INCLDIR)\proto.h
368 !else
369 $(PROTOH): makefile $(INCLDIR)\prt-proto.h 
370         copy $(INCLDIR)\prt-proto.h $(INCLDIR)\proto.h
371 !endif
372
373
374
375 ###########################################################
376 ############### Generated C and H files
377 ###########################################################
378
379 Z3950_C_DIR=$(Z3950DIR)   #!!! Should be moved to OBJ
380
381 # Files generated from datetime.asn
382 DATETIME_H_FILES = z-date.h
383 DATETIME_C_FILES = z-date.c
384 DATETIME_FILES = $(DATETIME_H_FILES) $(DATETIME_C_FILES)
385 $(DATETIME_C_FILES): $(DATETIME_H_FILES) 
386
387
388 # Files generated from univres.asn
389 UNIVRES_H_FILES = z-univ.h
390 UNIVRES_C_FILES = z-univ.c
391 UNIVRES_FILES = $(UNIVRES_H_FILES) $(UNIVRES_C_FILES)
392 $(UNIVRES_C_FILES): $(UNIVRES_H_FILES) 
393
394 # Files generated from esupdate.asn
395 ESUPDATE_H_FILES = zes-update.h
396 ESUPDATE_C_FILES = zes-update.c
397 ESUPDATE_FILES = $(ESUPDATE_H_FILES) $(ESUPDATE_C_FILES)
398 $(ESUPDATE_C_FILES): $(ESUPDATE_H_FILES) 
399
400
401 # Files created from z3950v3.asn
402 Z3950V3_H_FILES= \
403    $(INCLDIR)\z-accdes1.h \
404    $(INCLDIR)\z-core.h
405
406 Z3950V3_C_FILES= \
407    $(Z3950_C_DIR)\z-accdes1.c \
408    $(Z3950_C_DIR)\z-accform1.c \
409    $(Z3950_C_DIR)\z-acckrb1.c \
410    $(Z3950_C_DIR)\z-core.c \
411    $(Z3950_C_DIR)\z-diag1.c \
412    $(Z3950_C_DIR)\z-espec1.c \
413    $(Z3950_C_DIR)\z-estask.c \
414    $(Z3950_C_DIR)\z-exp.c \
415    $(Z3950_C_DIR)\z-grs.c \
416    $(Z3950_C_DIR)\z-opac.c \
417    $(Z3950_C_DIR)\z-uifr1.c \
418    $(Z3950_C_DIR)\z-rrf1.c \
419    $(Z3950_C_DIR)\z-rrf2.c \
420    $(Z3950_C_DIR)\z-sum.c \
421    $(Z3950_C_DIR)\z-sutrs.c \
422    $(Z3950_C_DIR)\zes-expi.c \
423    $(Z3950_C_DIR)\zes-exps.c \
424    $(Z3950_C_DIR)\zes-order.c \
425    $(Z3950_C_DIR)\zes-pquery.c \
426    $(Z3950_C_DIR)\zes-psched.c \
427    $(Z3950_C_DIR)\zes-pset.c \
428    $(Z3950_C_DIR)\zes-update0.c 
429
430 Z3950V3_FILES= $(Z3950V3_C_FILES) $(Z3950V3_H_FILES)
431
432 $(Z3950V3_C_FILES): $(Z3950V3_H_FILES)
433
434 GENERATED_C_FILES= \
435    $(Z3950V3_C_FILES)  \
436    $(ESUPDATE_C_FILES) \
437    $(UNIVRES_C_FILES)  \
438    $(DATETIME_C_FILES)
439
440 GENERATED_H_FILES= \
441    $(Z3950V3_H_FILES)  \
442    $(ESUPDATE_H_FILES) \
443    $(UNIVRES_H_FILES)  \
444    $(DATETIME_H_FILES)
445
446
447 ###########################################################
448 ############### Compiling 
449 ###########################################################
450
451 # Note: This defines where to look for the necessary
452 # source files. Funny way of doing it, but it works.
453
454 # DLL sources
455 {$(SRCDIR)}.cpp{$(OBJDIR)}.obj:
456         @$(CPP) @<<
457         $(COPT) $<
458 <<
459
460 # Yaz client
461 {$(CLIENTDIR)}.c{$(OBJDIR)}.obj:
462         @$(CPP) @<<  
463         $(COPT) $< 
464         /D"_CONSOLE"
465 <<
466
467 # Ztest
468 {$(ZTESTDIR)}.c{$(OBJDIR)}.obj:
469         @$(CPP) @<<  
470         $(COPT) $< 
471       /D"_CONSOLE"
472         /D"_MBCS"
473 <<
474
475
476 # Server
477 {$(SERVERDIR)}.c{$(OBJDIR)}.obj:
478         @$(CPP) @<<  
479         $(COPT) $< 
480 <<
481
482 # Various YAZ source directories
483 {$(ASNDIR)}.c{$(OBJDIR)}.obj:
484         @$(CPP) @<<  
485         $(COPT) $< 
486 <<
487
488 {$(COMSTACKDIR)}.c{$(OBJDIR)}.obj:
489         @$(CPP) @<<  
490         $(COPT) $< 
491 <<
492
493 {$(ODRDIR)}.c{$(OBJDIR)}.obj:
494         @$(CPP) @<<  
495         $(COPT) $< 
496 <<
497
498 {$(UTILDIR)}.c{$(OBJDIR)}.obj:
499         @$(CPP) @<<  
500         $(COPT) $< 
501 <<
502
503 {$(ZUTILDIR)}.c{$(OBJDIR)}.obj:
504         @$(CPP) @<<  
505         $(COPT) $< 
506 <<
507
508 {$(RETDIR)}.c{$(OBJDIR)}.obj:
509         @$(CPP) @<<  
510         $(COPT) $< 
511 <<
512
513
514 {$(Z3950_C_DIR)}.c{$(OBJDIR)}.obj:
515         @$(CPP) @<<  
516         $(COPT) $< 
517 <<
518
519 ### Resource file
520 $(RESFILE): $(RCFILE) $(IDLGENERATED)
521         $(RSC) $(RCOPT) /fo"$(RESFILE)" $(RCFILE) 
522
523 ############### ASN-generated files
524
525
526 $(Z3950V3_FILES): $(Z3950DIR)\z3950v3.asn
527         @cd $(Z3950DIR)
528         $(TCL) $(TCLOPT) z3950v3.asn
529         copy *.h $(INCLDIR)  >NUL
530
531 $(DATETIME_FILES): $(Z3950DIR)\datetime.asn
532         @cd $(Z3950DIR)
533         $(TCL) $(TCLOPT) datetime.asn
534         copy *.h $(INCLDIR)  >NUL
535
536 $(UNIVRES_FILES): $(Z3950DIR)\univres.asn
537         @cd $(Z3950DIR)
538         $(TCL) $(TCLOPT) univres.asn
539         copy *.h $(INCLDIR)  >NUL
540
541 $(ESUPDATE_FILES): $(Z3950DIR)\esupdate.asn
542         @cd $(Z3950DIR)
543         $(TCL) $(TCLOPT) esupdate.asn
544         copy *.h $(INCLDIR)  >NUL
545
546
547 ###########################################################
548 ############### Linking
549 ###########################################################
550
551 ###$(DLL) $(IMPLIB): "$(BINDIR)" $(Z3950_OBJS)
552
553 $(DLL) $(IMPLIB): "$(BINDIR)" $(DLL_OBJS) 
554         @echo Linking the dll  $(DLL)
555         $(LINK) @<<
556                 $(LNKOPT) 
557                 $(LINK_LIBS) 
558                 $(DLL_LINK_OPTIONS)
559                 $(DLL_OBJS) 
560                 /out:$(DLL) 
561                 /implib:$(IMPLIB)
562                 /pdb:"$(LIBDIR)/yaz.pdb" 
563                 /map:"$(LIBDIR)/yaz.map"  
564 <<
565
566 #foo: 
567 #       rem $(Z3950_OBJS)
568 #       pause
569 #       rem $(DLL_OBJS)
570
571 foo: $(OBJDIR)\comstack.obj
572         echo foo
573
574
575 $(CLIENT) : "$(BINDIR)" $(YAZ_CLIENT_OBJS) 
576         @echo Linking the client  $(CLIENT)
577         $(LINK) @<<
578             $(LNKOPT) 
579                 $(CLIENT_LINK_OPTIONS)
580                 $(LINK_LIBS) 
581                 $(IMPLIB)
582                 $(YAZ_CLIENT_OBJS) 
583                 /out:$(CLIENT) 
584 <<
585
586 $(ZTEST) : "$(BINDIR)" $(ZTEST_OBJS) $(SERVER) $(DLL)
587         @echo Linking the ztest  $(ZTEST)
588         $(LINK) @<<
589             $(LNKOPT) 
590                 $(ZTEST_LINK_OPTIONS)
591                 $(LINK_LIBS) 
592                 shell32.lib 
593                 $(IMPLIB)
594                 $(SERVER)
595                 $(ZTEST_OBJS) 
596                 /out:$(ZTEST) 
597 <<
598
599
600 $(SERVER) : "$(BINDIR)" $(YAZ_SERVER_OBJS) 
601         @echo Linking the server  $(SERVER)
602         $(LINK) $(SERVER_LINK_OPTIONS) @<<
603                 /nologo
604                 $(IMPLIB)
605                 $(YAZ_SERVER_OBJS) 
606                 /out:$(SERVER) 
607 <<
608
609 #               $(LINK_LIBS) 
610
611 # note that this links a lib, so it uses completely different options.
612
613
614
615 ###########################################################
616 ############### Special operations
617 ###########################################################
618
619
620 ############## clean
621 clean:
622         del $(OBJDIR)\*.obj
623         del $(OBJDIR)\*.sbr
624         del $(DLL) 
625         del $(CLIENT)
626         del $(SERVER)
627         del $(ZTEST)
628         del $(TMPDIR)\*.
629         del $(PROTOH)
630         del $(Z3950_C_DIR)\*.c
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 $(DLL_OBJS): makefile $(PROTOH) $(GENERATED_C_FILES)
644
645 # Note: The objects depend on their own C file already, the
646 # dependency here is actually to make sure we get the 
647 # proper H files generated before trying to compile anything
648 # Unfortunately make clean can not delete the H files so
649 # easily. This hack assures that if the C's are deleted 
650 # (as make clean does), the H's will be generated anew...
651
652
653
654 ###########################################################
655 ############### Log
656 ###########################################################
657 #
658 # $Log: makefile,v $
659 # Revision 1.4  1999-06-09 09:41:09  heikki
660 # More work on the ASN-generated files.
661 #
662 # Revision 1.3  1999/06/08 14:32:30  heikki
663 # Proto.h works all right, removed linker warnings from server.lib
664 #
665 # Revision 1.2  1999/06/08 14:07:24  heikki
666 # Renamed a pile of files
667 # Tmpdir (to get around Ms leaving temp files around, and crashing
668 # when too many with same number...)
669 #
670 # Revision 1.1  1999/06/08 12:15:41  heikki
671 # Renamed to makefile (.nothing) (from .mak)
672 # Working on the proto.h problems and alternative confiigurations
673 #
674 # Revision 1.5  1999/06/04 10:04:28  heikki
675 # Cleaning up
676 #
677 # Revision 1.4  1999/06/02 13:23:29  heikki
678 # Debug options for C compiler
679 #
680 # Revision 1.3  1999/05/19 08:26:22  heikki
681 # Added comments
682 #
683 #
684
685
686