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 CSTD = $(CSTD_GNU99)
26
27 SRCS = $(PROGS:%=%.c) $(UTILS)
28 PROGS32 = $(PROGS:%=%.32)
29 PROGS64 = $(PROGS:%=%.64)
30
31 LINTS = $(PROGS:%=%.ln)
32 LINTFLAGS += -erroff=E_NAME_DEF_NOT_USED2
33 LINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2
34
35 ROOTOPTDIR = $(ROOT)/opt/os-tests/tests/file-locking
36 ROOTOPTPROGS = $(PROGS32:%=$(ROOTOPTDIR)/%) \
37 $(PROGS64:%=$(ROOTOPTDIR)/%)
38
39 .KEEP_STATE:
40
41 install: $(ROOTOPTPROGS)
42
43 all: $(PROGS32) $(PROGS64)
44
45 lint: $(LINTS)
46
47 clean:
48 -rm $(PROGS32) $(PROGS64)
49
50 $(ROOTOPTPROGS): $(PROGS32) $(PROGS64) $(ROOTOPTDIR)
51
52 $(ROOTOPTDIR):
53 $(INS.dir)
54
55 $(ROOTOPTDIR)/%: %
56 $(INS.file)
57
58 $(ROOTOPTDIR)/%: %.ksh
59 $(INS.rename)
60
61 %.ln: %.c
62 $(LINT.c) $< $(UTILS) $(LDLIBS)
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:
|
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 OBJECTS=util.o runtests.32.o runtests.64.o acquire-lock.32.o acquire-lock.64.o
20
21 PROGS = \
22 runtests \
23 acquire-lock
24
25 CSTD = $(CSTD_GNU99)
26
27 SRCS = $(PROGS:%=%.c) $(UTILS:%.o=%.c)
28 PROGS32 = $(PROGS:%=%.32)
29 PROGS64 = $(PROGS:%=%.64)
30
31 LINTS = $(PROGS:%=%.ln)
32 LINTFLAGS += -erroff=E_NAME_DEF_NOT_USED2
33 LINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2
34
35 ROOTOPTDIR = $(ROOT)/opt/os-tests/tests/file-locking
36 ROOTOPTPROGS = $(PROGS32:%=$(ROOTOPTDIR)/%) \
37 $(PROGS64:%=$(ROOTOPTDIR)/%)
38
39 .KEEP_STATE:
40
41 install: $(ROOTOPTPROGS)
42
43 all: $(PROGS32) $(PROGS64)
44
45 lint: $(LINTS)
46
47 clean:
48 -rm $(PROGS32) $(PROGS64)
49
50 $(ROOTOPTPROGS): $(PROGS32) $(PROGS64) $(ROOTOPTDIR)
51
52 $(ROOTOPTDIR):
53 $(INS.dir)
54
55 $(ROOTOPTDIR)/%: %
56 $(INS.file)
57
58 $(ROOTOPTDIR)/%: %.ksh
59 $(INS.rename)
60
61 %.ln: %.c
62 $(LINT.c) $< $(UTILS) $(LDLIBS)
63
64 %.64.o: %.c
65 $(COMPILE64.c) $< -o $@
66
67 %.32.o: %.c
68 $(COMPILE.c) $< -o $@
69
70 %.64: %.64.o util.64.o
71 $(LINK64.c) -o $@ $< util.64.o $(LDLIBS64)
72 $(POST_PROCESS)
73
74 %.32: %.32.o util.32.o
75 $(LINK.c) -o $@ $< util.32.o $(LDLIBS)
76 $(POST_PROCESS)
77
78 clobber:
79 $(RM) $(PROGS32) $(PROGS64)
80
81 FRC:
|