e110524fbecf5d29a625d6ea44a0035e5ba3fb33
[openafs.git] / src / comerr / NTMakefile
1 # Copyright 2000, International Business Machines Corporation and others.
2 # All Rights Reserved.
3
4 # This software has been released under the terms of the IBM Public
5 # License.  For details, see the LICENSE file in the top-level source
6 # directory or online at http://www.openafs.org/dl/license10.html
7
8 RELDIR=comerr
9 !INCLUDE ..\config\NTMakefile.$(SYS_NAME)
10 !INCLUDE ..\config\NTMakefile.version
11
12 ####################################################################
13 # install  comerr header files 
14 INCFILEDIR = $(DESTDIR)\include\afs
15 INCFILES =\
16         $(INCFILEDIR)\com_err.h \
17         $(INCFILEDIR)\error_table.h \
18         $(INCFILEDIR)\mit-sipb-cr.h 
19
20 ####################################################################
21 # build and install  afscom_err.lib static lib
22 COMERR_LIBFILE = $(DESTDIR)\lib\afs\afscom_err.lib
23
24 COMERR_LIBOBJS =\
25                 $(OUT)\error_msg.obj  \
26                 $(OUT)\et_name.obj  \
27                 $(OUT)\com_err.obj \
28                 $(OUT)\AFS_component_version_number.obj
29                 
30 $(COMERR_LIBOBJS): $$(@B).c
31     $(C2OBJ) $**
32
33 $(COMERR_LIBFILE): $(COMERR_LIBOBJS)
34         $(LIBARCH)  
35
36 ####################################################################
37 # build and install the compile_et executable
38 COMPILE_ET_EXEFILE = $(DESTDIR)\bin\compile_et.exe
39
40 prep:
41         $(DESTDIR)\bin\touch et_lex.lex_nt.c
42         $(DESTDIR)\bin\touch error_table_nt.c
43         @echo If you update et_lex.lex.l, to build correctly, you should delete error_table_nt.c 
44
45 et_lex.lex_nt.c:   et_lex.lex.l
46     $(LEX) -t et_lex.lex.l > $@ 
47
48 error_table_nt.c:  et_lex.lex_nt.c error_table.y
49     $(YACC) -d -o $@ error_table.y
50
51 COMPILE_ET_EXEOBJS =\
52                 $(OUT)\compile_et.obj \
53                 $(OUT)\error_table_nt.obj
54
55 $(COMPILE_ET_EXEOBJS): $$(@B).c
56     $(C2OBJ) $**
57
58 COMPILE_ET_EXELIBS =\
59         $(DESTDIR)\lib\afs\afsutil.lib
60
61 $(COMPILE_ET_EXEFILE): $(COMPILE_ET_EXEOBJS) $(COMPILE_ET_EXELIBS)  
62         $(EXECONLINK)
63         $(_VC_MANIFEST_EMBED_EXE)
64         $(EXEPREP) 
65
66 ####################################################################
67 install: prep $(INCFILES) $(COMERR_LIBFILE) $(COMPILE_ET_EXEFILE) 
68
69 install9x: install
70
71 clean::
72         $(DEL) $(COMERR_LIBFILE) $(OUT)\AFS_component_version_number.obj
73         $(DEL) $(COMPILE_ET_EXEFILE)
74         $(DEL) *~ *.bak \
75                  *.otl *.aux *.toc *.PS *.dvi *.x9700 *.ps \
76                  *.cp *.fn *.ky *.log *.pg *.tp *.vr \
77                  et.ar TAGS
78
79 test:
80
81 mkdir: