xref: /titanic_52/usr/src/lib/libwanbootutil/Makefile.com (revision bdfc6d18da790deeec2e0eb09c625902defe2498)
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 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29LIBRARY	=	libwanbootutil.a
30VERS =		.1
31
32# List of locally located modules.
33LOC_DIR =	../common
34LOC_OBJS =	key_xdr.o \
35		key_util.o \
36		wbio.o
37LOC_SRCS =	$(LOC_OBJS:%.o=$(LOC_DIR)/%.c)
38
39# The crypto modules are located under usr/src/common.
40CRYPTO_DIR =	$(SRC)/common/net/wanboot/crypt
41CRYPTO_OBJS =	hmac_sha1.o \
42		sha1.o \
43		aes.o \
44		des3.o \
45		des.o \
46		cbc.o
47CRYPTO_SRCS =	$(CRYPTO_OBJS:%.o=$(CRYPTO_DIR)/%.c)
48
49# Together the local and crypto modules makeup the entire wad.
50OBJECTS	=	$(LOC_OBJS) $(CRYPTO_OBJS)
51
52include $(SRC)/lib/Makefile.lib
53
54LIBS +=		$(LINTLIB)
55LDLIBS +=	-lc -lnsl
56
57# Must override SRCS from Makefile.lib since sources have
58# multiple source directories.
59SRCS =		$(LOC_SRCS) $(CRYPTO_SRCS)
60
61# Must define location of lint library source.
62SRCDIR =	$(LOC_DIR)
63$(LINTLIB):=	SRCS = $(SRCDIR)/$(LINTSRC)
64
65MAPDIR =	../spec/$(TRANSMACH)
66SPECMAPFILE =	$(MAPDIR)/mapfile
67
68# Library includes sources created via rpcgen. And rpcgen unfortunately
69# created unused function variables.
70LINTFLAGS +=	-erroff=E_FUNC_VAR_UNUSED
71
72CPPFLAGS +=	-I$(CRYPTO_DIR)
73
74install:	all
75
76all:		$(LIBS)
77
78lint:		lintcheck
79
80
81# Define rule for local modules.
82objs/%.o pics/%.o:	$(LOC_DIR)/%.c
83			$(COMPILE.c) -o $@ $<
84			$(POST_PROCESS_O)
85
86# Define rule for crypto modules.
87objs/%.o pics/%.o:	$(CRYPTO_DIR)/%.c
88			$(COMPILE.c) -o $@ $<
89			$(POST_PROCESS_O)
90
91include $(SRC)/lib/Makefile.targ
92