10Sstevel@tonic-gate# 20Sstevel@tonic-gate# CDDL HEADER START 30Sstevel@tonic-gate# 40Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5*1694Sdarrenm# Common Development and Distribution License (the "License"). 6*1694Sdarrenm# You may not use this file except in compliance with the License. 70Sstevel@tonic-gate# 80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate# See the License for the specific language governing permissions 110Sstevel@tonic-gate# and limitations under the License. 120Sstevel@tonic-gate# 130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate# 190Sstevel@tonic-gate# CDDL HEADER END 200Sstevel@tonic-gate# 210Sstevel@tonic-gate# 22*1694Sdarrenm# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate# Use is subject to license terms. 240Sstevel@tonic-gate# 250Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 260Sstevel@tonic-gate# 270Sstevel@tonic-gate 280Sstevel@tonic-gateLIBRARY = libwanbootutil.a 290Sstevel@tonic-gateVERS = .1 300Sstevel@tonic-gate 310Sstevel@tonic-gate# List of locally located modules. 320Sstevel@tonic-gateLOC_DIR = ../common 330Sstevel@tonic-gateLOC_OBJS = key_xdr.o \ 340Sstevel@tonic-gate key_util.o \ 350Sstevel@tonic-gate wbio.o 360Sstevel@tonic-gateLOC_SRCS = $(LOC_OBJS:%.o=$(LOC_DIR)/%.c) 370Sstevel@tonic-gate 380Sstevel@tonic-gate# The crypto modules are located under usr/src/common. 390Sstevel@tonic-gateCRYPTO_DIR = $(SRC)/common/net/wanboot/crypt 400Sstevel@tonic-gateCRYPTO_OBJS = hmac_sha1.o \ 410Sstevel@tonic-gate aes.o \ 420Sstevel@tonic-gate des3.o \ 430Sstevel@tonic-gate des.o \ 440Sstevel@tonic-gate cbc.o 450Sstevel@tonic-gateCRYPTO_SRCS = $(CRYPTO_OBJS:%.o=$(CRYPTO_DIR)/%.c) 460Sstevel@tonic-gate 470Sstevel@tonic-gate# Together the local and crypto modules makeup the entire wad. 480Sstevel@tonic-gateOBJECTS = $(LOC_OBJS) $(CRYPTO_OBJS) 490Sstevel@tonic-gate 500Sstevel@tonic-gateinclude $(SRC)/lib/Makefile.lib 510Sstevel@tonic-gate 520Sstevel@tonic-gateLIBS += $(LINTLIB) 53*1694SdarrenmLDLIBS += -lc -lnsl -lmd 540Sstevel@tonic-gate 550Sstevel@tonic-gate# Must override SRCS from Makefile.lib since sources have 560Sstevel@tonic-gate# multiple source directories. 570Sstevel@tonic-gateSRCS = $(LOC_SRCS) $(CRYPTO_SRCS) 580Sstevel@tonic-gate 590Sstevel@tonic-gate# Must define location of lint library source. 600Sstevel@tonic-gateSRCDIR = $(LOC_DIR) 610Sstevel@tonic-gate$(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC) 620Sstevel@tonic-gate 630Sstevel@tonic-gate# Library includes sources created via rpcgen. And rpcgen unfortunately 640Sstevel@tonic-gate# created unused function variables. 650Sstevel@tonic-gateLINTFLAGS += -erroff=E_FUNC_VAR_UNUSED 660Sstevel@tonic-gate 670Sstevel@tonic-gateCPPFLAGS += -I$(CRYPTO_DIR) 680Sstevel@tonic-gate 690Sstevel@tonic-gateinstall: all 700Sstevel@tonic-gate 710Sstevel@tonic-gateall: $(LIBS) 720Sstevel@tonic-gate 730Sstevel@tonic-gatelint: lintcheck 740Sstevel@tonic-gate 750Sstevel@tonic-gate 760Sstevel@tonic-gate# Define rule for local modules. 770Sstevel@tonic-gateobjs/%.o pics/%.o: $(LOC_DIR)/%.c 780Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 790Sstevel@tonic-gate $(POST_PROCESS_O) 800Sstevel@tonic-gate 810Sstevel@tonic-gate# Define rule for crypto modules. 820Sstevel@tonic-gateobjs/%.o pics/%.o: $(CRYPTO_DIR)/%.c 830Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 840Sstevel@tonic-gate $(POST_PROCESS_O) 850Sstevel@tonic-gate 860Sstevel@tonic-gateinclude $(SRC)/lib/Makefile.targ 87