xref: /illumos-gate/usr/src/test/crypto-tests/tests/longhash/Makefile.longhash (revision b70bf3ee79d81df3ccc36e553e0ff11049a2b51a)
1*b70bf3eeSBill Sommerfeld#
2*b70bf3eeSBill Sommerfeld# This file and its contents are supplied under the terms of the
3*b70bf3eeSBill Sommerfeld# Common Development and Distribution License ("CDDL"), version 1.0.
4*b70bf3eeSBill Sommerfeld# You may only use this file in accordance with the terms of version
5*b70bf3eeSBill Sommerfeld# 1.0 of the CDDL.
6*b70bf3eeSBill Sommerfeld#
7*b70bf3eeSBill Sommerfeld# A full copy of the text of the CDDL should have accompanied this
8*b70bf3eeSBill Sommerfeld# source.  A copy of the CDDL is also available via the Internet at
9*b70bf3eeSBill Sommerfeld# http://www.illumos.org/license/CDDL.
10*b70bf3eeSBill Sommerfeld#
11*b70bf3eeSBill Sommerfeld
12*b70bf3eeSBill Sommerfeld#
13*b70bf3eeSBill Sommerfeld# Copyright 2024 Bill Sommerfeld <sommerfeld@hamachi.org>
14*b70bf3eeSBill Sommerfeld#
15*b70bf3eeSBill Sommerfeld
16*b70bf3eeSBill SommerfeldTESTDIR	= $(ROOT)/opt/crypto-tests/tests/longhash
17*b70bf3eeSBill Sommerfeld
18*b70bf3eeSBill Sommerfeldinclude $(SRC)/cmd/Makefile.cmd
19*b70bf3eeSBill Sommerfeldinclude $(SRC)/test/Makefile.com
20*b70bf3eeSBill Sommerfeldinclude $(SRC)/cmd/Makefile.ctf
21*b70bf3eeSBill Sommerfeld
22*b70bf3eeSBill SommerfeldPROGS_32 = $(BASEPROG)_32
23*b70bf3eeSBill SommerfeldPROGS_64 = $(BASEPROG)_64
24*b70bf3eeSBill SommerfeldPROGS = $(PROGS_32) $(PROGS_64)
25*b70bf3eeSBill Sommerfeld
26*b70bf3eeSBill SommerfeldCOMMON_OBJS_32 = $(COMMON_OBJS:%.o=%.32.o)
27*b70bf3eeSBill SommerfeldCOMMON_OBJS_64 = $(COMMON_OBJS:%.o=%.64.o)
28*b70bf3eeSBill Sommerfeld
29*b70bf3eeSBill SommerfeldCOMMONDIR = $(SRC)/test/crypto-tests/tests/common
30*b70bf3eeSBill Sommerfeld
31*b70bf3eeSBill Sommerfeld$(PROGS_32) := OBJS += $(BASEPROG:%=%.32.o) $(COMMON_OBJS_32)
32*b70bf3eeSBill Sommerfeld$(PROGS_64) := OBJS += $(BASEPROG:%=%.64.o) $(COMMON_OBJS_64)
33*b70bf3eeSBill Sommerfeld$(PROGS_64) := LDLIBS += $(LDLIBS64)
34*b70bf3eeSBill Sommerfeld
35*b70bf3eeSBill SommerfeldLDLIBS += -lmd
36*b70bf3eeSBill Sommerfeld
37*b70bf3eeSBill SommerfeldCSTD = $(CSTD_GNU99)
38*b70bf3eeSBill Sommerfeld
39*b70bf3eeSBill SommerfeldCMDS = $(PROGS:%=$(TESTDIR)/%)
40*b70bf3eeSBill Sommerfeld
41*b70bf3eeSBill Sommerfeld$(CMDS) := FILEMODE = 0555
42*b70bf3eeSBill Sommerfeld
43*b70bf3eeSBill Sommerfeldall: $(PROGS)
44*b70bf3eeSBill Sommerfeld
45*b70bf3eeSBill Sommerfeld%_32: %.32.o $(COMMON_OBJS_32)
46*b70bf3eeSBill Sommerfeld	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
47*b70bf3eeSBill Sommerfeld	$(POST_PROCESS)
48*b70bf3eeSBill Sommerfeld
49*b70bf3eeSBill Sommerfeld%_64: %.64.o $(COMMON_OBJS_64)
50*b70bf3eeSBill Sommerfeld	$(LINK64.c) $(OBJS) -o $@ $(LDLIBS)
51*b70bf3eeSBill Sommerfeld	$(POST_PROCESS)
52*b70bf3eeSBill Sommerfeld
53*b70bf3eeSBill Sommerfeld%.32.o: %.c
54*b70bf3eeSBill Sommerfeld	$(COMPILE.c) -o $@ $<
55*b70bf3eeSBill Sommerfeld	$(POST_PROCESS_O)
56*b70bf3eeSBill Sommerfeld
57*b70bf3eeSBill Sommerfeld%.64.o: %.c
58*b70bf3eeSBill Sommerfeld	$(COMPILE64.c) -o $@ $<
59*b70bf3eeSBill Sommerfeld	$(POST_PROCESS_O)
60*b70bf3eeSBill Sommerfeld
61*b70bf3eeSBill Sommerfeldinstall: all $(CMDS)
62*b70bf3eeSBill Sommerfeld
63*b70bf3eeSBill Sommerfeldclobber: clean
64*b70bf3eeSBill Sommerfeld	-$(RM) $(PROGS)
65*b70bf3eeSBill Sommerfeld
66*b70bf3eeSBill Sommerfeldclean:
67*b70bf3eeSBill Sommerfeld	-$(RM) *.o $(PROGS)
68*b70bf3eeSBill Sommerfeld
69*b70bf3eeSBill Sommerfeld$(CMDS): $(TESTDIR) $(PROGS)
70*b70bf3eeSBill Sommerfeld
71*b70bf3eeSBill Sommerfeld$(TESTDIR):
72*b70bf3eeSBill Sommerfeld	$(INS.dir)
73*b70bf3eeSBill Sommerfeld
74*b70bf3eeSBill Sommerfeld$(TESTDIR)/%_32: %_32
75*b70bf3eeSBill Sommerfeld	$(INS.file)
76*b70bf3eeSBill Sommerfeld
77*b70bf3eeSBill Sommerfeld$(TESTDIR)/%_64: %_64
78*b70bf3eeSBill Sommerfeld	$(INS.file)
79