xref: /illumos-gate/usr/src/test/os-tests/tests/portfs/Makefile (revision ddb365bfc9e868ad24ccdcb0dc91af18b10df082)
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 2022 Oxide Computer Company
14#
15
16PROGS = \
17	file_assoc
18
19PROGS32 = $(PROGS:%=%.32)
20PROGS64 = $(PROGS:%=%.64)
21
22ROOTOPTDIR = $(ROOT)/opt/os-tests/tests
23ROOTOPTPORTFS = $(ROOTOPTDIR)/portfs
24ROOTOPTPROGS = $(PROGS32:%=$(ROOTOPTPORTFS)/%) \
25	$(PROGS64:%=$(ROOTOPTPORTFS)/%)
26
27include $(SRC)/cmd/Makefile.cmd
28
29CSTD=$(GNU_C99)
30
31.KEEP_STATE:
32
33all: $(PROGS32) $(PROGS64)
34
35install: $(ROOTOPTPROGS)
36
37clean:
38
39$(ROOTOPTPROGS): $(PROGS32) $(PROGS64) $(ROOTOPTPORTFS)
40
41$(ROOTOPTDIR):
42	$(INS.dir)
43
44$(ROOTOPTPORTFS): $(ROOTOPTDIR)
45	$(INS.dir)
46
47$(ROOTOPTPORTFS)/%: %
48	$(INS.file)
49
50%.64: %.c
51	$(LINK64.c) -o $@ $< $(LDLIBS64)
52	$(POST_PROCESS)
53
54%.32: %.c
55	$(LINK.c) -o $@ $< $(LDLIBS)
56	$(POST_PROCESS)
57
58clobber:
59	$(RM) $(PROGS32) $(PROGS64)
60
61FRC:
62