xref: /titanic_41/usr/src/lib/libwanbootutil/Makefile.com (revision 3ee0e49223f178da635734759b9167f924321ff0)
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 (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28LIBRARY	=	libwanbootutil.a
29VERS =		.1
30
31# List of locally located modules.
32LOC_DIR =	../common
33LOC_OBJS =	key_xdr.o \
34		key_util.o \
35		wbio.o
36LOC_SRCS =	$(LOC_OBJS:%.o=$(LOC_DIR)/%.c)
37
38# The crypto modules are located under usr/src/common.
39CRYPTO_DIR =	$(SRC)/common/net/wanboot/crypt
40CRYPTO_OBJS =	hmac_sha1.o \
41		aes.o \
42		des3.o \
43		des.o \
44		cbc.o
45CRYPTO_SRCS =	$(CRYPTO_OBJS:%.o=$(CRYPTO_DIR)/%.c)
46
47# Together the local and crypto modules makeup the entire wad.
48OBJECTS	=	$(LOC_OBJS) $(CRYPTO_OBJS)
49
50include $(SRC)/lib/Makefile.lib
51
52LIBS +=		$(LINTLIB)
53LDLIBS +=	-lc -lnsl -lmd
54
55# Must override SRCS from Makefile.lib since sources have
56# multiple source directories.
57SRCS =		$(LOC_SRCS) $(CRYPTO_SRCS)
58
59# Must define location of lint library source.
60SRCDIR =	$(LOC_DIR)
61$(LINTLIB):=	SRCS = $(SRCDIR)/$(LINTSRC)
62
63MAPDIR =	../spec/$(TRANSMACH)
64SPECMAPFILE =	$(MAPDIR)/mapfile
65
66# Library includes sources created via rpcgen. And rpcgen unfortunately
67# created unused function variables.
68LINTFLAGS +=	-erroff=E_FUNC_VAR_UNUSED
69
70CPPFLAGS +=	-I$(CRYPTO_DIR)
71
72install:	all
73
74all:		$(LIBS)
75
76lint:		lintcheck
77
78
79# Define rule for local modules.
80objs/%.o pics/%.o:	$(LOC_DIR)/%.c
81			$(COMPILE.c) -o $@ $<
82			$(POST_PROCESS_O)
83
84# Define rule for crypto modules.
85objs/%.o pics/%.o:	$(CRYPTO_DIR)/%.c
86			$(COMPILE.c) -o $@ $<
87			$(POST_PROCESS_O)
88
89include $(SRC)/lib/Makefile.targ
90