0e8d079176ea7b68a82d19a10d80008a5aeb7a33
[openafs.git] / src / WINNT / client_osi / 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=WINNT\client_osi
9 !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME)
10 !INCLUDE ..\..\config\NTMakefile.version
11
12 ############################################################################
13 # Definitions for installing header files
14
15 INCFILEDIR = $(DESTDIR)\include  # header file install directory
16
17 INCFILES =\
18         $(INCFILEDIR)\dbrpc.h \
19         $(INCFILEDIR)\basic.h   \
20         $(INCFILEDIR)\osidebug.h  \
21         $(INCFILEDIR)\osiltype.h \
22         $(INCFILEDIR)\osistatl.h \
23         $(INCFILEDIR)\trylock.h \
24         $(INCFILEDIR)\main.h \
25         $(INCFILEDIR)\osibasel.h \
26         $(INCFILEDIR)\osifd.h  \
27         $(INCFILEDIR)\osiqueue.h \
28         $(INCFILEDIR)\osiutils.h \
29         $(INCFILEDIR)\osi.h \
30         $(INCFILEDIR)\osidb.h \
31         $(INCFILEDIR)\osilog.h \
32         $(INCFILEDIR)\osisleep.h \
33         $(INCFILEDIR)\perf.h \
34 !IFDEF OSIEVENT
35         $(INCFILEDIR)\osievent.h \
36 !ENDIF
37     $(INCFILEDIR)\osithrdnt.h \
38     $(INCFILEDIR)\largeint.h
39
40 $(INCFILEDIR)\dbrpc.h: dbrpc.h
41
42 EXEFILE = $(DESTDIR)\bin\osidebug.exe
43
44 EXEOBJS = \
45         osidebug.obj
46
47 EXELIBS = \
48         rpcrt4.lib \
49 #       rpcns4.lib \
50         Ws2_32.lib shell32.lib \
51         $(DESTDIR)\lib\libosi.lib
52
53 ############################################################################
54 # Definitions for building a DLL.
55
56 DLLFILE = $(DESTDIR)\root.client\usr\vice\etc\libosi.dll
57
58 ILIBDIR = $(DESTDIR)\lib
59
60 DLLOBJS =\
61         $(OUT)\dbrpc_s.obj \
62         $(OUT)\osistatl.obj \
63         $(OUT)\osibasel.obj \
64         $(OUT)\osisleep.obj \
65         $(OUT)\osiqueue.obj \
66         $(OUT)\osiltype.obj \
67         $(OUT)\osidb.obj \
68         $(OUT)\osifd.obj \
69         $(OUT)\osilog.obj \
70         $(OUT)\osiutils.obj \
71         $(OUT)\libosi.res
72
73 DLLLIBS =\
74         rpcrt4.lib \
75 #       rpcns4.lib
76
77 $(DLLFILE): $(DLLOBJS) 
78         $(DLLGUILINK) $(DLLLIBS) -def:libosi.def
79         $(_VC_MANIFEST_EMBED_DLL)
80         $(DLLPREP)
81         $(COPY) $*.lib $(ILIBDIR)
82         $(DEL) $*.lib $*.exp
83
84
85 ############################################################################
86 # build osievent.dll
87 OSIEVENTDLL = $(DESTDIR)\root.client\usr\vice\etc\osievent.dll
88
89 osievent.rc: osievent.mc
90         mc $*.mc
91
92 $(OUT)\osievent.res: osievent.rc
93
94 $(OUT)\osievent.dll: $(OUT)\osievent.res
95         link -dll -noentry -out:$*.dll $*.res
96
97 $(OSIEVENTDLL): $(OUT)\osievent.dll
98         $(COPY) osievent.dll $(DESTDIR)\root.client\usr\vice\etc\.
99
100 ############################################################################
101 # build osidebug too
102
103 $(OUT)\osidebug.res: osidebug.rc
104
105 $(EXEOBJS) : osidebug.c
106
107 $(EXEFILE) : $(EXEOBJS)
108         $(EXEGUILINK) $(EXELIBS)
109         $(_VC_MANIFEST_EMBED_EXE)
110
111 ############################################################################
112 # midl on dbrpc.idl
113
114 dbrpc.h dbrpc_c.c dbrpc_s.c: dbrpc.idl
115         $(MIDL) $(AFSDEV_AUXMIDLFLAGS) -Zp4 -cpp_cmd $(cc) -cpp_opt "-E" $**
116 ############################################################################
117 # generate versioninfo resources
118
119 $(OUT)\libosi.res: libosi.rc AFS_component_version_number.h
120
121 ############################################################################
122 # Install target; primary makefile target
123
124 install_headers: $(INCFILES)
125
126 !IFDEF OSIEVENT
127 install: $(OSIEVENTDLL) install_headers $(DLLFILE)
128 !ELSE
129 install: install_headers $(DLLFILE)
130 !ENDIF
131
132 install_debug: $(OUT)\osidebug.res $(EXEFILE)
133
134 install9x: install
135
136 ############################################################################
137 # Local clean target; augments predefined clean target
138
139 clean::
140         $(DEL) dbrpc_s.c dbrpc_c.c dbrpc.h $(DLLFILE) $(INCFILES) $(OSIEVENTDLL)
141         $(DEL) $(EXEOBJS) $(EXEFILE) $(OUT)\*.res $(OUT)\*.DLL
142
143
144 mkdir: