xref: /titanic_41/usr/src/test/os-tests/tests/poll/Makefile (revision d583b39bfb4e2571d3e41097c5c357ffe353ad45)
1*d583b39bSJohn Wren Kennedy#
2*d583b39bSJohn Wren Kennedy# This file and its contents are supplied under the terms of the
3*d583b39bSJohn Wren Kennedy# Common Development and Distribution License ("CDDL"), version 1.0.
4*d583b39bSJohn Wren Kennedy# You may only use this file in accordance with the terms of version
5*d583b39bSJohn Wren Kennedy# 1.0 of the CDDL.
6*d583b39bSJohn Wren Kennedy#
7*d583b39bSJohn Wren Kennedy# A full copy of the text of the CDDL should have accompanied this
8*d583b39bSJohn Wren Kennedy# source.  A copy of the CDDL is also available via the Internet at
9*d583b39bSJohn Wren Kennedy# http://www.illumos.org/license/CDDL.
10*d583b39bSJohn Wren Kennedy#
11*d583b39bSJohn Wren Kennedy
12*d583b39bSJohn Wren Kennedy#
13*d583b39bSJohn Wren Kennedy# Copyright (c) 2012 by Delphix. All rights reserved.
14*d583b39bSJohn Wren Kennedy#
15*d583b39bSJohn Wren Kennedy
16*d583b39bSJohn Wren Kennedyinclude $(SRC)/cmd/Makefile.cmd
17*d583b39bSJohn Wren Kennedyinclude $(SRC)/test/Makefile.com
18*d583b39bSJohn Wren Kennedy
19*d583b39bSJohn Wren KennedyPROG = poll_test
20*d583b39bSJohn Wren KennedyOBJS = $(PROG:%=%.o)
21*d583b39bSJohn Wren KennedySRCS = $(OBJS:%.o=%.c)
22*d583b39bSJohn Wren Kennedy
23*d583b39bSJohn Wren KennedyLDLIBS += -lsocket
24*d583b39bSJohn Wren KennedyC99MODE = -xc99=%all
25*d583b39bSJohn Wren Kennedy
26*d583b39bSJohn Wren KennedyROOTOPTPKG = $(ROOT)/opt/os-tests
27*d583b39bSJohn Wren KennedyTESTDIR = $(ROOTOPTPKG)/tests
28*d583b39bSJohn Wren Kennedy
29*d583b39bSJohn Wren KennedyCMDS = $(PROG:%=$(TESTDIR)/%)
30*d583b39bSJohn Wren Kennedy$(CMDS) := FILEMODE = 0555
31*d583b39bSJohn Wren Kennedy
32*d583b39bSJohn Wren Kennedyall: $(PROG)
33*d583b39bSJohn Wren Kennedy
34*d583b39bSJohn Wren Kennedy$(PROG): $(OBJS)
35*d583b39bSJohn Wren Kennedy	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
36*d583b39bSJohn Wren Kennedy	$(POST_PROCESS)
37*d583b39bSJohn Wren Kennedy
38*d583b39bSJohn Wren Kennedy%.o: ../%.c
39*d583b39bSJohn Wren Kennedy	$(COMPILE.c) $<
40*d583b39bSJohn Wren Kennedy
41*d583b39bSJohn Wren Kennedyinstall: all $(CMDS)
42*d583b39bSJohn Wren Kennedy
43*d583b39bSJohn Wren Kennedylint: lint_SRCS
44*d583b39bSJohn Wren Kennedy
45*d583b39bSJohn Wren Kennedyclobber: clean
46*d583b39bSJohn Wren Kennedy	-$(RM) $(PROG)
47*d583b39bSJohn Wren Kennedy
48*d583b39bSJohn Wren Kennedyclean:
49*d583b39bSJohn Wren Kennedy	-$(RM) $(OBJS)
50*d583b39bSJohn Wren Kennedy
51*d583b39bSJohn Wren Kennedy$(CMDS): $(TESTDIR) $(PROG)
52*d583b39bSJohn Wren Kennedy
53*d583b39bSJohn Wren Kennedy$(TESTDIR):
54*d583b39bSJohn Wren Kennedy	$(INS.dir)
55*d583b39bSJohn Wren Kennedy
56*d583b39bSJohn Wren Kennedy$(TESTDIR)/%: %
57*d583b39bSJohn Wren Kennedy	$(INS.file)
58