xref: /illumos-gate/usr/src/test/util-tests/tests/workq/Makefile (revision 66582b606a8194f7f3ba5b3a3a6dca5b0d346361)
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 2015 Joyent, Inc.
14#
15
16include $(SRC)/Makefile.master
17
18ROOTOPTPKG = $(ROOT)/opt/util-tests
19TESTDIR = $(ROOTOPTPKG)/tests/mergeq
20
21PROG = wqt
22OBJS = wqt.o workq.o
23
24include $(SRC)/cmd/Makefile.cmd
25include $(SRC)/cmd/Makefile.ctf
26include $(SRC)/test/Makefile.com
27
28CMDS = $(PROG:%=$(TESTDIR)/%)
29$(CMDS) := FILEMODE = 0555
30
31CPPFLAGS += -I$(SRC)/lib/mergeq -D_REENTRANT
32LDLIBS += -lumem
33
34all: $(PROG)
35
36install: all $(CMDS)
37
38lint: lint_SRCS
39
40clobber: clean
41	-$(RM) $(PROG)
42
43clean:
44	-$(RM) $(OBJS)
45
46%.o: %.c
47	$(COMPILE.c) -o $@ -c $<
48	$(POST_PROCESS_O)
49
50%.o: $(SRC)/lib/mergeq/%.c
51	$(COMPILE.c) -o $@ -c $<
52	$(POST_PROCESS_O)
53
54$(PROG): $(OBJS)
55	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
56	$(POST_PROCESS)
57
58$(CMDS): $(TESTDIR) $(PROG)
59
60$(TESTDIR):
61	$(INS.dir)
62
63$(TESTDIR)/%: %
64	$(INS.file)
65