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