xref: /titanic_51/usr/src/test/os-tests/tests/spoof-ras/Makefile (revision 4e6f6c8344ddd39ded306346bd0107934d29b982)
1*4e6f6c83SCody Peter Mello#
2*4e6f6c83SCody Peter Mello# This file and its contents are supplied under the terms of the
3*4e6f6c83SCody Peter Mello# Common Development and Distribution License ("CDDL"), version 1.0.
4*4e6f6c83SCody Peter Mello# You may only use this file in accordance with the terms of version
5*4e6f6c83SCody Peter Mello# 1.0 of the CDDL.
6*4e6f6c83SCody Peter Mello#
7*4e6f6c83SCody Peter Mello# A full copy of the text of the CDDL should have accompanied this
8*4e6f6c83SCody Peter Mello# source.  A copy of the CDDL is also available via the Internet at
9*4e6f6c83SCody Peter Mello# http://www.illumos.org/license/CDDL.
10*4e6f6c83SCody Peter Mello#
11*4e6f6c83SCody Peter Mello
12*4e6f6c83SCody Peter Mello#
13*4e6f6c83SCody Peter Mello# Copyright (c) 2015 by Joyent, Inc. All rights reserved.
14*4e6f6c83SCody Peter Mello#
15*4e6f6c83SCody Peter Mello
16*4e6f6c83SCody Peter Melloinclude $(SRC)/cmd/Makefile.cmd
17*4e6f6c83SCody Peter Melloinclude $(SRC)/test/Makefile.com
18*4e6f6c83SCody Peter Mello
19*4e6f6c83SCody Peter MelloPROG = spoof-ras
20*4e6f6c83SCody Peter MelloOBJS = $(PROG:%=%.o)
21*4e6f6c83SCody Peter MelloSRCS = $(OBJS:%.o=%.c)
22*4e6f6c83SCody Peter Mello
23*4e6f6c83SCody Peter MelloLDLIBS += -lsocket -lnsl
24*4e6f6c83SCody Peter MelloC99MODE = -xc99=%all
25*4e6f6c83SCody Peter Mello
26*4e6f6c83SCody Peter MelloROOTOPTPKG = $(ROOT)/opt/os-tests
27*4e6f6c83SCody Peter MelloTESTDIR = $(ROOTOPTPKG)/tests
28*4e6f6c83SCody Peter Mello
29*4e6f6c83SCody Peter MelloCMDS = $(PROG:%=$(TESTDIR)/%)
30*4e6f6c83SCody Peter Mello$(CMDS) := FILEMODE = 0555
31*4e6f6c83SCody Peter Mello
32*4e6f6c83SCody Peter Melloall: $(PROG)
33*4e6f6c83SCody Peter Mello
34*4e6f6c83SCody Peter Mello$(PROG): $(OBJS)
35*4e6f6c83SCody Peter Mello	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
36*4e6f6c83SCody Peter Mello	$(POST_PROCESS)
37*4e6f6c83SCody Peter Mello
38*4e6f6c83SCody Peter Mello%.o: ../%.c
39*4e6f6c83SCody Peter Mello	$(COMPILE.c) $<
40*4e6f6c83SCody Peter Mello
41*4e6f6c83SCody Peter Melloinstall: all $(CMDS)
42*4e6f6c83SCody Peter Mello
43*4e6f6c83SCody Peter Mellolint: lint_SRCS
44*4e6f6c83SCody Peter Mello
45*4e6f6c83SCody Peter Melloclobber: clean
46*4e6f6c83SCody Peter Mello	-$(RM) $(PROG)
47*4e6f6c83SCody Peter Mello
48*4e6f6c83SCody Peter Melloclean:
49*4e6f6c83SCody Peter Mello	-$(RM) $(OBJS)
50*4e6f6c83SCody Peter Mello
51*4e6f6c83SCody Peter Mello$(CMDS): $(TESTDIR) $(PROG)
52*4e6f6c83SCody Peter Mello
53*4e6f6c83SCody Peter Mello$(TESTDIR):
54*4e6f6c83SCody Peter Mello	$(INS.dir)
55*4e6f6c83SCody Peter Mello
56*4e6f6c83SCody Peter Mello$(TESTDIR)/%: %
57*4e6f6c83SCody Peter Mello	$(INS.file)
58