Windows: Cleanup .exp .res .manifest and others
[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 !IF ($(AFSVER_CL) < 1400)
88 DEFFILE = TaAfsAppLib.def
89 !ELSE
90 DEFFILE = TaAfsAppLib2005.def
91 !ENDIF
92
93 # Since AfsAppLib links with TaAfsAdmSvrClient.lib--and both need stuff
94 # like the HashList code--we'll get lots of unnecessary 4049 warnings from
95 # the linker. Disable that complaint.
96
97 LOCALLINKFLAGS = -IGNORE:4049
98
99 # AfsAppLib needs to use an explicit .DEF file to get its entry points public
100
101 #LOCALLINKFLAGS = $(LOCALLINKFLAGS) /DEF:$(DEFFILE)
102 LOCALLINKFLAGS = $(LOCALLINKFLAGS)
103
104 # Also, AfsAppLib has a specific DLL entry-point which should be used
105
106 LOCALLINKFLAGS = $(LOCALLINKFLAGS) -entry:DllEntryPoint
107
108 ############################################################################
109
110 install :
111         @echo TaAfsAppLib.DLL is built automatically when building AfsAdmSvr
112         @echo (the two are related--AfsAppLib uses the AfsAdmSvr client library,
113         @echo and the AfsAdmSvr server executable uses the AfsAppLib DLL--
114         @echo and they must therefore be built in a specific order).
115         @echo.
116         @echo You do not need to build in the AfsAppLib directory explicitly.
117         @echo.
118
119 headers : $(INCFILES)
120
121 lang ::
122         $(CD) lang
123         for /f %l in ('dir /B ??_??') do @$(NTLANG) %l $(MAKECMD) /nologo /f NTMakefile install
124         $(CD) ..
125
126 primary : headers $(DLLFILE) lang
127
128 $(DLLFILE) : $(DLLOBJS) $(DLLLIBS)
129         $(DLLGUILINK) $(LOCALLINKFLAGS) $(VCLIBS)
130         $(_VC_MANIFEST_EMBED_DLL)
131         $(DLLPREP)
132         $(CODESIGN_USERLAND)
133         $(SYMSTORE_IMPORT)
134         $(COPY) $*.lib $(ILIBDIR)
135         $(DEL) $*.lib $*.exp
136
137 clean::
138         $(CD) lang
139         @if exist AFS_component_version_number.h del AFS_component_version_number.h
140         for /f %l in ('dir /B ??_??') do @$(NTLANG) %l $(MAKECMD) /nologo /f NTMakefile clean
141         $(CD) ..
142
143
144 ############################################################################
145 #
146 # Dependencies
147 #
148
149 $(OUT)\AfsAppLib_stub.res : AFS_component_version_number.h
150
151 mkdir:
152         -mkdir $(OUT)\lang
153         cd lang
154         nmake /nologo /f ntmakefile SRC=$(SRC) OBJ=$(OBJ) mkdir
155         cd ..
156