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 2019, Joyent, Inc. 14# Copyright 2024 Oxide Computer Company 15# 16 17include $(SRC)/Makefile.master 18 19ROOTOPTPKG = $(ROOT)/opt/os-tests 20TESTDIR = $(ROOTOPTPKG)/tests/uccid 21 22PROGS = \ 23 atrparse \ 24 excl-basic \ 25 excl-badread \ 26 excl-close \ 27 excl-loop \ 28 excl-nonblock \ 29 excl-reset \ 30 modify \ 31 notxn-poll \ 32 status \ 33 pollin \ 34 pollout \ 35 txn-pollerr \ 36 yk \ 37 yk-poll \ 38 yk-readonly 39 40COMMON_OBJS = \ 41 atr.o \ 42 $(HEXDUMP_OBJS) 43 44atrparse := EXTRA_OBJS = $(COMMON_OBJS) 45 46include $(SRC)/cmd/Makefile.cmd 47include $(SRC)/test/Makefile.com 48include $(SRC)/common/hexdump/Makefile.com 49 50CMDS = $(PROGS:%=$(TESTDIR)/%) 51$(CMDS) := FILEMODE = 0555 52 53CPPFLAGS += -D_REENTRANT -I$(SRC)/common/ccid/ 54 55all: $(PROGS) 56 57install: all $(CMDS) 58 59clobber: clean 60 -$(RM) $(PROGS) 61 62clean: 63 -$(RM) *.o 64 65$(PROGS): $(COMMON_OBJS) 66 67$(CMDS): $(TESTDIR) $(PROGS) 68 69$(TESTDIR): 70 $(INS.dir) 71 72$(TESTDIR)/%: % 73 $(INS.file) 74 75%.o: $(SRC)/common/ccid/%.c 76 $(COMPILE.c) -o $@ -c $< 77 $(POST_PROCESS_O) 78 79%.o: %.c 80 $(COMPILE.c) -o $@ -c $< 81 $(POST_PROCESS_O) 82 83%: %.o 84 $(LINK.c) -o $@ $< $(EXTRA_OBJS) $(LDLIBS) 85 $(POST_PROCESS) 86 87include $(SRC)/common/hexdump/Makefile.targ 88