Makefiles need to specify C99 mode consistently
[unleashed.git] / usr / src / test / crypto-tests / tests / modes / aes / Makefile.subdirs
blob1140bbf94388190556502398a5a83a955add7654
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.
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.
13 # Copyright (c) 2012 by Delphix. All rights reserved.
14 # Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
17 include $(SRC)/test/Makefile.com
19 CRYPTO = pkcs kcf
20 PROGS = $(CRYPTO:%=$(PROG)_%)
21 ROOTOPTPKG = $(ROOT)/opt/crypto-tests
22 TESTROOT = $(ROOTOPTPKG)/tests/#$(SUFFIX)/aes
23 TESTDIR = $(CRYPTO:%=$(TESTROOT)/%/aes)
25 COMMONDIR = ../../../common
26 OBJS_COMMON = testfuncs.o
27 OBJS_COMDIR = $(OBJS_COMMON:%=$(COMMONDIR)/%)
28 OBJS_LOCAL = $(PROG:%=%.o)
29 OBJS = $(OBJS_LOCAL) $(OBJS_COMDIR)
30 OBJS_PKCS = $(OBJS_LOCAL) $(OBJS_COMDIR) $(COMMONDIR)/cryptotest_pkcs.o
31 OBJS_KCF = $(OBJS_LOCAL) $(OBJS_COMDIR) $(COMMONDIR)/cryptotest_kcf.o
32 SRCS = $(OBJS:%.o=%.c)
33 PKCSLIBS = -lpkcs11 -lcryptoutil
35 CSTD = $(CSTD_GNU99)
37 CMDS = $(TESTDIR:%=%/$(PROG))
38 $(CMDS) := FILEMODE = 0555
40 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I$(COMMONDIR) -I$(SRC)/common/crypto/
42 all: $(PROGS)
44 $(PROG)_kcf: $(OBJS_KCF)
45         $(LINK.c) $(OBJS_KCF) -o $@ $(LDLIBS)
46         $(POST_PROCESS)
48 $(PROG)_pkcs: $(OBJS_PKCS)
49         $(LINK.c) $(OBJS_PKCS) -o $@ $(LDLIBS) $(PKCSLIBS)
50         $(POST_PROCESS)
53 $(COMMONDIR)/%.o:
55 %.o: %.c
56         $(COMPILE.c) -o $@ $<
58 install: all $(CMDS)
60 clobber: clean
61         -$(RM) $(PROGS)
63 clean:
64         -$(RM) $(OBJS_LOCAL)
66 $(CMDS): $(TESTDIR) $(PROGS)
68 $(TESTDIR):
69         $(INS.dir)
71 $(TESTROOT)/%/aes/$(PROG): $(PROG)_%
72         $(INS.rename)