b31b5cb1a764fa3282457c840822a98ff2010de5
[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
9 !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME)
10 !INCLUDE ..\..\config\NTMakefile.version
11
12
13 ############################################################################
14 # Definitions for installing header files
15
16 INCFILEDIR = $(DESTDIR)\include  # header file install directory
17
18 INCFILES =\
19         $(INCFILEDIR)\dbrpc.h \
20         $(INCFILEDIR)\basic.h   \
21         $(INCFILEDIR)\osidebug.h  \
22         $(INCFILEDIR)\osiltype.h \
23         $(INCFILEDIR)\osistatl.h \
24         $(INCFILEDIR)\trylock.h \
25         $(INCFILEDIR)\main.h \
26         $(INCFILEDIR)\osibasel.h \
27         $(INCFILEDIR)\osifd.h  \
28         $(INCFILEDIR)\osiqueue.h \
29         $(INCFILEDIR)\osiutils.h \
30         $(INCFILEDIR)\osi.h \
31         $(INCFILEDIR)\osidb.h \
32         $(INCFILEDIR)\osilog.h \
33         $(INCFILEDIR)\osisleep.h \
34         $(INCFILEDIR)\perf.h \
35 !IFDEF OSIEVENT
36         $(INCFILEDIR)\osievent.h \
37 !ENDIF
38     $(INCFILEDIR)\osithrdnt.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         rpcndr.lib 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         $(OJT)\dbrpc_s.obj \
61         $(OJT)\osistatl.obj \
62         $(OJT)\osibasel.obj \
63         $(OJT)\osisleep.obj \
64         $(OJT)\osiqueue.obj \
65         $(OJT)\osiltype.obj \
66         $(OJT)\osidb.obj \
67         $(OJT)\osifd.obj \
68         $(OJT)\osilog.obj \
69         $(OJT)\osiutils.obj \
70         $(OJT)\libosi.res
71
72 DLLLIBS =\
73         rpcndr.lib \
74         rpcrt4.lib \
75         rpcns4.lib \
76         largeint.lib
77
78 $(DLLFILE): $(DLLOBJS) 
79         $(DLLGUILINK) $(DLLLIBS) -def:libosi.def
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 $(OJT)\osievent.res: osievent.rc
93
94 $(OJT)\osievent.dll: $(OJT)\osievent.res
95         link -dll -noentry -out:$*.dll $*.res
96
97 $(OSIEVENTDLL): $(OJT)\osievent.dll
98         $(COPY) osievent.dll $(DESTDIR)\root.client\usr\vice\etc\.
99
100 ############################################################################
101 # build osidebug too
102
103 $(OJT)\osidebug.res: osidebug.rc
104
105 $(EXEOBJS) : osidebug.c
106
107 $(EXEFILE) : $(EXEOBJS)
108         $(EXEGUILINK) $(EXELIBS)
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 $(OJT)\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: $(OJT)\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) $(OJT)\*.res $(OJT)\*.DLL
141
142
143 mkdir:
144