xref: /titanic_50/usr/src/test/util-tests/tests/libnvpair_json/Makefile (revision bde3d612a7c090234c60e6e4578821237a5db135)
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) 2014 Joyent, Inc.
14#
15
16include $(SRC)/Makefile.master
17
18ROOTOPTPKG = $(ROOT)/opt/util-tests
19TESTDIR = $(ROOTOPTPKG)/tests/libnvpair_json
20ROOTBINDIR = $(ROOTOPTPKG)/bin
21
22PROG = print_json
23
24SCRIPTS = \
25	json_00_blank \
26	json_01_boolean \
27	json_02_numbers \
28	json_03_empty_arrays \
29	json_04_number_arrays \
30	json_05_strings \
31	json_06_nested \
32	json_07_nested_arrays \
33	json_common
34
35include $(SRC)/cmd/Makefile.cmd
36include $(SRC)/test/Makefile.com
37
38OBJS = $(PROG:%=%.o)
39SRCS = $(OBJS:%.o=%.c)
40
41CMDS = $(PROG:%=$(ROOTBINDIR)/%) $(SCRIPTS:%=$(TESTDIR)/%)
42$(CMDS) := FILEMODE = 0555
43
44LDLIBS += -lnvpair
45
46LINTFLAGS += -erroff=E_FUNC_ARG_UNUSED
47
48all: $(PROG)
49
50$(PROG): $(OBJS)
51	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
52	$(POST_PROCESS)
53
54install: all $(CMDS)
55
56lint: lint_SRCS
57
58clobber: clean
59	-$(RM) $(PROG)
60
61clean:
62	-$(RM) $(OBJS)
63
64$(CMDS): $(TESTDIR) $(PROG)
65
66$(ROOTBINDIR):
67	$(INS.dir)
68
69$(ROOTBINDIR)/%: %
70	$(INS.file)
71
72$(TESTDIR):
73	$(INS.dir)
74
75$(TESTDIR)/%: %.ksh
76	$(INS.rename)
77