1*c5591576SRob Johnston#
2*c5591576SRob Johnston# This file and its contents are supplied under the terms of the
3*c5591576SRob Johnston# Common Development and Distribution License ("CDDL"), version 1.0.
4*c5591576SRob Johnston# You may only use this file in accordance with the terms of version
5*c5591576SRob Johnston# 1.0 of the CDDL.
6*c5591576SRob Johnston#
7*c5591576SRob Johnston# A full copy of the text of the CDDL should have accompanied this
8*c5591576SRob Johnston# source.  A copy of the CDDL is also available via the Internet at
9*c5591576SRob Johnston# http://www.illumos.org/license/CDDL.
10*c5591576SRob Johnston#
11*c5591576SRob Johnston
12*c5591576SRob Johnston#
13*c5591576SRob Johnston# Copyright 2020 Joyent, Inc.
14*c5591576SRob Johnston#
15*c5591576SRob Johnston
16*c5591576SRob Johnstoninclude $(SRC)/Makefile.master
17*c5591576SRob Johnston
18*c5591576SRob JohnstonROOTOPTPKG = $(ROOT)/opt/os-tests
19*c5591576SRob JohnstonTESTDIR = $(ROOTOPTPKG)/tests/libtopo
20*c5591576SRob Johnston
21*c5591576SRob JohnstonPROGS = digraph-test
22*c5591576SRob Johnston
23*c5591576SRob JohnstonXML =	digraph-test-in.xml \
24*c5591576SRob Johnston	digraph-test-in-badscheme.xml \
25*c5591576SRob Johnston	digraph-test-in-badnum.xml \
26*c5591576SRob Johnston	digraph-test-in-badedge.xml \
27*c5591576SRob Johnston	digraph-test-in-badelement.xml
28*c5591576SRob Johnston
29*c5591576SRob Johnstoninclude $(SRC)/cmd/Makefile.cmd
30*c5591576SRob Johnstoninclude $(SRC)/test/Makefile.com
31*c5591576SRob Johnston
32*c5591576SRob JohnstonLDLIBS += -L$(ROOT)/usr/lib/fm -ltopo -R/usr/lib/fm
33*c5591576SRob JohnstonCFLAGS += -I$(SRC)/lib/fm/topo/libtopo/
34*c5591576SRob JohnstonCSTD= $(CSTD_GNU99)
35*c5591576SRob Johnston
36*c5591576SRob JohnstonCMDS = $(PROGS:%=$(TESTDIR)/%)
37*c5591576SRob Johnston$(CMDS) := FILEMODE = 0555
38*c5591576SRob Johnston
39*c5591576SRob JohnstonFILES = $(XML:%=$(TESTDIR)/%)
40*c5591576SRob Johnston$(FILES) := FILEMODE = 0444
41*c5591576SRob Johnston
42*c5591576SRob Johnstonall: $(PROGS)
43*c5591576SRob Johnston
44*c5591576SRob Johnstoninstall: all $(CMDS) $(FILES)
45*c5591576SRob Johnston
46*c5591576SRob Johnstonclobber: clean
47*c5591576SRob Johnston	-$(RM) $(PROGS) $(FILES)
48*c5591576SRob Johnston
49*c5591576SRob Johnstonclean:
50*c5591576SRob Johnston	-$(RM) *.o
51*c5591576SRob Johnston
52*c5591576SRob Johnston$(CMDS): $(TESTDIR) $(PROGS)
53*c5591576SRob Johnston
54*c5591576SRob Johnston$(TESTDIR):
55*c5591576SRob Johnston	$(INS.dir)
56*c5591576SRob Johnston
57*c5591576SRob Johnston$(TESTDIR)/%: %
58*c5591576SRob Johnston	$(INS.file)
59