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