xref: /titanic_52/usr/src/test/util-tests/tests/libnvpair_json/Makefile (revision 37c79205ad46187f54b2edbf6a468160935f14d9)
1*37c79205SJoshua M. Clulow#
2*37c79205SJoshua M. Clulow# This file and its contents are supplied under the terms of the
3*37c79205SJoshua M. Clulow# Common Development and Distribution License ("CDDL"), version 1.0.
4*37c79205SJoshua M. Clulow# You may only use this file in accordance with the terms of version
5*37c79205SJoshua M. Clulow# 1.0 of the CDDL.
6*37c79205SJoshua M. Clulow#
7*37c79205SJoshua M. Clulow# A full copy of the text of the CDDL should have accompanied this
8*37c79205SJoshua M. Clulow# source.  A copy of the CDDL is also available via the Internet at
9*37c79205SJoshua M. Clulow# http://www.illumos.org/license/CDDL.
10*37c79205SJoshua M. Clulow#
11*37c79205SJoshua M. Clulow
12*37c79205SJoshua M. Clulow#
13*37c79205SJoshua M. Clulow# Copyright (c) 2014 Joyent, Inc.
14*37c79205SJoshua M. Clulow#
15*37c79205SJoshua M. Clulow
16*37c79205SJoshua M. Clulowinclude $(SRC)/Makefile.master
17*37c79205SJoshua M. Clulow
18*37c79205SJoshua M. ClulowROOTOPTPKG = $(ROOT)/opt/util-tests
19*37c79205SJoshua M. ClulowTESTDIR = $(ROOTOPTPKG)/tests/libnvpair_json
20*37c79205SJoshua M. ClulowROOTBINDIR = $(ROOTOPTPKG)/bin
21*37c79205SJoshua M. Clulow
22*37c79205SJoshua M. ClulowPROG = print_json
23*37c79205SJoshua M. Clulow
24*37c79205SJoshua M. ClulowSCRIPTS = \
25*37c79205SJoshua M. Clulow	json_00_blank \
26*37c79205SJoshua M. Clulow	json_01_boolean \
27*37c79205SJoshua M. Clulow	json_02_numbers \
28*37c79205SJoshua M. Clulow	json_03_empty_arrays \
29*37c79205SJoshua M. Clulow	json_04_number_arrays \
30*37c79205SJoshua M. Clulow	json_05_strings \
31*37c79205SJoshua M. Clulow	json_06_nested \
32*37c79205SJoshua M. Clulow	json_07_nested_arrays \
33*37c79205SJoshua M. Clulow	json_common
34*37c79205SJoshua M. Clulow
35*37c79205SJoshua M. Clulowinclude $(SRC)/cmd/Makefile.cmd
36*37c79205SJoshua M. Clulowinclude $(SRC)/test/Makefile.com
37*37c79205SJoshua M. Clulow
38*37c79205SJoshua M. ClulowOBJS = $(PROG:%=%.o)
39*37c79205SJoshua M. ClulowSRCS = $(OBJS:%.o=%.c)
40*37c79205SJoshua M. Clulow
41*37c79205SJoshua M. ClulowCMDS = $(PROG:%=$(ROOTBINDIR)/%) $(SCRIPTS:%=$(TESTDIR)/%)
42*37c79205SJoshua M. Clulow$(CMDS) := FILEMODE = 0555
43*37c79205SJoshua M. Clulow
44*37c79205SJoshua M. ClulowLDLIBS += -lnvpair
45*37c79205SJoshua M. Clulow
46*37c79205SJoshua M. ClulowLINTFLAGS += -erroff=E_FUNC_ARG_UNUSED
47*37c79205SJoshua M. Clulow
48*37c79205SJoshua M. Clulowall: $(PROG)
49*37c79205SJoshua M. Clulow
50*37c79205SJoshua M. Clulow$(PROG): $(OBJS)
51*37c79205SJoshua M. Clulow	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
52*37c79205SJoshua M. Clulow	$(POST_PROCESS)
53*37c79205SJoshua M. Clulow
54*37c79205SJoshua M. Clulowinstall: all $(CMDS)
55*37c79205SJoshua M. Clulow
56*37c79205SJoshua M. Clulowlint: lint_SRCS
57*37c79205SJoshua M. Clulow
58*37c79205SJoshua M. Clulowclobber: clean
59*37c79205SJoshua M. Clulow	-$(RM) $(PROG)
60*37c79205SJoshua M. Clulow
61*37c79205SJoshua M. Clulowclean:
62*37c79205SJoshua M. Clulow	-$(RM) $(OBJS)
63*37c79205SJoshua M. Clulow
64*37c79205SJoshua M. Clulow$(CMDS): $(TESTDIR) $(PROG)
65*37c79205SJoshua M. Clulow
66*37c79205SJoshua M. Clulow$(ROOTBINDIR):
67*37c79205SJoshua M. Clulow	$(INS.dir)
68*37c79205SJoshua M. Clulow
69*37c79205SJoshua M. Clulow$(ROOTBINDIR)/%: %
70*37c79205SJoshua M. Clulow	$(INS.file)
71*37c79205SJoshua M. Clulow
72*37c79205SJoshua M. Clulow$(TESTDIR):
73*37c79205SJoshua M. Clulow	$(INS.dir)
74*37c79205SJoshua M. Clulow
75*37c79205SJoshua M. Clulow$(TESTDIR)/%: %.ksh
76*37c79205SJoshua M. Clulow	$(INS.rename)
77