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