190221f91SCody Peter Mello#
290221f91SCody Peter Mello# This file and its contents are supplied under the terms of the
390221f91SCody Peter Mello# Common Development and Distribution License ("CDDL"), version 1.0.
490221f91SCody Peter Mello# You may only use this file in accordance with the terms of version
590221f91SCody Peter Mello# 1.0 of the CDDL.
690221f91SCody Peter Mello#
790221f91SCody Peter Mello# A full copy of the text of the CDDL should have accompanied this
890221f91SCody Peter Mello# source.  A copy of the CDDL is also available via the Internet at
990221f91SCody Peter Mello# http://www.illumos.org/license/CDDL.
1090221f91SCody Peter Mello#
1190221f91SCody Peter Mello
1290221f91SCody Peter Mello#
1390221f91SCody Peter Mello# Copyright 2016 Joyent, Inc.
1490221f91SCody Peter Mello#
1590221f91SCody Peter Mello
1690221f91SCody Peter Melloinclude $(SRC)/cmd/Makefile.cmd
1790221f91SCody Peter Melloinclude $(SRC)/test/Makefile.com
1890221f91SCody Peter Mello
19*aa9ef484SJohn LevonOBJECTS=util.o runtests.32.o runtests.64.o acquire-lock.32.o acquire-lock.64.o
2090221f91SCody Peter Mello
2190221f91SCody Peter MelloPROGS = \
2290221f91SCody Peter Mello	runtests \
2390221f91SCody Peter Mello	acquire-lock
2490221f91SCody Peter Mello
25bd0ce624SYuri PankovCSTD = $(CSTD_GNU99)
2690221f91SCody Peter Mello
27*aa9ef484SJohn LevonSRCS = $(PROGS:%=%.c) $(UTILS:%.o=%.c)
2890221f91SCody Peter MelloPROGS32 = $(PROGS:%=%.32)
2990221f91SCody Peter MelloPROGS64 = $(PROGS:%=%.64)
3090221f91SCody Peter Mello
3190221f91SCody Peter MelloLINTS = $(PROGS:%=%.ln)
3290221f91SCody Peter MelloLINTFLAGS += -erroff=E_NAME_DEF_NOT_USED2
3390221f91SCody Peter MelloLINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2
3490221f91SCody Peter Mello
3590221f91SCody Peter MelloROOTOPTDIR = $(ROOT)/opt/os-tests/tests/file-locking
3690221f91SCody Peter MelloROOTOPTPROGS = $(PROGS32:%=$(ROOTOPTDIR)/%) \
3790221f91SCody Peter Mello	$(PROGS64:%=$(ROOTOPTDIR)/%)
3890221f91SCody Peter Mello
3990221f91SCody Peter Mello.KEEP_STATE:
4090221f91SCody Peter Mello
4190221f91SCody Peter Melloinstall: $(ROOTOPTPROGS)
4290221f91SCody Peter Mello
4390221f91SCody Peter Melloall: $(PROGS32) $(PROGS64)
4490221f91SCody Peter Mello
4590221f91SCody Peter Mellolint: $(LINTS)
4690221f91SCody Peter Mello
4790221f91SCody Peter Melloclean:
4890221f91SCody Peter Mello	-rm $(PROGS32) $(PROGS64)
4990221f91SCody Peter Mello
5090221f91SCody Peter Mello$(ROOTOPTPROGS): $(PROGS32) $(PROGS64) $(ROOTOPTDIR)
5190221f91SCody Peter Mello
5290221f91SCody Peter Mello$(ROOTOPTDIR):
5390221f91SCody Peter Mello	$(INS.dir)
5490221f91SCody Peter Mello
5590221f91SCody Peter Mello$(ROOTOPTDIR)/%: %
5690221f91SCody Peter Mello	$(INS.file)
5790221f91SCody Peter Mello
5890221f91SCody Peter Mello$(ROOTOPTDIR)/%: %.ksh
5990221f91SCody Peter Mello	$(INS.rename)
6090221f91SCody Peter Mello
6190221f91SCody Peter Mello%.ln: %.c
6290221f91SCody Peter Mello	$(LINT.c) $< $(UTILS) $(LDLIBS)
6390221f91SCody Peter Mello
64*aa9ef484SJohn Levon%.64.o: %.c
65*aa9ef484SJohn Levon	$(COMPILE64.c) $< -o $@
66*aa9ef484SJohn Levon
67*aa9ef484SJohn Levon%.32.o: %.c
68*aa9ef484SJohn Levon	$(COMPILE.c) $< -o $@
69*aa9ef484SJohn Levon
70*aa9ef484SJohn Levon%.64: %.64.o util.64.o
71*aa9ef484SJohn Levon	$(LINK64.c) -o $@ $< util.64.o $(LDLIBS64)
7290221f91SCody Peter Mello	$(POST_PROCESS)
7390221f91SCody Peter Mello
74*aa9ef484SJohn Levon%.32: %.32.o util.32.o
75*aa9ef484SJohn Levon	$(LINK.c) -o $@ $< util.32.o $(LDLIBS)
7690221f91SCody Peter Mello	$(POST_PROCESS)
7790221f91SCody Peter Mello
7890221f91SCody Peter Melloclobber:
7990221f91SCody Peter Mello	$(RM) $(PROGS32) $(PROGS64)
8090221f91SCody Peter Mello
8190221f91SCody Peter MelloFRC: