Makefile.com revision 734b6a94890be549309b21156f8ed6d4561cac51
734b6a94890be549309b21156f8ed6d4561cac51darrenm#
734b6a94890be549309b21156f8ed6d4561cac51darrenm# CDDL HEADER START
734b6a94890be549309b21156f8ed6d4561cac51darrenm#
734b6a94890be549309b21156f8ed6d4561cac51darrenm# The contents of this file are subject to the terms of the
734b6a94890be549309b21156f8ed6d4561cac51darrenm# Common Development and Distribution License (the "License").
734b6a94890be549309b21156f8ed6d4561cac51darrenm# You may not use this file except in compliance with the License.
734b6a94890be549309b21156f8ed6d4561cac51darrenm#
734b6a94890be549309b21156f8ed6d4561cac51darrenm# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
734b6a94890be549309b21156f8ed6d4561cac51darrenm# or http://www.opensolaris.org/os/licensing.
734b6a94890be549309b21156f8ed6d4561cac51darrenm# See the License for the specific language governing permissions
734b6a94890be549309b21156f8ed6d4561cac51darrenm# and limitations under the License.
734b6a94890be549309b21156f8ed6d4561cac51darrenm#
734b6a94890be549309b21156f8ed6d4561cac51darrenm# When distributing Covered Code, include this CDDL HEADER in each
734b6a94890be549309b21156f8ed6d4561cac51darrenm# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
734b6a94890be549309b21156f8ed6d4561cac51darrenm# If applicable, add the following below this CDDL HEADER, with the
734b6a94890be549309b21156f8ed6d4561cac51darrenm# fields enclosed by brackets "[]" replaced with your own identifying
734b6a94890be549309b21156f8ed6d4561cac51darrenm# information: Portions Copyright [yyyy] [name of copyright owner]
734b6a94890be549309b21156f8ed6d4561cac51darrenm#
734b6a94890be549309b21156f8ed6d4561cac51darrenm# CDDL HEADER END
734b6a94890be549309b21156f8ed6d4561cac51darrenm#
734b6a94890be549309b21156f8ed6d4561cac51darrenm#
734b6a94890be549309b21156f8ed6d4561cac51darrenm# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
734b6a94890be549309b21156f8ed6d4561cac51darrenm# Use is subject to license terms.
734b6a94890be549309b21156f8ed6d4561cac51darrenm#
734b6a94890be549309b21156f8ed6d4561cac51darrenm# ident "%Z%%M% %I% %E% SMI"
734b6a94890be549309b21156f8ed6d4561cac51darrenm#
734b6a94890be549309b21156f8ed6d4561cac51darrenm# lib/libmd/Makefile.com
734b6a94890be549309b21156f8ed6d4561cac51darrenm#
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenm# $LIBRARY is set in lower makefiles so we can have platform and
734b6a94890be549309b21156f8ed6d4561cac51darrenm# processor optimised versions of this library via libmd_psr and libmd_hwcapN
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenm#LIBRARY= libmd.a
734b6a94890be549309b21156f8ed6d4561cac51darrenmVERS= .1
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenmOBJECTS= md4.o md5.o sha1.o sha2.o
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenm# Use $(SRC) to include makefiles rather than ../../ because the
734b6a94890be549309b21156f8ed6d4561cac51darrenm# platform subdirs are one level deeper so it would be ../../../ for them
734b6a94890be549309b21156f8ed6d4561cac51darrenminclude $(SRC)/lib/Makefile.lib
734b6a94890be549309b21156f8ed6d4561cac51darrenminclude $(SRC)/lib/Makefile.rootfs
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenmLIBS = $(DYNLIB) $(LINTLIB)
734b6a94890be549309b21156f8ed6d4561cac51darrenmSRCS = \
734b6a94890be549309b21156f8ed6d4561cac51darrenm $(COMDIR)/md4/md4.c \
734b6a94890be549309b21156f8ed6d4561cac51darrenm $(COMDIR)/md5/md5.c \
734b6a94890be549309b21156f8ed6d4561cac51darrenm $(COMDIR)/sha1/sha1.c \
734b6a94890be549309b21156f8ed6d4561cac51darrenm $(COMDIR)/sha2/sha2.c
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenmCOMDIR= $(SRC)/common/crypto
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenm$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
734b6a94890be549309b21156f8ed6d4561cac51darrenmLDLIBS += -lc
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenmSRCDIR = ../common
734b6a94890be549309b21156f8ed6d4561cac51darrenmCOMDIR = $(SRC)/common/crypto
734b6a94890be549309b21156f8ed6d4561cac51darrenmMAPDIR = ../spec/$(TRANSMACH)
734b6a94890be549309b21156f8ed6d4561cac51darrenmSPECMAPFILE = $(MAPDIR)/mapfile
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenmCFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
734b6a94890be549309b21156f8ed6d4561cac51darrenmCFLAGS64 += $(C_BIGPICFLAGS)
734b6a94890be549309b21156f8ed6d4561cac51darrenmCPPFLAGS += -I$(SRCDIR)
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenm# The md5 and sha1 code is very careful about data alignment
734b6a94890be549309b21156f8ed6d4561cac51darrenm# but lint doesn't know that, so just shut lint up.
734b6a94890be549309b21156f8ed6d4561cac51darrenmLINTFLAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
734b6a94890be549309b21156f8ed6d4561cac51darrenmLINTFLAGS64 += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenmROOTLINT= $(LINTSRC:%=$(ROOTLIBDIR)/%)
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenm.KEEP_STATE:
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenmall: $(LIBS) fnamecheck
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenmlint: lintcheck
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenmpics/%.o: $(COMDIR)/md4/%.c
734b6a94890be549309b21156f8ed6d4561cac51darrenm $(COMPILE.c) -I$(COMDIR)/md4 -o $@ $<
734b6a94890be549309b21156f8ed6d4561cac51darrenm $(POST_PROCESS_O)
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenmpics/%.o: $(COMDIR)/md5/%.c
734b6a94890be549309b21156f8ed6d4561cac51darrenm $(COMPILE.c) -I$(COMDIR)/md5 $(INLINES) -o $@ $<
734b6a94890be549309b21156f8ed6d4561cac51darrenm $(POST_PROCESS_O)
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenmpics/%.o: $(COMDIR)/sha1/%.c
734b6a94890be549309b21156f8ed6d4561cac51darrenm $(COMPILE.c) -I$(COMDIR)/sha1 -o $@ $<
734b6a94890be549309b21156f8ed6d4561cac51darrenm $(POST_PROCESS_O)
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenmpics/%.o: $(COMDIR)/sha1/sparc/$(PLATFORM)/sha1_asm.s
734b6a94890be549309b21156f8ed6d4561cac51darrenm $(COMPILE.s) -P -DPIC -D_ASM -o $@ $<
734b6a94890be549309b21156f8ed6d4561cac51darrenm $(POST_PROCESS_O)
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenmpics/%.o: $(COMDIR)/sha2/%.c
734b6a94890be549309b21156f8ed6d4561cac51darrenm $(COMPILE.c) -I$(COMDIR)/sha2 -o $@ $<
734b6a94890be549309b21156f8ed6d4561cac51darrenm $(POST_PROCESS_O)
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenm#
734b6a94890be549309b21156f8ed6d4561cac51darrenm# Used when building links in /platform/$(PLATFORM)/lib for libmd_psr.so.1
734b6a94890be549309b21156f8ed6d4561cac51darrenm#
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenmLIBMD_PSR_DIRS = $(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%/lib)
734b6a94890be549309b21156f8ed6d4561cac51darrenmLIBMD_PSR_LINKS = $(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%/lib/$(MODULE))
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenmLIBMD_PSR64_DIRS = $(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%/lib/$(MACH64))
734b6a94890be549309b21156f8ed6d4561cac51darrenmLIBMD_PSR64_LINKS = $(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%/lib/$(MACH64)/$(MODULE))
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenmINS.slink6 = $(RM) -r $@; $(SYMLINK) ../../$(PLATFORM)/lib/$(MODULE) $@ $(CHOWNLINK) $(CHGRPLINK)
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenmINS.slink64 = $(RM) -r $@; $(SYMLINK) ../../../$(PLATFORM)/lib/$(MACH64)/$(MODULE) $@ $(CHOWNLINK) $(CHGRPLINK)
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenm$(LIBMD_PSR_DIRS):
734b6a94890be549309b21156f8ed6d4561cac51darrenm -$(INS.dir.root.bin)
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenm$(LIBMD_PSR_LINKS): $(LIBMD_PSR_DIRS)
734b6a94890be549309b21156f8ed6d4561cac51darrenm -$(INS.slink6)
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenm$(LIBMD_PSR64_DIRS):
734b6a94890be549309b21156f8ed6d4561cac51darrenm -$(INS.dir.root.bin)
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenm$(LIBMD_PSR64_LINKS): $(LIBMD_PSR64_DIRS)
734b6a94890be549309b21156f8ed6d4561cac51darrenm -$(INS.slink64)
734b6a94890be549309b21156f8ed6d4561cac51darrenm
734b6a94890be549309b21156f8ed6d4561cac51darrenminclude $(SRC)/lib/Makefile.targ