xref: /illumos-gate/usr/src/test/libsec-tests/cmd/Makefile (revision 82ae1648ab152f127ab6c9a6bdbea9e0a589a488)
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# Copyright 2024 RackTop Systems, Inc.
13
14PROGS = \
15	acl_fromtext \
16	acl_totext
17
18SCRIPTS = \
19	libsectest.ksh
20
21ROOTOPTDIR = $(ROOT)/opt/libsec-tests/bin
22ROOTOPTPROGS = $(PROGS:%=$(ROOTOPTDIR)/%) \
23		$(SCRIPTS:%.ksh=$(ROOTOPTDIR)/%) \
24
25include $(SRC)/cmd/Makefile.cmd
26
27LDFLAGS += '-R$$ORIGIN/../../../lib'
28LDLIBS = -L$(ROOT)/usr/lib -lsec
29
30.KEEP_STATE:
31
32install: $(ROOTOPTPROGS)
33
34all: $(PROGS)
35
36$(ROOTOPTPROGS): $(PROGS) $(ROOTOPTDIR)
37
38$(ROOTOPTDIR):
39	$(INS.dir)
40
41$(ROOTOPTDIR)/%: %
42	$(INS.file)
43
44$(ROOTOPTDIR)/%: %.ksh
45	$(INS.rename)
46
47OBJS1 = acl_from_text.o acl_canned.o lib_stubs.o
48acl_fromtext : $(OBJS1)
49	$(LINK.c) -Wl,-zinterpose -o $@ $(OBJS1) $(LDLIBS)
50	$(POST_PROCESS)
51
52OBJS2 = acl_to_text.o acl_canned.o lib_stubs.o
53acl_totext : $(OBJS2)
54	$(LINK.c) -Wl,-zinterpose -o $@ $(OBJS2) $(LDLIBS)
55	$(POST_PROCESS)
56
57clobber: clean
58	$(RM) $(PROGS)
59
60clean:
61
62FRC:
63