1 #
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
5 # 1.0 of the CDDL.
6 #
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
10 #
11
12 #
13 # Copyright 2016 Joyent, Inc.
14 #
15
16 include $(SRC)/cmd/Makefile.cmd
17 include $(SRC)/test/Makefile.com
18
19 UTILS = util.c
20
21 PROGS = \
22 runtests \
23 acquire-lock
24
25 C99MODE = -xc99=%all
26
27 SRCS = $(PROGS:%=%.c) $(UTILS)
28 LINTS = $(SRCS:%.c=%.ln)
29 PROGS32 = $(PROGS:%=%.32)
30 PROGS64 = $(PROGS:%=%.64)
31
32 ROOTOPTDIR = $(ROOT)/opt/os-tests/tests/file-locking
33 ROOTOPTPROGS = $(PROGS32:%=$(ROOTOPTDIR)/%) \
34 $(PROGS64:%=$(ROOTOPTDIR)/%)
35
36 all := TARGET = all
37 install := TARGET = install
38 clean := TARGET = clean
39 clobber := TARGET = clobber
40 lint := TARGET = lint
41
42 .KEEP_STATE:
43
44 install: $(ROOTOPTPROGS)
45
46 all: $(PROGS32) $(PROGS64)
47
48 lint: $(LINTS)
49
50 clean:
51 -rm $(PROGS32) $(PROGS64)
52
53 $(ROOTOPTPROGS): $(PROGS32) $(PROGS64) $(ROOTOPTDIR)
54
55 $(ROOTOPTDIR):
56 $(INS.dir)
57
58 $(ROOTOPTDIR)/%: %
59 $(INS.file)
60
61 $(ROOTOPTDIR)/%: %.ksh
62 $(INS.rename)
63
64 %.64: %.c
65 $(LINK64.c) -o $@ $< $(UTILS) $(LDLIBS64)
66 $(POST_PROCESS)
67
68 %.32: %.c
69 $(LINK.c) -o $@ $< $(UTILS) $(LDLIBS)
70 $(POST_PROCESS)
71
72 clobber:
73 $(RM) $(PROGS32) $(PROGS64)
74
75 FRC: