Commit | Line | Data |
---|---|---|
805e021f CE |
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=crypto\hcrypto | |
8 | !include ..\..\config\NTMakefile.$(SYS_NAME) | |
9 | !include ..\..\config\NTMakefile.version | |
10 | AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -I$(SRC)\external\heimdal\hcrypto -DHAVE_CONFIG_H=1 -DKRB5 | |
11 | ||
12 | HCRYPTO = $(SRC)\external\heimdal\hcrypto | |
13 | ||
14 | INCFILEDIR = $(DESTDIR)\include\hcrypto | |
15 | ||
16 | INCFILES = \ | |
17 | $(INCFILEDIR)\engine.h | |
18 | ||
19 | HCRYPTO_INCFILES = \ | |
20 | $(INCFILEDIR)\aes.h \ | |
21 | $(INCFILEDIR)\des.h \ | |
22 | $(INCFILEDIR)\evp.h \ | |
23 | $(INCFILEDIR)\evp-hcrypto.h \ | |
24 | $(INCFILEDIR)\evp-cc.h \ | |
25 | $(INCFILEDIR)\hmac.h \ | |
26 | $(INCFILEDIR)\md2.h \ | |
27 | $(INCFILEDIR)\md4.h \ | |
28 | $(INCFILEDIR)\md5.h \ | |
29 | $(INCFILEDIR)\rand.h \ | |
30 | $(INCFILEDIR)\rc2.h \ | |
31 | $(INCFILEDIR)\rc4.h \ | |
32 | $(INCFILEDIR)\sha.h \ | |
33 | $(INCFILEDIR)\ui.h | |
34 | ||
35 | LIBFILE = $(DESTDIR)\lib\afshcrypto.dll | |
36 | ||
37 | # Object files by category. | |
38 | LOCAL_OBJS = \ | |
39 | $(OUT)\engine.obj | |
40 | ||
41 | HCRYPTO_OBJS = $(OUT)\aes.obj \ | |
42 | $(OUT)\camellia.obj \ | |
43 | $(OUT)\camellia-ntt.obj \ | |
44 | $(OUT)\des.obj \ | |
45 | $(OUT)\evp.obj \ | |
46 | $(OUT)\evp-hcrypto.obj \ | |
47 | $(OUT)\evp-cc.obj \ | |
48 | $(OUT)\hmac.obj \ | |
49 | $(OUT)\md2.obj \ | |
50 | $(OUT)\md4.obj \ | |
51 | $(OUT)\md5.obj \ | |
52 | $(OUT)\pkcs5.obj \ | |
53 | $(OUT)\rand.obj \ | |
54 | $(OUT)\rand-w32.obj \ | |
55 | $(OUT)\rc2.obj \ | |
56 | $(OUT)\rc4.obj \ | |
57 | $(OUT)\rijndael-alg-fst.obj \ | |
58 | $(OUT)\rnd_keys.obj \ | |
59 | $(OUT)\sha.obj \ | |
60 | $(OUT)\sha256.obj \ | |
61 | $(OUT)\sha512.obj \ | |
62 | $(OUT)\ui.obj \ | |
63 | $(OUT)\validate.obj | |
64 | ||
65 | # This is a horrible hack that is required to get | |
66 | # around the fact that the OpenAFS build system copies | |
67 | # its own des.h into the top-level OpenAFS include | |
68 | # directory. When the OpenAFS des implementation is | |
69 | # removed, this hack can be removed as well | |
70 | des.h: $(HCRYPTO)\des.h | |
71 | $(COPY) $** $@ | |
72 | ||
73 | $(HCRYPTO_OBJS):$(HCRYPTO)\$$(@B).c | |
74 | $(C2OBJ) $** -I$(HCRYPTO) | |
75 | ||
76 | $(HCRYPTO_INCFILES):$(HCRYPTO)\$$(@B).h | |
77 | $(COPY) $** $(INCFILEDIR) | |
78 | ||
79 | $(INCFILES):$$(@B).h | |
80 | $(COPY) $** $(INCFILEDIR) | |
81 | ||
82 | RESFILE = $(OUT)\afshcrypto.res | |
83 | ||
84 | $(RESFILE): afshcrypto.rc AFS_component_version_number.h | |
85 | ||
86 | !if !defined(NMAKE) | |
87 | NTMAKE = nmake /nologo /f ntmakefile | |
88 | !endif | |
89 | ||
90 | DLLLIBS = \ | |
91 | $(DESTDIR)\lib\afsroken.lib | |
92 | ||
93 | $(LIBFILE): $(LOCAL_OBJS) $(HCRYPTO_OBJS) $(RESFILE) $(DLLLIBS) | |
94 | $(DLLCONLINK) /DEF:afshcrypto.def shell32.lib | |
95 | $(_VC_MANIFEST_EMBED_DLL) | |
96 | $(DLLPREP) | |
97 | $(CODESIGN_USERLAND) | |
98 | $(SYMSTORE_IMPORT) | |
99 | $(MAKECYGLIB) --input-def afshcrypto.def | |
100 | ||
101 | # Definitions for generating versioninfo resources | |
102 | $(OUT)\afshcrypto.res: AFS_component_version_number.h | |
103 | ||
104 | install_headers: $(INCFILES) $(HCRYPTO_INCFILES) | |
105 | ||
106 | install: install_headers des.h $(LIBFILE) | |
107 | ||
108 | clean:: | |
109 | $(DEL) $(INCFILES) | |
110 | $(DEL) err.h des.h | |
111 | $(DEL) $(LIBFILE) $(DESTDIR)\lib\afshcrypto.lib $(DESTDIR)\lib\afshcrypto.exp |