90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello#
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello# This file and its contents are supplied under the terms of the
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello# Common Development and Distribution License ("CDDL"), version 1.0.
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello# You may only use this file in accordance with the terms of version
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello# 1.0 of the CDDL.
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello#
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello# A full copy of the text of the CDDL should have accompanied this
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello# source. A copy of the CDDL is also available via the Internet at
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello# http://www.illumos.org/license/CDDL.
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello#
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello#
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello# Copyright 2016 Joyent, Inc.
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello#
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Melloinclude $(SRC)/cmd/Makefile.cmd
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Melloinclude $(SRC)/test/Makefile.com
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter MelloUTILS = util.c
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter MelloPROGS = \
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello runtests \
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello acquire-lock
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter MelloC99MODE = -xc99=%all
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter MelloSRCS = $(PROGS:%=%.c) $(UTILS)
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter MelloPROGS32 = $(PROGS:%=%.32)
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter MelloPROGS64 = $(PROGS:%=%.64)
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter MelloLINTS = $(PROGS:%=%.ln)
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter MelloLINTFLAGS += -erroff=E_NAME_DEF_NOT_USED2
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter MelloLINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter MelloROOTOPTDIR = $(ROOT)/opt/os-tests/tests/file-locking
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter MelloROOTOPTPROGS = $(PROGS32:%=$(ROOTOPTDIR)/%) \
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello $(PROGS64:%=$(ROOTOPTDIR)/%)
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello.KEEP_STATE:
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Melloinstall: $(ROOTOPTPROGS)
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Melloall: $(PROGS32) $(PROGS64)
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mellolint: $(LINTS)
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Melloclean:
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello -rm $(PROGS32) $(PROGS64)
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello$(ROOTOPTPROGS): $(PROGS32) $(PROGS64) $(ROOTOPTDIR)
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello$(ROOTOPTDIR):
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello $(INS.dir)
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello$(ROOTOPTDIR)/%: %
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello $(INS.file)
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello$(ROOTOPTDIR)/%: %.ksh
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello $(INS.rename)
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello%.ln: %.c
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello $(LINT.c) $< $(UTILS) $(LDLIBS)
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello%.64: %.c
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello $(LINK64.c) -o $@ $< $(UTILS) $(LDLIBS64)
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello $(POST_PROCESS)
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello%.32: %.c
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello $(LINK.c) -o $@ $< $(UTILS) $(LDLIBS)
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello $(POST_PROCESS)
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Melloclobber:
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello $(RM) $(PROGS32) $(PROGS64)
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter Mello
90221f9148b67fdc90178b67f9600b7bd4e3bc7cCody Peter MelloFRC: