xref: /titanic_52/usr/src/test/util-tests/tests/libjedec/Makefile (revision 174bc6499d233e329ecd3d98a880a7b07df16bfa)
1*174bc649SRobert Mustacchi#
2*174bc649SRobert Mustacchi# This file and its contents are supplied under the terms of the
3*174bc649SRobert Mustacchi# Common Development and Distribution License ("CDDL"), version 1.0.
4*174bc649SRobert Mustacchi# You may only use this file in accordance with the terms of version
5*174bc649SRobert Mustacchi# 1.0 of the CDDL.
6*174bc649SRobert Mustacchi#
7*174bc649SRobert Mustacchi# A full copy of the text of the CDDL should have accompanied this
8*174bc649SRobert Mustacchi# source.  A copy of the CDDL is also available via the Internet at
9*174bc649SRobert Mustacchi# http://www.illumos.org/license/CDDL.
10*174bc649SRobert Mustacchi#
11*174bc649SRobert Mustacchi
12*174bc649SRobert Mustacchi#
13*174bc649SRobert Mustacchi# Copyright (c) 2018, Joyent, Inc.
14*174bc649SRobert Mustacchi#
15*174bc649SRobert Mustacchi
16*174bc649SRobert Mustacchiinclude $(SRC)/Makefile.master
17*174bc649SRobert Mustacchi
18*174bc649SRobert MustacchiROOTOPTPKG = $(ROOT)/opt/util-tests
19*174bc649SRobert MustacchiTESTDIR = $(ROOTOPTPKG)/tests/
20*174bc649SRobert Mustacchi
21*174bc649SRobert MustacchiPROGS = libjedec_test
22*174bc649SRobert Mustacchi
23*174bc649SRobert MustacchiLINTS = $(PROGS:%=%.ln)
24*174bc649SRobert Mustacchi
25*174bc649SRobert Mustacchiinclude $(SRC)/cmd/Makefile.cmd
26*174bc649SRobert Mustacchiinclude $(SRC)/test/Makefile.com
27*174bc649SRobert Mustacchi
28*174bc649SRobert MustacchiCMDS = $(PROGS:%=$(TESTDIR)/%)
29*174bc649SRobert Mustacchi$(CMDS) := FILEMODE = 0555
30*174bc649SRobert Mustacchi
31*174bc649SRobert Mustacchi#
32*174bc649SRobert Mustacchi# Different tests require different sets of libraries. If we try and use
33*174bc649SRobert Mustacchi# the same set, we'll get guidance errors from ld.
34*174bc649SRobert Mustacchi#
35*174bc649SRobert MustacchiLDLIBS += -ljedec
36*174bc649SRobert Mustacchi
37*174bc649SRobert Mustacchiall: $(PROGS)
38*174bc649SRobert Mustacchi
39*174bc649SRobert Mustacchiinstall: all $(CMDS) $(OUTFILES)
40*174bc649SRobert Mustacchi
41*174bc649SRobert Mustacchilint:
42*174bc649SRobert Mustacchi
43*174bc649SRobert Mustacchiclobber: clean
44*174bc649SRobert Mustacchi	-$(RM) $(PROGS) $(LINTS)
45*174bc649SRobert Mustacchi
46*174bc649SRobert Mustacchiclean:
47*174bc649SRobert Mustacchi
48*174bc649SRobert Mustacchi$(CMDS): $(TESTDIR) $(PROG)
49*174bc649SRobert Mustacchi
50*174bc649SRobert Mustacchi$(TESTDIR):
51*174bc649SRobert Mustacchi	$(INS.dir)
52*174bc649SRobert Mustacchi
53*174bc649SRobert Mustacchi$(TESTDIR)/%: %
54*174bc649SRobert Mustacchi	$(INS.file)
55*174bc649SRobert Mustacchi
56*174bc649SRobert Mustacchi%: %.c
57*174bc649SRobert Mustacchi	$(LINK.c) -o $@ $< $(LDLIBS)
58*174bc649SRobert Mustacchi	$(POST_PROCESS)
59