xref: /illumos-gate/usr/src/test/os-tests/tests/file-locking/Makefile (revision d17be682a2c70b4505d43c830bbd2603da11918d)
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 MelloROOTOPTDIR = $(ROOT)/opt/os-tests/tests/file-locking
3290221f91SCody Peter MelloROOTOPTPROGS = $(PROGS32:%=$(ROOTOPTDIR)/%) \
3390221f91SCody Peter Mello	$(PROGS64:%=$(ROOTOPTDIR)/%)
3490221f91SCody Peter Mello
3590221f91SCody Peter Mello.KEEP_STATE:
3690221f91SCody Peter Mello
3790221f91SCody Peter Melloinstall: $(ROOTOPTPROGS)
3890221f91SCody Peter Mello
3990221f91SCody Peter Melloall: $(PROGS32) $(PROGS64)
4090221f91SCody Peter Mello
4190221f91SCody Peter Melloclean:
4290221f91SCody Peter Mello	-rm $(PROGS32) $(PROGS64)
4390221f91SCody Peter Mello
4490221f91SCody Peter Mello$(ROOTOPTPROGS): $(PROGS32) $(PROGS64) $(ROOTOPTDIR)
4590221f91SCody Peter Mello
4690221f91SCody Peter Mello$(ROOTOPTDIR):
4790221f91SCody Peter Mello	$(INS.dir)
4890221f91SCody Peter Mello
4990221f91SCody Peter Mello$(ROOTOPTDIR)/%: %
5090221f91SCody Peter Mello	$(INS.file)
5190221f91SCody Peter Mello
5290221f91SCody Peter Mello$(ROOTOPTDIR)/%: %.ksh
5390221f91SCody Peter Mello	$(INS.rename)
5490221f91SCody Peter Mello
55*aa9ef484SJohn Levon%.64.o: %.c
56*aa9ef484SJohn Levon	$(COMPILE64.c) $< -o $@
57*aa9ef484SJohn Levon
58*aa9ef484SJohn Levon%.32.o: %.c
59*aa9ef484SJohn Levon	$(COMPILE.c) $< -o $@
60*aa9ef484SJohn Levon
61*aa9ef484SJohn Levon%.64: %.64.o util.64.o
62*aa9ef484SJohn Levon	$(LINK64.c) -o $@ $< util.64.o $(LDLIBS64)
6390221f91SCody Peter Mello	$(POST_PROCESS)
6490221f91SCody Peter Mello
65*aa9ef484SJohn Levon%.32: %.32.o util.32.o
66*aa9ef484SJohn Levon	$(LINK.c) -o $@ $< util.32.o $(LDLIBS)
6790221f91SCody Peter Mello	$(POST_PROCESS)
6890221f91SCody Peter Mello
6990221f91SCody Peter Melloclobber:
7090221f91SCody Peter Mello	$(RM) $(PROGS32) $(PROGS64)
7190221f91SCody Peter Mello
7290221f91SCody Peter MelloFRC:
73