xref: /illumos-gate/usr/src/test/os-tests/tests/oclo/Makefile (revision 0250c53ad267726f2438e3c6556199a0bbf588a2)
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 2024 Oxide Computer Company
14#
15
16PROGS = \
17	oclo \
18	oclo_errors \
19	ocloexec_verify
20
21ROOTOPTDIR = $(ROOT)/opt/os-tests/tests
22ROOTOPTOCLO = $(ROOTOPTDIR)/oclo
23ROOTOPTPROGS = $(PROGS:%=$(ROOTOPTOCLO)/%)
24
25include $(SRC)/cmd/Makefile.cmd
26include $(SRC)/cmd/Makefile.cmd.64
27include $(SRC)/cmd/Makefile.ctf
28
29CSTD = $(GNU_C99)
30CTF_MODE = link
31CPPFLAGS += -D_XOPEN_SOURCE=800 -D__EXTENSIONS__
32
33oclo		:=	LDLIBS += -lsocket
34oclo_errors	:=	LDLIBS += -lsocket
35
36.KEEP_STATE:
37
38all: $(PROGS)
39
40install: $(ROOTOPTPROGS)
41
42clean:
43	$(RM) *.o
44
45$(ROOTOPTPROGS): $(PROGS) $(ROOTOPTOCLO)
46
47$(ROOTOPTDIR):
48	$(INS.dir)
49
50$(ROOTOPTOCLO): $(ROOTOPTDIR)
51	$(INS.dir)
52
53$(ROOTOPTOCLO)/%: %
54	$(INS.file)
55
56clobber: clean
57	$(RM) $(PROGS)
58
59FRC:
60