e4503835b8182f43effa648864e5065d7c9898e5
[openafs.git] / src / WINNT / afsapplib / 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 # indicate that the functions in this library should be exported
9
10 AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -DEXPORT_AFSAPPLIB -DEXPORTED=_declspec(dllexport)
11
12 # include the primary makefile
13
14 RELDIR=WINNT\afsapplib
15 !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME)
16 !INCLUDE ..\..\config\NTMakefile.version
17
18 ############################################################################
19
20 INCFILEDIR = $(DESTDIR)\include\WINNT
21
22 ILIBDIR = $(DESTDIR)\lib\afs
23
24 INCFILES = \
25         $(INCFILEDIR)\afsapplib.h \
26         $(INCFILEDIR)\al_admsvr.h \
27         $(INCFILEDIR)\al_dynlink.h \
28         $(INCFILEDIR)\al_messages.h \
29         $(INCFILEDIR)\al_progress.h \
30         $(INCFILEDIR)\al_resource.h \
31         $(INCFILEDIR)\al_wizard.h \
32         $(INCFILEDIR)\checklist.h \
33         $(INCFILEDIR)\ctl_date.h \
34         $(INCFILEDIR)\ctl_elapsed.h \
35         $(INCFILEDIR)\ctl_sockaddr.h \
36         $(INCFILEDIR)\ctl_spinner.h \
37         $(INCFILEDIR)\ctl_time.h \
38         $(INCFILEDIR)\dialog.h \
39         $(INCFILEDIR)\fastlist.h \
40         $(INCFILEDIR)\hashlist.h \
41         $(INCFILEDIR)\regexp.h \
42         $(INCFILEDIR)\resize.h \
43         $(INCFILEDIR)\settings.h \
44         $(INCFILEDIR)\subclass.h
45
46 DLLOBJS = \
47         $(OUT)\afsapplib_stub.res \
48         $(OUT)\afsapplib.obj \
49         $(OUT)\al_admsvr.obj \
50         $(OUT)\al_browse.obj \
51         $(OUT)\al_browseset.obj \
52         $(OUT)\al_cover.obj \
53         $(OUT)\al_creds.obj \
54         $(OUT)\al_dynlink.obj \
55         $(OUT)\al_error.obj \
56         $(OUT)\al_help.obj \
57         $(OUT)\al_misc.obj \
58         $(OUT)\al_progress.obj \
59         $(OUT)\al_pump.obj \
60         $(OUT)\al_task.obj \
61         $(OUT)\al_wizard.obj \
62         $(OUT)\checklist.obj \
63         $(OUT)\ctl_date.obj \
64         $(OUT)\ctl_elapsed.obj \
65         $(OUT)\ctl_sockaddr.obj \
66         $(OUT)\ctl_spinner.obj \
67         $(OUT)\ctl_time.obj \
68         $(OUT)\dialog.obj \
69         $(OUT)\fastlist.obj \
70         $(OUT)\hashlist.obj \
71         $(OUT)\regexp.obj \
72         $(OUT)\resize.obj \
73         $(OUT)\settings.obj \
74         $(OUT)\subclass.obj
75
76 VCLIBS =\
77         comctl32.lib \
78         rpcrt4.lib \
79         rpcns4.lib \
80
81 DLLLIBS = \
82         $(DESTDIR)\lib\afs\TaAfsAdmSvrClient.lib \
83         $(DESTDIR)\lib\afs\TaLocale.lib
84
85 DLLFILE = $(DESTDIR)\root.server\usr\afs\bin\TaAfsAppLib.dll
86
87
88 # Since AfsAppLib links with TaAfsAdmSvrClient.lib--and both need stuff
89 # like the HashList code--we'll get lots of unnecessary 4049 warnings from
90 # the linker. Disable that complaint.
91
92 LOCALLINKFLAGS = -IGNORE:4049
93
94 # AfsAppLib needs to use an explicit .DEF file to get its entry points public
95
96 LOCALLINKFLAGS = $(LOCALLINKFLAGS) /DEF:TaAfsAppLib.def
97
98 # Also, AfsAppLib has a specific DLL entry-point which should be used
99
100 LOCALLINKFLAGS = $(LOCALLINKFLAGS) -entry:DllEntryPoint
101
102 ############################################################################
103
104 install :
105         @echo TaAfsAppLib.DLL is built automatically when building AfsAdmSvr
106         @echo (the two are related--AfsAppLib uses the AfsAdmSvr client library,
107         @echo and the AfsAdmSvr server executable uses the AfsAppLib DLL--
108         @echo and they must therefore be built in a specific order).
109         @echo.
110         @echo You do not need to build in the AfsAppLib directory explicitly.
111         @echo.
112
113 headers : $(INCFILES)
114
115 lang ::
116         $(CD) lang
117         for /f %l in ('dir /B ??_??') do @$(NTLANG) %l $(MAKECMD) /nologo /f NTMakefile install
118         $(CD) ..
119
120 primary : headers $(DLLFILE) lang
121
122 $(DLLFILE) : $(DLLOBJS) $(DLLLIBS)
123         $(DLLGUILINK) $(LOCALLINKFLAGS) $(VCLIBS)
124         $(DLLPREP)
125         $(COPY) $*.lib $(ILIBDIR)
126         $(DEL) $*.lib $*.exp
127
128 clean::
129
130
131 ############################################################################
132 #
133 # Dependencies
134 #
135
136 $(OUT)\AfsAppLib_stub.res : AFS_component_version_number.h
137
138 mkdir:
139         -mkdir $(OUT)\lang
140         cd lang
141         nmake /nologo /f ntmakefile SRC=$(SRC) OBJ=$(OBJ) mkdir
142         cd ..
143