1*a61ed2ceSHans Rosenfeld#
2*a61ed2ceSHans Rosenfeld# This file and its contents are supplied under the terms of the
3*a61ed2ceSHans Rosenfeld# Common Development and Distribution License ("CDDL"), version 1.0.
4*a61ed2ceSHans Rosenfeld# You may only use this file in accordance with the terms of version
5*a61ed2ceSHans Rosenfeld# 1.0 of the CDDL.
6*a61ed2ceSHans Rosenfeld#
7*a61ed2ceSHans Rosenfeld# A full copy of the text of the CDDL should have accompanied this
8*a61ed2ceSHans Rosenfeld# source.  A copy of the CDDL is also available via the Internet at
9*a61ed2ceSHans Rosenfeld# http://www.illumos.org/license/CDDL.
10*a61ed2ceSHans Rosenfeld#
11*a61ed2ceSHans Rosenfeld
12*a61ed2ceSHans Rosenfeld#
13*a61ed2ceSHans Rosenfeld# Copyright 2019, Joyent, Inc.
14*a61ed2ceSHans Rosenfeld#
15*a61ed2ceSHans Rosenfeld
16*a61ed2ceSHans Rosenfeldinclude $(SRC)/Makefile.master
17*a61ed2ceSHans Rosenfeld
18*a61ed2ceSHans RosenfeldROOTOPTPKG = $(ROOT)/opt/os-tests
19*a61ed2ceSHans RosenfeldTESTDIR = $(ROOTOPTPKG)/tests/uccid
20*a61ed2ceSHans Rosenfeld
21*a61ed2ceSHans RosenfeldPROGS =		\
22*a61ed2ceSHans Rosenfeld	atrparse	\
23*a61ed2ceSHans Rosenfeld	excl-basic	\
24*a61ed2ceSHans Rosenfeld	excl-badread	\
25*a61ed2ceSHans Rosenfeld	excl-close	\
26*a61ed2ceSHans Rosenfeld	excl-loop	\
27*a61ed2ceSHans Rosenfeld	excl-nonblock	\
28*a61ed2ceSHans Rosenfeld	excl-reset	\
29*a61ed2ceSHans Rosenfeld	modify		\
30*a61ed2ceSHans Rosenfeld	notxn-poll	\
31*a61ed2ceSHans Rosenfeld	status		\
32*a61ed2ceSHans Rosenfeld	pollin		\
33*a61ed2ceSHans Rosenfeld	pollout		\
34*a61ed2ceSHans Rosenfeld	txn-pollerr	\
35*a61ed2ceSHans Rosenfeld	yk		\
36*a61ed2ceSHans Rosenfeld	yk-poll		\
37*a61ed2ceSHans Rosenfeld	yk-readonly
38*a61ed2ceSHans Rosenfeld
39*a61ed2ceSHans RosenfeldCOMMON_OBJS = \
40*a61ed2ceSHans Rosenfeld	atr.o
41*a61ed2ceSHans Rosenfeld
42*a61ed2ceSHans Rosenfeldatrparse := EXTRA_OBJS = $(COMMON_OBJS)
43*a61ed2ceSHans Rosenfeld
44*a61ed2ceSHans Rosenfeldinclude $(SRC)/cmd/Makefile.cmd
45*a61ed2ceSHans Rosenfeldinclude $(SRC)/test/Makefile.com
46*a61ed2ceSHans Rosenfeld
47*a61ed2ceSHans RosenfeldCMDS = $(PROGS:%=$(TESTDIR)/%)
48*a61ed2ceSHans Rosenfeld$(CMDS) := FILEMODE = 0555
49*a61ed2ceSHans Rosenfeld
50*a61ed2ceSHans RosenfeldCPPFLAGS += -D_REENTRANT -I$(SRC)/common/ccid/
51*a61ed2ceSHans Rosenfeld
52*a61ed2ceSHans Rosenfeldall: $(PROGS)
53*a61ed2ceSHans Rosenfeld
54*a61ed2ceSHans Rosenfeldinstall: all $(CMDS)
55*a61ed2ceSHans Rosenfeld
56*a61ed2ceSHans Rosenfeldclobber: clean
57*a61ed2ceSHans Rosenfeld	-$(RM) $(PROGS)
58*a61ed2ceSHans Rosenfeld
59*a61ed2ceSHans Rosenfeldclean:
60*a61ed2ceSHans Rosenfeld	-$(RM) *.o
61*a61ed2ceSHans Rosenfeld
62*a61ed2ceSHans Rosenfeld$(PROGS): $(COMMON_OBJS)
63*a61ed2ceSHans Rosenfeld
64*a61ed2ceSHans Rosenfeld$(CMDS): $(TESTDIR) $(PROGS)
65*a61ed2ceSHans Rosenfeld
66*a61ed2ceSHans Rosenfeld$(TESTDIR):
67*a61ed2ceSHans Rosenfeld	$(INS.dir)
68*a61ed2ceSHans Rosenfeld
69*a61ed2ceSHans Rosenfeld$(TESTDIR)/%: %
70*a61ed2ceSHans Rosenfeld	$(INS.file)
71*a61ed2ceSHans Rosenfeld
72*a61ed2ceSHans Rosenfeld%.o: $(SRC)/common/ccid/%.c
73*a61ed2ceSHans Rosenfeld	$(COMPILE.c) -o $@ -c $<
74*a61ed2ceSHans Rosenfeld	$(POST_PROCESS_O)
75*a61ed2ceSHans Rosenfeld
76*a61ed2ceSHans Rosenfeld%.o: %.c
77*a61ed2ceSHans Rosenfeld	$(COMPILE.c) -o $@ -c $<
78*a61ed2ceSHans Rosenfeld	$(POST_PROCESS_O)
79*a61ed2ceSHans Rosenfeld
80*a61ed2ceSHans Rosenfeld%: %.o
81*a61ed2ceSHans Rosenfeld	$(LINK.c) -o $@ $< $(EXTRA_OBJS) $(LDLIBS)
82*a61ed2ceSHans Rosenfeld	$(POST_PROCESS)