xref: /illumos-gate/usr/src/lib/libmd/amd64/Makefile (revision 5d9d9091f564c198a760790b0bfa72c44e17912b)
1734b6a94Sdarrenm#
2734b6a94Sdarrenm# CDDL HEADER START
3734b6a94Sdarrenm#
4734b6a94Sdarrenm# The contents of this file are subject to the terms of the
5734b6a94Sdarrenm# Common Development and Distribution License (the "License").
6734b6a94Sdarrenm# You may not use this file except in compliance with the License.
7734b6a94Sdarrenm#
8734b6a94Sdarrenm# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9734b6a94Sdarrenm# or http://www.opensolaris.org/os/licensing.
10734b6a94Sdarrenm# See the License for the specific language governing permissions
11734b6a94Sdarrenm# and limitations under the License.
12734b6a94Sdarrenm#
13734b6a94Sdarrenm# When distributing Covered Code, include this CDDL HEADER in each
14734b6a94Sdarrenm# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15734b6a94Sdarrenm# If applicable, add the following below this CDDL HEADER, with the
16734b6a94Sdarrenm# fields enclosed by brackets "[]" replaced with your own identifying
17734b6a94Sdarrenm# information: Portions Copyright [yyyy] [name of copyright owner]
18734b6a94Sdarrenm#
19734b6a94Sdarrenm# CDDL HEADER END
20734b6a94Sdarrenm#
21734b6a94Sdarrenm#
221e49577aSRod Evans# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
2345818ee1SMatthew Ahrens# Copyright 2013 Saso Kiselkov. All rights reserved.
24734b6a94Sdarrenm#
25734b6a94Sdarrenm
26734b6a94SdarrenmLIBRARY =	libmd.a
271e49577aSRod EvansVERS =		.1
28734b6a94Sdarrenm
2945818ee1SMatthew AhrensOBJECTS =	edonr.o md4.o md5.o sha1.o sha2.o \
3045818ee1SMatthew Ahrens		skein.o skein_block.o skein_iv.o
31160abee0Sda73024
321e49577aSRod Evansinclude		$(SRC)/lib/Makefile.lib
331e49577aSRod Evansinclude		$(SRC)/lib/Makefile.rootfs
34734b6a94Sdarrenminclude		$(SRC)/lib/Makefile.lib.64
351e49577aSRod Evansinclude		../Makefile.com
36734b6a94Sdarrenm
374282a9f9SRobert MustacchiCAPFILES =	pics/sha1-ni.o \
384282a9f9SRobert Mustacchi		pics/sha256-ni.o
394282a9f9SRobert Mustacchi
401e49577aSRod EvansEXTPICS =	pics/md5_amd64.o \
411e49577aSRod Evans		pics/sha512-x86_64.o \
424282a9f9SRobert Mustacchi		pics/sha256-x86_64.o \
434282a9f9SRobert Mustacchi		pics/sha1-x86_64.o \
444282a9f9SRobert Mustacchi		$(CAPFILES:%.o=%.o.symcap)
451e49577aSRod Evans
461e49577aSRod EvansCLEANFILES +=	$(EXTPICS) \
47*5d9d9091SRichard Lowe		$(EXTPICS:pics/%.o=%.S) \
484282a9f9SRobert Mustacchi		$(EXTPICS:pics/%.o=%.s) \
494282a9f9SRobert Mustacchi		$(CAPFILES) \
504282a9f9SRobert Mustacchi		$(CAPFILES:%.o=%.o.objcap) \
514282a9f9SRobert Mustacchi		$(CAPFILES:%.o=%.o.symcap)
524282a9f9SRobert Mustacchi
534282a9f9SRobert Mustacchipics/sha1-ni.o.objcap		:= CAPFILE = capabilities/sha.cap
544282a9f9SRobert Mustacchipics/sha256-ni.o.objcap		:= CAPFILE = capabilities/sha.cap
55160abee0Sda73024
56160abee0Sda73024# This prevents <sys/asm_linkage.h> from including C source:
57160abee0Sda73024AS_CPPFLAGS += -D_ASM
58160abee0Sda73024
591e49577aSRod Evans.KEPP_STATE:
601e49577aSRod Evans
611e49577aSRod Evansall:		$(LIBS)
621e49577aSRod Evans
63cd61ae21SRichard Loweinstall:	all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTCOMPATLINKS64)
641e49577aSRod Evans
6555553f71Sda73024pics/%.o: %.s
66321502cdSda73024		$(COMPILE.s) -o $@ ${@F:.o=.s}
67321502cdSda73024		$(POST_PROCESS_O)
68321502cdSda73024
69*5d9d9091SRichard Lowepics/%.o: %.S
70*5d9d9091SRichard Lowe		$(COMPILE.s) -o $@ ${@F:.o=.S}
71*5d9d9091SRichard Lowe		$(POST_PROCESS_O)
72*5d9d9091SRichard Lowe
73*5d9d9091SRichard Lowepics/%.o: $(SRC)/common/crypto/sha1/amd64/%.S
744282a9f9SRobert Mustacchi		$(COMPILE.s) -o $@ $<
754282a9f9SRobert Mustacchi		$(POST_PROCESS_O)
764282a9f9SRobert Mustacchi
77*5d9d9091SRichard Lowepics/%.o: $(SRC)/common/crypto/sha2/amd64/%.S
784282a9f9SRobert Mustacchi		$(COMPILE.s) -o $@ $<
794282a9f9SRobert Mustacchi		$(POST_PROCESS_O)
804282a9f9SRobert Mustacchi
814282a9f9SRobert Mustacchipics/%.o.objcap: pics/%.o
8285f4cb87SRichard Lowe		$(LD) -r -o $@ -Wl,-M$(CAPFILE) $(BREDUCE) $<
834282a9f9SRobert Mustacchi		$(POST_PROCESS_O)
844282a9f9SRobert Mustacchi
854282a9f9SRobert Mustacchipics/%.o.symcap: pics/%.o.objcap
864282a9f9SRobert Mustacchi		$(LD) -r -o $@ -z symbolcap $<
874282a9f9SRobert Mustacchi
88*5d9d9091SRichard Lowemd5_amd64.S: $(COMDIR)/md5/amd64/md5_amd64.pl
89160abee0Sda73024		$(PERL) $? $@
90160abee0Sda73024
91*5d9d9091SRichard Lowesha1-x86_64.S: $(COMDIR)/sha1/amd64/sha1-x86_64.pl
92321502cdSda73024		$(PERL) $? $@
9355553f71Sda73024
94*5d9d9091SRichard Lowesha512-x86_64.S: $(COMDIR)/sha2/amd64/sha512-x86_64.pl
9555553f71Sda73024		$(PERL) $? $@
9655553f71Sda73024
97*5d9d9091SRichard Lowesha256-x86_64.S: $(COMDIR)/sha2/amd64/sha512-x86_64.pl
9855553f71Sda73024		$(PERL) $? $@
991e49577aSRod Evans
1001e49577aSRod Evansinclude		../Makefile.targ
101