windows-afsdb-and-freelance-afs-root-support-20011005
[openafs.git] / src / ptserver / 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 # Override default definitions in NTMakefile.$(SYS_NAME) before including.
9
10 !INCLUDE ..\config\NTMakefile.$(SYS_NAME)
11 !include ..\config\NTMakefile.version
12
13
14 ############################################################################
15 # Definitions for installing header files
16
17 INCFILEDIR = $(DESTDIR)\include 
18
19 INCFILES =\
20         $(INCFILEDIR)\afs\ptserver.h \
21         $(INCFILEDIR)\afs\ptint.h \
22         $(INCFILEDIR)\afs\pterror.h \
23         $(INCFILEDIR)\afs\ptclient.h 
24
25 ############################################################################
26 # build afsprot.lib
27
28 LIBFILE = $(DESTDIR)\lib\afs\afsprot.lib
29
30 LIBOBJS =\
31         ptuser.obj \
32         pterror.obj \
33         ptint.cs.obj \
34         ptint.xdr.obj \
35         AFS_component_version_number.obj
36
37
38 $(LIBFILE): $(LIBOBJS)  
39         $(LIBARCH) 
40
41 ############################################################################
42 # build ptserver.exe
43
44 PTSERVER = $(DESTDIR)\root.server\usr\afs\bin\ptserver.exe
45
46 PTSERVER_EXEOBJS =\
47         ptint.ss.obj \
48         ptint.xdr.obj \
49         ptserver.obj \
50         ptutils.obj \
51         ptprocs.obj \
52         utils.obj \
53         ptserver.res
54
55
56 PTSERVER_EXELIBS =\
57         $(DESTDIR)\lib\afsubik.lib \
58         $(DESTDIR)\lib\afs\afsauth.lib \
59         $(DESTDIR)\lib\afsrxkad.lib \
60         $(DESTDIR)\lib\afsrxstat.lib \
61         $(DESTDIR)\lib\afsrx.lib \
62         $(DESTDIR)\lib\afslwp.lib \
63         $(DESTDIR)\lib\afsdes.lib \
64         $(DESTDIR)\lib\afs\afscom_err.lib \
65         $(DESTDIR)\lib\afs\afsutil.lib \
66         $(DESTDIR)\lib\afs\afsaudit.lib \
67         $(DESTDIR)\lib\afs\afseventlog.lib \
68         $(DESTDIR)\lib\afs\afsreg.lib \
69         $(DESTDIR)\lib\cm_dns.obj
70
71 !IF (("$(SYS_NAME)"!="i386_win95" ) && ("$(SYS_NAME)"!="I386_WIN95" ))
72 PTSERVER_EXELIBS =$(PTSERVER_EXELIBS) $(DESTDIR)\lib\afs\afsprocmgmt.lib
73 !ENDIF
74
75
76 $(PTSERVER): $(PTSERVER_EXEOBJS) $(PTSERVER_EXELIBS)
77         $(EXECONLINK)
78         $(EXEPREP) 
79
80
81
82 ############################################################################
83 # build pts.exe
84
85 PTS = $(DESTDIR)\bin\pts.exe
86
87 PTS_EXEOBJS =\
88         pts.obj \
89         pts.res
90
91 PTS_EXELIBS =\
92         $(DESTDIR)\lib\afsubik.lib \
93         $(DESTDIR)\lib\afs\afsauth.lib \
94         $(DESTDIR)\lib\afsrxkad.lib \
95         $(DESTDIR)\lib\afsrx.lib \
96         $(DESTDIR)\lib\afslwp.lib \
97         $(DESTDIR)\lib\afsdes.lib \
98         $(DESTDIR)\lib\afs\afscom_err.lib \
99         $(DESTDIR)\lib\afs\afsutil.lib \
100         $(DESTDIR)\lib\afs\afsprot.lib \
101         $(DESTDIR)\lib\afs\afscmd.lib \
102         $(DESTDIR)\lib\afs\afsreg.lib \
103         $(DESTDIR)\lib\afs\afseventlog.lib \
104         $(DESTDIR)\lib\afs\afspioctl.lib \
105         $(DESTDIR)\lib\cm_dns.obj
106
107 $(PTS): $(PTS_EXEOBJS) $(PTS_EXELIBS) 
108         $(EXECONLINK)
109         $(EXEPREP) 
110
111
112
113 ############################################################################
114 # generate versioninfo resources
115
116 ptserver.res: ptserver.rc AFS_component_version_number.h
117         $(RC) $*.rc
118 pts.res: pts.rc AFS_component_version_number.h
119         $(RC) $*.rc
120
121 ############################################################################
122 # rxgen on pting.xg
123
124 ptint.ss.c ptint.cs.c ptint.xdr.c $(DESTDIR)\include\afs\ptint.h: ptint.xg
125         $(RXGEN) -x $**
126         $(COPY) ptint.h $(DESTDIR)\include\afs\ptint.h
127
128
129 ############################################################################
130 # Definitions for generating files via COMPILE_ET
131
132 $(DESTDIR)\include\afs\pterror.h pterror.c: pterror.et
133         $(DEL) pterror.h pterror.c
134         $(COMPILE_ET) pterror  -h pterror
135         $(COPY) pterror.h $(DESTDIR)\include\afs\pterror.h
136
137 ############################################################################
138 # install pts, ptserver and afsprot.lib
139
140 install: $(INCFILES) $(LIBFILE) $(PTSERVER) $(PTS) readgroup.exe \
141         readpwd.exe  testpt.exe db_verify.exe  \
142         $(DESTDIR)\root.server\usr\afs\bin\pts.exe \
143         $(INCFILEDIR)\afs\prserver.h $(INCFILEDIR)\afs\print.h \
144         $(INCFILEDIR)\afs\prerror.h $(INCFILEDIR)\afs\prclient.h
145
146 install9X: $(INCFILES) $(LIBFILE) $(PTS) \
147         $(DESTDIR)\root.server\usr\afs\bin\pts.exe \
148         $(INCFILEDIR)\afs\prserver.h $(INCFILEDIR)\afs\print.h \
149         $(INCFILEDIR)\afs\prerror.h $(INCFILEDIR)\afs\prclient.h
150
151 install_libutils: $(INCFILES) $(LIBFILE) $(PTS)
152
153 # install various exe's and header files
154 $(DESTDIR)\root.server\usr\afs\bin\pts.exe: $(PTS)
155         $(COPY) $(PTS) $(DESTDIR)\root.server\usr\afs\bin\pts.exe
156
157 $(INCFILEDIR)\afs\prserver.h: $(INCFILEDIR)\afs\ptserver.h
158         $(COPY) $(INCFILEDIR)\afs\ptserver.h $(INCFILEDIR)\afs\prserver.h
159
160 $(INCFILEDIR)\afs\print.h: $(INCFILEDIR)\afs\ptint.h 
161         $(COPY) $(INCFILEDIR)\afs\ptint.h    $(INCFILEDIR)\afs\print.h
162
163 $(INCFILEDIR)\afs\prerror.h: $(INCFILEDIR)\afs\pterror.h
164         $(COPY) $(INCFILEDIR)\afs\pterror.h  $(INCFILEDIR)\afs\prerror.h
165
166 $(INCFILEDIR)\afs\prclient.h: $(INCFILEDIR)\afs\ptclient.h
167         $(COPY) $(INCFILEDIR)\afs\ptclient.h $(INCFILEDIR)\afs\prclient.h
168         $(ECHO) #define ERROR_TABLE_BASE_pr ERROR_TABLE_BASE_PT >> $(INCFILEDIR)\afs\prclient.h
169
170 ############################################################################
171 # clean up
172
173 clean::
174         $(DEL) ptint.cs.c ptint.ss.c ptclient ptint.xdr.c ptint.h
175         $(DEL) readgroup.exe readpwd.exe db_verify.exe testpt.exe 
176         $(DEL) pterror.h pterror.c
177         $(DEL) $(PTS)
178
179 ############################################################################
180 # tests?
181 TEST_LIBS = $(PTS_EXELIBS)
182
183 readgroup.exe: readgroup.obj $(LIBFILE) $(TEST_LIBS)
184         $(EXECONLINK)
185
186 readpwd.exe: readpwd.obj $(LIBFILE) $(TEST_LIBS)
187         $(EXECONLINK)
188
189 testpt.exe: testpt.obj $(LIBFILE) $(TEST_LIBS)
190         $(EXECONLINK)
191
192 db_verify.exe: db_verify.obj pterror.obj display.obj $(LIBFILE) $(TEST_LIBS)
193         $(EXECONLINK)