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