5337e9f911c46524e87c7b1dcca7182cff5b2297
[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
23 LIBFILE = $(DESTDIR)\lib\afsroken.dll
24
25 ROKEN_OBJS = \
26         $(OUT)\cloexec.obj \
27         $(OUT)\ct.obj \
28         $(OUT)\ecalloc.obj \
29         $(OUT)\emalloc.obj \
30         $(OUT)\erealloc.obj \
31         $(OUT)\err.obj \
32         $(OUT)\errx.obj \
33         $(OUT)\getopt.obj \
34         $(OUT)\getprogname.obj \
35         $(OUT)\hex.obj \
36         $(OUT)\issuid.obj \
37         $(OUT)\localtime_r.obj \
38         $(OUT)\net_read.obj \
39         $(OUT)\net_write.obj \
40         $(OUT)\snprintf.obj \
41         $(OUT)\socket.obj \
42         $(OUT)\strerror_r.obj \
43         $(OUT)\strlcat.obj \
44         $(OUT)\strlcpy.obj \
45         $(OUT)\strnlen.obj \
46         $(OUT)\verr.obj \
47         $(OUT)\verrx.obj \
48         $(OUT)\vwarn.obj \
49         $(OUT)\vwarnx.obj \
50         $(OUT)\warn.obj \
51         $(OUT)\warnerr.obj \
52         $(OUT)\warnx.obj
53
54 $(ROKEN_OBJS):$(ROKEN)\$$(@B).c
55         $(C2OBJ) $** -I$(ROKEN)
56
57 $(ROKEN_INCFILES):$(ROKEN)\$$(@B).h
58         $(COPY) $** $(INCFILEDIR)
59
60 $(INCFILES):$$(@B).h
61         $(COPY) $** $(INCFILEDIR)
62
63 roken.h: $(ROKEN)\roken.h.in
64         $(COPY) $** $@
65
66 err.h: $(ROKEN)\err.hin
67         $(COPY) $** $@
68
69 !if !defined(NMAKE)
70 NTMAKE = nmake /nologo /f ntmakefile
71 !endif
72
73 DLLLIBS = \
74 #       $(DESTDIR)\lib\afs\afsreg.lib
75
76 $(LIBFILE): $(ROKEN_OBJS) $(DLLLIBS)
77         $(DLLCONLINK) /DEF:afsroken.def shell32.lib
78         $(_VC_MANIFEST_EMBED_DLL)
79         $(DLLPREP)
80         $(CODESIGN_USERLAND)
81         $(SYMSTORE_IMPORT)
82         $(MAKECYGLIB) --input-def afsroken.def
83
84 # Definitions for generating versioninfo resources
85 $(OUT)\afsroken.res: AFS_component_version_number.h
86
87 install_headers: $(INCFILES) $(ROKEN_INCFILES)
88
89 install: install_headers $(LIBFILE)
90
91 clean::
92         $(DEL) $(INCFILES)
93         $(DEL) err.h
94         $(DEL) $(LIBFILE) $(DESTDIR)\lib\afsroken.lib $(DESTDIR)\lib\afsroken.exp