1 #
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
5 # 1.0 of the CDDL.
6 #
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
10 #
11
12 #
13 # Copyright (c) 2012 by Delphix. All rights reserved.
14 # Copyright 2015 Nexenta Systems, Inc. All rights reserved.
15 # Copyright 2019 Joyent, Inc.
16 #
17
18 include $(SRC)/cmd/Makefile.cmd
19 include $(SRC)/test/Makefile.com
20 include $(SRC)/cmd/Makefile.ctf
21
22 PROGS_32 = $(CRYPTO:%=$(BASEPROG)_32_%)
23 PROGS_64 = $(CRYPTO:%=$(BASEPROG)_64_%)
24 PROGS = $(PROGS_32) $(PROGS_64)
25
26 COMMON_OBJS_32 = $(COMMON_OBJS:%.o=%.32.o)
27 COMMON_OBJS_64 = $(COMMON_OBJS:%.o=%.64.o)
28
29 # Some tests may only be relevant for PKCS#11 or KCF. One can use
30 # a statement like 'CRYPTO_kcf = $(POUND_SIGN)' in a test's Makefile to
31 # disable creation of tests for a given framework. For an example, see
32 # modes/aes/cbc_pad/Makefile
33 $(CRYPTO_pkcs)PROGS_pkcs = $(BASEPROG:%=%_32_pkcs) $(BASEPROG:%=%_64_pkcs)
34 $(CRYPTO_kcf)PROGS_kcf = $(BASEPROG:%=%_32_kcf) $(BASEPROG:%=%_64_kcf)
35
75 $(POST_PROCESS)
76
77 %_64_kcf: %.64.o $(COMMON_OBJS_64)
78 $(LINK64.c) $(OBJS) -o $@ $(LDLIBS)
79 $(POST_PROCESS)
80
81 %.32.o: %.c
82 $(COMPILE.c) -o $@ $<
83 $(POST_PROCESS_O)
84
85 %.64.o: %.c
86 $(COMPILE64.c) -o $@ $<
87 $(POST_PROCESS_O)
88
89 install: all $(CMDS)
90
91 clobber: clean
92 -$(RM) $(PROGS)
93
94 clean:
95 -$(RM) *.o $(COMMON_OBJS_32) $(COMMON_OBJS_64)
96
97 $(CMDS): $(TESTDIR_pkcs) $(TESTDIR_kcf) $(PROGS)
98
99 $(TESTDIR_pkcs) $(TESTDIR_kcf):
100 $(INS.dir)
101
102 $(TESTDIR_pkcs)/%_32: %_32_pkcs
103 $(INS.rename)
104
105 $(TESTDIR_pkcs)/%_64: %_64_pkcs
106 $(INS.rename)
107
108 $(TESTDIR_kcf)/%_32: %_32_kcf
109 $(INS.rename)
110
111 $(TESTDIR_kcf)/%_64: %_64_kcf
112 $(INS.rename)
|
1 #
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
5 # 1.0 of the CDDL.
6 #
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
10 #
11
12 #
13 # Copyright (c) 2012 by Delphix. All rights reserved.
14 # Copyright 2015 Nexenta Systems, Inc. All rights reserved.
15 # Copyright 2019 Joyent, Inc.
16 # Copyright 2020 Oxide Computer Company
17 #
18
19 include $(SRC)/cmd/Makefile.cmd
20 include $(SRC)/test/Makefile.com
21 include $(SRC)/cmd/Makefile.ctf
22
23 PROGS_32 = $(CRYPTO:%=$(BASEPROG)_32_%)
24 PROGS_64 = $(CRYPTO:%=$(BASEPROG)_64_%)
25 PROGS = $(PROGS_32) $(PROGS_64)
26
27 COMMON_OBJS_32 = $(COMMON_OBJS:%.o=%.32.o)
28 COMMON_OBJS_64 = $(COMMON_OBJS:%.o=%.64.o)
29
30 # Some tests may only be relevant for PKCS#11 or KCF. One can use
31 # a statement like 'CRYPTO_kcf = $(POUND_SIGN)' in a test's Makefile to
32 # disable creation of tests for a given framework. For an example, see
33 # modes/aes/cbc_pad/Makefile
34 $(CRYPTO_pkcs)PROGS_pkcs = $(BASEPROG:%=%_32_pkcs) $(BASEPROG:%=%_64_pkcs)
35 $(CRYPTO_kcf)PROGS_kcf = $(BASEPROG:%=%_32_kcf) $(BASEPROG:%=%_64_kcf)
36
76 $(POST_PROCESS)
77
78 %_64_kcf: %.64.o $(COMMON_OBJS_64)
79 $(LINK64.c) $(OBJS) -o $@ $(LDLIBS)
80 $(POST_PROCESS)
81
82 %.32.o: %.c
83 $(COMPILE.c) -o $@ $<
84 $(POST_PROCESS_O)
85
86 %.64.o: %.c
87 $(COMPILE64.c) -o $@ $<
88 $(POST_PROCESS_O)
89
90 install: all $(CMDS)
91
92 clobber: clean
93 -$(RM) $(PROGS)
94
95 clean:
96 -$(RM) *.o $(COMMON_OBJS_32) $(COMMON_OBJS_64) $(PROGS)
97
98 $(CMDS): $(TESTDIR_pkcs) $(TESTDIR_kcf) $(PROGS)
99
100 $(TESTDIR_pkcs) $(TESTDIR_kcf):
101 $(INS.dir)
102
103 $(TESTDIR_pkcs)/%_32: %_32_pkcs
104 $(INS.rename)
105
106 $(TESTDIR_pkcs)/%_64: %_64_pkcs
107 $(INS.rename)
108
109 $(TESTDIR_kcf)/%_32: %_32_kcf
110 $(INS.rename)
111
112 $(TESTDIR_kcf)/%_64: %_64_kcf
113 $(INS.rename)
|