5732dad03aa4be9e37597fdaa0b12f60ace55014
[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 rpcns4.lib \
49         Ws2_32.lib \
50         $(DESTDIR)\lib\libosi.lib
51
52 ############################################################################
53 # Definitions for building a DLL.
54
55 DLLFILE = $(DESTDIR)\root.client\usr\vice\etc\libosi.dll
56
57 ILIBDIR = $(DESTDIR)\lib
58
59 DLLOBJS =\
60         $(OUT)\dbrpc_s.obj \
61         $(OUT)\osistatl.obj \
62         $(OUT)\osibasel.obj \
63         $(OUT)\osisleep.obj \
64         $(OUT)\osiqueue.obj \
65         $(OUT)\osiltype.obj \
66         $(OUT)\osidb.obj \
67         $(OUT)\osifd.obj \
68         $(OUT)\osilog.obj \
69         $(OUT)\osiutils.obj \
70         $(OUT)\libosi.res
71
72 DLLLIBS =\
73         rpcrt4.lib \
74         rpcns4.lib
75
76 $(DLLFILE): $(DLLOBJS) 
77         $(DLLGUILINK) $(DLLLIBS) -def:libosi.def
78         $(_VC_MANIFEST_EMBED_DLL)
79         $(DLLPREP)
80         $(COPY) $*.lib $(ILIBDIR)
81         $(DEL) $*.lib $*.exp
82
83
84 ############################################################################
85 # build osievent.dll
86 OSIEVENTDLL = $(DESTDIR)\root.client\usr\vice\etc\osievent.dll
87
88 osievent.rc: osievent.mc
89         mc $*.mc
90
91 $(OUT)\osievent.res: osievent.rc
92
93 $(OUT)\osievent.dll: $(OUT)\osievent.res
94         link -dll -noentry -out:$*.dll $*.res
95
96 $(OSIEVENTDLL): $(OUT)\osievent.dll
97         $(COPY) osievent.dll $(DESTDIR)\root.client\usr\vice\etc\.
98
99 ############################################################################
100 # build osidebug too
101
102 $(OUT)\osidebug.res: osidebug.rc
103
104 $(EXEOBJS) : osidebug.c
105
106 $(EXEFILE) : $(EXEOBJS)
107         $(EXEGUILINK) $(EXELIBS)
108         $(_VC_MANIFEST_EMBED_EXE)
109
110 ############################################################################
111 # midl on dbrpc.idl
112
113 dbrpc.h dbrpc_c.c dbrpc_s.c: dbrpc.idl
114         $(MIDL) $(AFSDEV_AUXMIDLFLAGS) -Zp4 -cpp_cmd $(cc) -cpp_opt "-E" $**
115 ############################################################################
116 # generate versioninfo resources
117
118 $(OUT)\libosi.res: libosi.rc AFS_component_version_number.h
119
120 ############################################################################
121 # Install target; primary makefile target
122
123 install_headers: $(INCFILES)
124
125 !IFDEF OSIEVENT
126 install: $(OSIEVENTDLL) install_headers $(DLLFILE)
127 !ELSE
128 install: install_headers $(DLLFILE)
129 !ENDIF
130
131 install_debug: $(OUT)\osidebug.res $(EXEFILE)
132
133 install9x: install
134
135 ############################################################################
136 # Local clean target; augments predefined clean target
137
138 clean::
139         $(DEL) dbrpc_s.c dbrpc_c.c dbrpc.h $(DLLFILE) $(INCFILES) $(OSIEVENTDLL)
140         $(DEL) $(EXEOBJS) $(EXEFILE) $(OUT)\*.res $(OUT)\*.DLL
141
142
143 mkdir: