xref: /illumos-gate/usr/src/test/util-tests/tests/libjedec/Makefile (revision 45ede40b2394db7967e59f19288fae9b62efd4aa)
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) 2018, Joyent, Inc.
14#
15
16include $(SRC)/Makefile.master
17
18ROOTOPTPKG = $(ROOT)/opt/util-tests
19TESTDIR = $(ROOTOPTPKG)/tests/
20
21PROGS = libjedec_test
22
23LINTS = $(PROGS:%=%.ln)
24
25include $(SRC)/cmd/Makefile.cmd
26include $(SRC)/test/Makefile.com
27
28CMDS = $(PROGS:%=$(TESTDIR)/%)
29$(CMDS) := FILEMODE = 0555
30
31#
32# Different tests require different sets of libraries. If we try and use
33# the same set, we'll get guidance errors from ld.
34#
35LDLIBS += -ljedec
36
37all: $(PROGS)
38
39install: all $(CMDS) $(OUTFILES)
40
41lint:
42
43clobber: clean
44	-$(RM) $(PROGS) $(LINTS)
45
46clean:
47
48$(CMDS): $(TESTDIR) $(PROG)
49
50$(TESTDIR):
51	$(INS.dir)
52
53$(TESTDIR)/%: %
54	$(INS.file)
55
56%: %.c
57	$(LINK.c) -o $@ $< $(LDLIBS)
58	$(POST_PROCESS)
59