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