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.
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.
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]
22 # Copyright 2006 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
25 # Copyright (c) 2012 by Delphix. All rights reserved.
28 LIBRARY = libwanbootutil.a
31 # List of locally located modules.
33 LOC_OBJS = key_xdr.o \
36 LOC_SRCS = $(LOC_OBJS:%.o=$(LOC_DIR)/%.c)
38 # The crypto modules are located under usr/src/common.
39 CRYPTO_DIR = $(SRC)/common/net/wanboot/crypt
40 CRYPTO_OBJS = hmac_sha1.o \
45 CRYPTO_SRCS = $(CRYPTO_OBJS:%.o=$(CRYPTO_DIR)/%.c)
47 # Together the local and crypto modules makeup the entire wad.
48 OBJECTS = $(LOC_OBJS) $(CRYPTO_OBJS)
50 include $(SRC)/lib/Makefile.lib
53 LDLIBS += -lc -lnsl -lmd
55 # Must override SRCS from Makefile.lib since sources have
56 # multiple source directories.
57 SRCS = $(LOC_SRCS) $(CRYPTO_SRCS)
59 # Must define location of lint library source.
61 $(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC)
63 # Library includes sources created via rpcgen. And rpcgen unfortunately
64 # created unused function variables.
65 LINTFLAGS += -erroff=E_FUNC_VAR_UNUSED
66 LINTFLAGS64 += -erroff=E_FUNC_VAR_UNUSED
68 CPPFLAGS += -I$(CRYPTO_DIR)
70 CERRWARN += -_gcc=-Wno-unused-variable
71 CERRWARN += -_gcc=-Wno-type-limits
72 CERRWARN += -_gcc=-Wno-uninitialized
81 # Define rule for local modules.
82 objs/%.o pics/%.o: $(LOC_DIR)/%.c
86 # Define rule for crypto modules.
87 objs/%.o pics/%.o: $(CRYPTO_DIR)/%.c
91 include $(SRC)/lib/Makefile.targ