Windows: export roken symbols
[openafs.git] / src / roken / NTMakefile
1 # Copyright 2010, Your File System Inc
2 # All rights reserved
3 #
4 # This software has been released under the terms of the BSD License
5 # For details, see the LICENSE file in the top level source directory
6
7 RELDIR=roken
8 !include ..\config\NTMakefile.$(SYS_NAME)
9 !include ..\config\NTMakefile.version
10 AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -DHAVE_CONFIG_H=1
11
12 ROKEN = $(SRC)\external\heimdal\roken
13
14 INCFILEDIR = $(DESTDIR)\include
15
16 INCFILES = \
17         $(INCFILEDIR)\err.h \
18         $(INCFILEDIR)\roken.h
19
20 ROKEN_INCFILES = \
21         $(INCFILEDIR)\roken-common.h \
22         $(INCFILEDIR)\base64.h
23
24 LIBFILE = $(DESTDIR)\lib\afsroken.dll
25
26 ROKEN_OBJS = \
27         $(OUT)\base64.obj \
28         $(OUT)\cloexec.obj \
29         $(OUT)\ct.obj \
30         $(OUT)\ecalloc.obj \
31         $(OUT)\emalloc.obj \
32         $(OUT)\erealloc.obj \
33         $(OUT)\err.obj \
34         $(OUT)\errx.obj \
35         $(OUT)\getopt.obj \
36         $(OUT)\getprogname.obj \
37         $(OUT)\hex.obj \
38         $(OUT)\issuid.obj \
39         $(OUT)\localtime_r.obj \
40         $(OUT)\mkstemp.obj \
41         $(OUT)\net_read.obj \
42         $(OUT)\net_write.obj \
43         $(OUT)\snprintf.obj \
44         $(OUT)\socket.obj \
45         $(OUT)\strerror_r.obj \
46         $(OUT)\strlcat.obj \
47         $(OUT)\strlcpy.obj \
48         $(OUT)\strnlen.obj \
49         $(OUT)\strsep.obj \
50         $(OUT)\verr.obj \
51         $(OUT)\verrx.obj \
52         $(OUT)\vwarn.obj \
53         $(OUT)\vwarnx.obj \
54         $(OUT)\warn.obj \
55         $(OUT)\warnerr.obj \
56         $(OUT)\warnx.obj
57
58 $(ROKEN_OBJS):$(ROKEN)\$$(@B).c
59         $(C2OBJ) $** -I$(ROKEN)
60
61 $(ROKEN_INCFILES):$(ROKEN)\$$(@B).h
62         $(COPY) $** $(INCFILEDIR)
63
64 $(INCFILES):$$(@B).h
65         $(COPY) $** $(INCFILEDIR)
66
67 roken.h: $(ROKEN)\roken.h.in
68         $(COPY) $** $@
69
70 err.h: $(ROKEN)\err.hin
71         $(COPY) $** $@
72
73 !if !defined(NMAKE)
74 NTMAKE = nmake /nologo /f ntmakefile
75 !endif
76
77 DLLLIBS = \
78 #       $(DESTDIR)\lib\afs\afsreg.lib
79
80 $(LIBFILE): $(ROKEN_OBJS) $(DLLLIBS)
81         $(DLLCONLINK) /DEF:afsroken.def shell32.lib
82         $(_VC_MANIFEST_EMBED_DLL)
83         $(DLLPREP)
84         $(CODESIGN_USERLAND)
85         $(SYMSTORE_IMPORT)
86         $(MAKECYGLIB) --input-def afsroken.def
87
88 # Definitions for generating versioninfo resources
89 $(OUT)\afsroken.res: AFS_component_version_number.h
90
91 install_headers: $(INCFILES) $(ROKEN_INCFILES)
92
93 install: install_headers $(LIBFILE)
94
95 clean::
96         $(DEL) $(INCFILES)
97         $(DEL) err.h roken.h
98         $(DEL) $(LIBFILE) $(DESTDIR)\lib\afsroken.lib $(DESTDIR)\lib\afsroken.exp