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) 2015 Joyent, Inc. 14# 15 16include $(SRC)/Makefile.master 17 18ROOTOPTPKG = $(ROOT)/opt/libc-tests 19TESTDIR = $(ROOTOPTPKG)/tests/random 20ROOTBINDIR = $(ROOTOPTPKG)/bin 21 22PROGS = arc4random \ 23 arc4random_prefork \ 24 arc4random_fork \ 25 arc4random_preforkall \ 26 arc4random_forkall \ 27 arc4random_preforksig \ 28 arc4random_forksig \ 29 arc4random_rekey \ 30 chacha \ 31 getentropy \ 32 getrandom \ 33 inz_child \ 34 inz_inval \ 35 inz_mlock \ 36 inz_region \ 37 inz_split \ 38 inz_split_vpp \ 39 inz_vpp 40 41SCRIPTS = arc4key.ksh 42 43include $(SRC)/cmd/Makefile.cmd 44include $(SRC)/test/Makefile.com 45 46CMDS = $(PROGS:%=$(TESTDIR)/%) $(SCRIPTS:%=$(TESTDIR)/%) 47$(CMDS) := FILEMODE = 0555 48 49all: $(PROGS) 50 51install: all $(CMDS) 52 53lint: 54 55clobber: clean 56 -$(RM) $(PROGS) 57 58clean: 59 -$(RM) *.o 60 61$(CMDS): $(TESTDIR) $(PROGS) 62 63arc4random_prefork: arc4random_fork.c 64 $(LINK.c) -o $@ -DARC4_PREINIT=1 arc4random_fork.c $(LDLIBS) 65 $(POST_PROCESS) 66 67arc4random_preforkall: arc4random_forkall.c 68 $(LINK.c) -o $@ -DARC4_PREINIT=1 arc4random_forkall.c $(LDLIBS) 69 $(POST_PROCESS) 70 71arc4random_preforksig: arc4random_forksig.c 72 $(LINK.c) -o $@ -DARC4_PREINIT=1 arc4random_forksig.c $(LDLIBS) 73 $(POST_PROCESS) 74 75chacha: chacha_tv.c 76 $(COMPILE.c) -DKEYSTREAM_ONLY -I$(SRC)/common/crypto/chacha -o chacha.o -c $(SRC)/common/crypto/chacha/chacha.c 77 $(COMPILE.c) -I$(SRC)/common/crypto/chacha -o chacha_tv.o -c chacha_tv.c 78 $(LINK.c) -o $@ chacha_tv.o chacha.o $(LDLIBS) 79 $(POST_PROCESS) 80 81$(ROOTBINDIR): 82 $(INS.dir) 83 84$(ROOTBINDIR)/%: % 85 $(INS.file) 86 87$(TESTDIR): 88 $(INS.dir) 89 90$(TESTDIR)/%: % 91 $(INS.file) 92 93$(TESTDIR)/%: % 94 $(INS.file) 95