xref: /titanic_44/usr/src/lib/libwanbootutil/Makefile.com (revision 06e1a7147edd272b7296f208141627a5b1191731)
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
63# Library includes sources created via rpcgen. And rpcgen unfortunately
64# created unused function variables.
65LINTFLAGS +=	-erroff=E_FUNC_VAR_UNUSED
66
67CPPFLAGS +=	-I$(CRYPTO_DIR)
68
69install:	all
70
71all:		$(LIBS)
72
73lint:		lintcheck
74
75
76# Define rule for local modules.
77objs/%.o pics/%.o:	$(LOC_DIR)/%.c
78			$(COMPILE.c) -o $@ $<
79			$(POST_PROCESS_O)
80
81# Define rule for crypto modules.
82objs/%.o pics/%.o:	$(CRYPTO_DIR)/%.c
83			$(COMPILE.c) -o $@ $<
84			$(POST_PROCESS_O)
85
86include $(SRC)/lib/Makefile.targ
87