xref: /illumos-gate/usr/src/test/os-tests/tests/libtopo/Makefile (revision b30d193948be5a7794d7ae3ba0ed9c2f72c88e0f)
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 2020 Joyent, Inc.
14#
15
16include $(SRC)/Makefile.master
17
18ROOTOPTPKG = $(ROOT)/opt/os-tests
19TESTDIR = $(ROOTOPTPKG)/tests/libtopo
20
21PROGS = digraph-test
22
23XML =	digraph-test-in.xml \
24	digraph-test-in-badscheme.xml \
25	digraph-test-in-badnum.xml \
26	digraph-test-in-badedge.xml \
27	digraph-test-in-badelement.xml
28
29include $(SRC)/cmd/Makefile.cmd
30include $(SRC)/test/Makefile.com
31
32LDLIBS += -L$(ROOT)/usr/lib/fm -ltopo -R/usr/lib/fm
33CFLAGS += -I$(SRC)/lib/fm/topo/libtopo/
34CSTD= $(CSTD_GNU99)
35
36CMDS = $(PROGS:%=$(TESTDIR)/%)
37$(CMDS) := FILEMODE = 0555
38
39FILES = $(XML:%=$(TESTDIR)/%)
40$(FILES) := FILEMODE = 0444
41
42all: $(PROGS)
43
44install: all $(CMDS) $(FILES)
45
46clobber: clean
47	-$(RM) $(PROGS) $(FILES)
48
49clean:
50	-$(RM) *.o
51
52$(CMDS): $(TESTDIR) $(PROGS)
53
54$(TESTDIR):
55	$(INS.dir)
56
57$(TESTDIR)/%: %
58	$(INS.file)
59