Merge 1.8.0~pre4 packaging into master
[pkg-k5-afs_openafs.git] / src / roken / NTMakefile
blob9a26e4eafa6d892823d2065a63675b6927c92842
1 # Copyright 2010, Your File System Inc
2 # All rights reserved
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
7 RELDIR=roken
8 !include ..\config\NTMakefile.$(SYS_NAME)
9 !include ..\config\NTMakefile.version
10 AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -DHAVE_CONFIG_H=1
12 ROKEN = $(SRC)\external\heimdal\roken
14 INCFILEDIR = $(DESTDIR)\include
16 INCFILES = \
17         $(INCFILEDIR)\err.h \
18         $(INCFILEDIR)\roken.h \
19         $(INCFILEDIR)\search.h
21 ROKEN_INCFILES = \
22         $(INCFILEDIR)\roken-common.h \
23         $(INCFILEDIR)\base64.h
25 LIBFILE = $(DESTDIR)\lib\afsroken.dll
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)\mkdir.obj \
44         $(OUT)\mkstemp.obj \
45         $(OUT)\net_read.obj \
46         $(OUT)\net_write.obj \
47         $(OUT)\realloc.obj \
48         $(OUT)\rename.obj \
49         $(OUT)\setprogname.obj \
50         $(OUT)\snprintf.obj \
51         $(OUT)\socket.obj \
52         $(OUT)\strerror_r.obj \
53         $(OUT)\strlcat.obj \
54         $(OUT)\strlcpy.obj \
55         $(OUT)\strnlen.obj \
56         $(OUT)\strsep.obj \
57         $(OUT)\tsearch.obj \
58         $(OUT)\verr.obj \
59         $(OUT)\verrx.obj \
60         $(OUT)\vwarn.obj \
61         $(OUT)\vwarnx.obj \
62         $(OUT)\warn.obj \
63         $(OUT)\warnerr.obj \
64         $(OUT)\warnx.obj \
65         $(OUT)\win32_alloc.obj
67 $(ROKEN_OBJS):$(ROKEN)\$$(@B).c
68         $(C2OBJ) $** -I$(ROKEN)
70 $(ROKEN_INCFILES):$(ROKEN)\$$(@B).h
71         $(COPY) $** $(INCFILEDIR)
73 $(INCFILES):$$(@B).h
74         $(COPY) $** $(INCFILEDIR)
76 RESFILE = $(OUT)\afsroken.res
78 $(RESFILE): afsroken.rc AFS_component_version_number.h
80 roken.h: $(ROKEN)\roken.h.in
81         $(COPY) $** $@
83 err.h: $(ROKEN)\err.hin
84         $(COPY) $** $@
86 search.h: $(ROKEN)\search.hin
87         $(COPY) $** $@
89 !if !defined(NMAKE)
90 NTMAKE = nmake /nologo /f ntmakefile
91 !endif
93 DLLLIBS = \
94 #       $(DESTDIR)\lib\afs\afsreg.lib
96 $(LIBFILE): $(ROKEN_OBJS) $(RESFILE) $(DLLLIBS)
97         $(DLLCONLINK) /DEF:afsroken.def shell32.lib
98         $(_VC_MANIFEST_EMBED_DLL)
99         $(DLLPREP)
100         $(CODESIGN_USERLAND)
101         $(SYMSTORE_IMPORT)
102         $(MAKECYGLIB) --input-def afsroken.def
104 # Definitions for generating versioninfo resources
105 $(OUT)\afsroken.res: AFS_component_version_number.h
107 install_headers: $(INCFILES) $(ROKEN_INCFILES)
109 install: install_headers $(LIBFILE)
111 clean::
112         $(DEL) $(INCFILES)
113         $(DEL) err.h roken.h search.h
114         $(DEL) $(LIBFILE) $(DESTDIR)\lib\afsroken.lib $(DESTDIR)\lib\afsroken.exp