xref: /titanic_50/usr/src/lib/libmd5/Makefile.com (revision 0167b58cea98965c58fab4be4e690b6e456f7440)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# lib/libmd5/Makefile.com
29#
30
31LIBRARY= libmd5.a
32VERS= .1
33
34OBJECTS= md5.o
35COMMON= $(SRC)/common/crypto/md5
36
37include ../../Makefile.lib
38
39# install this library in the root filesystem
40include ../../Makefile.rootfs
41
42LIBS= $(DYNLIB) $(LINTLIB)
43
44# Macros to help build the shared object
45MAPFILE= $(MAPDIR)/mapfile
46DYNFLAGS += -M$(MAPFILE)
47CPPFLAGS += -D__RESTRICT
48CFLAGS += $(CCVERBOSE)
49
50DYNFLAGS +=	$(BDIRECT)
51LDLIBS +=	-lc
52
53# Macros to help build the lint library
54LINTSRC= $(LINTLIB:%.ln=%)
55$(LINTLIB) := SRCS= ../$(LINTSRC)
56SRCS= $(OBJECTS:%.o=$(COMMON)/%.c)
57ROOTLINT= $(LINTSRC:%=$(ROOTLIBDIR)/%)
58$(ROOTLIBDIR)/%: ../%
59	$(INS.file)
60
61# The md5 code is very careful about data alignment
62# but lint doesn't know that, so just shut lint up.
63lint := LINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN
64lint := LINTFLAGS64 += -erroff=E_BAD_PTR_CAST_ALIGN
65
66.KEEP_STATE:
67
68$(DYNLIB): $(MAPFILE)
69
70$(MAPFILE):
71	@cd $(MAPDIR); pwd; $(MAKE) mapfile
72
73all: $(LIBS) fnamecheck
74
75lint: lintcheck
76
77include $(SRC)/lib/Makefile.targ
78
79pics/%.o: $(COMMON)/%.c
80	$(COMPILE.c) -o $@ $<
81	$(POST_PROCESS_O)
82