xref: /titanic_52/usr/src/test/util-tests/tests/mergeq/Makefile (revision 7fd791373689a6af05e27efec3b1ab556e02aa23)
1*7fd79137SRobert Mustacchi#
2*7fd79137SRobert Mustacchi# This file and its contents are supplied under the terms of the
3*7fd79137SRobert Mustacchi# Common Development and Distribution License ("CDDL"), version 1.0.
4*7fd79137SRobert Mustacchi# You may only use this file in accordance with the terms of version
5*7fd79137SRobert Mustacchi# 1.0 of the CDDL.
6*7fd79137SRobert Mustacchi#
7*7fd79137SRobert Mustacchi# A full copy of the text of the CDDL should have accompanied this
8*7fd79137SRobert Mustacchi# source.  A copy of the CDDL is also available via the Internet at
9*7fd79137SRobert Mustacchi# http://www.illumos.org/license/CDDL.
10*7fd79137SRobert Mustacchi#
11*7fd79137SRobert Mustacchi
12*7fd79137SRobert Mustacchi#
13*7fd79137SRobert Mustacchi# Copyright 2015 Joyent, Inc.
14*7fd79137SRobert Mustacchi#
15*7fd79137SRobert Mustacchi
16*7fd79137SRobert Mustacchiinclude $(SRC)/Makefile.master
17*7fd79137SRobert Mustacchi
18*7fd79137SRobert MustacchiROOTOPTPKG = $(ROOT)/opt/util-tests
19*7fd79137SRobert MustacchiTESTDIR = $(ROOTOPTPKG)/tests/mergeq
20*7fd79137SRobert Mustacchi
21*7fd79137SRobert MustacchiPROG = mqt
22*7fd79137SRobert MustacchiOBJS = mqt.o mergeq.o
23*7fd79137SRobert Mustacchi
24*7fd79137SRobert Mustacchiinclude $(SRC)/cmd/Makefile.cmd
25*7fd79137SRobert Mustacchiinclude $(SRC)/cmd/Makefile.ctf
26*7fd79137SRobert Mustacchiinclude $(SRC)/test/Makefile.com
27*7fd79137SRobert Mustacchi
28*7fd79137SRobert MustacchiCMDS = $(PROG:%=$(TESTDIR)/%)
29*7fd79137SRobert Mustacchi$(CMDS) := FILEMODE = 0555
30*7fd79137SRobert Mustacchi
31*7fd79137SRobert MustacchiCPPFLAGS += -I$(SRC)/lib/mergeq -D_REENTRANT
32*7fd79137SRobert MustacchiLDLIBS += -lumem
33*7fd79137SRobert Mustacchi
34*7fd79137SRobert Mustacchiall: $(PROG)
35*7fd79137SRobert Mustacchi
36*7fd79137SRobert Mustacchiinstall: all $(CMDS)
37*7fd79137SRobert Mustacchi
38*7fd79137SRobert Mustacchilint: lint_SRCS
39*7fd79137SRobert Mustacchi
40*7fd79137SRobert Mustacchiclobber: clean
41*7fd79137SRobert Mustacchi	-$(RM) $(PROG)
42*7fd79137SRobert Mustacchi
43*7fd79137SRobert Mustacchiclean:
44*7fd79137SRobert Mustacchi	-$(RM) $(OBJS)
45*7fd79137SRobert Mustacchi
46*7fd79137SRobert Mustacchi%.o: %.c
47*7fd79137SRobert Mustacchi	$(COMPILE.c) -o $@ -c $<
48*7fd79137SRobert Mustacchi	$(POST_PROCESS_O)
49*7fd79137SRobert Mustacchi
50*7fd79137SRobert Mustacchi%.o: $(SRC)/lib/mergeq/%.c
51*7fd79137SRobert Mustacchi	$(COMPILE.c) -o $@ -c $<
52*7fd79137SRobert Mustacchi	$(POST_PROCESS_O)
53*7fd79137SRobert Mustacchi
54*7fd79137SRobert Mustacchi$(PROG): $(OBJS)
55*7fd79137SRobert Mustacchi	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
56*7fd79137SRobert Mustacchi	$(POST_PROCESS)
57*7fd79137SRobert Mustacchi
58*7fd79137SRobert Mustacchi$(CMDS): $(TESTDIR) $(PROG)
59*7fd79137SRobert Mustacchi
60*7fd79137SRobert Mustacchi$(TESTDIR):
61*7fd79137SRobert Mustacchi	$(INS.dir)
62*7fd79137SRobert Mustacchi
63*7fd79137SRobert Mustacchi$(TESTDIR)/%: %
64*7fd79137SRobert Mustacchi	$(INS.file)
65