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# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 22# Use is subject to license terms. 23# 24 25LIBRARY = libwanboot.a 26VERS = .1 27 28# List of locally located modules. 29LOC_DIR = ../common 30LOC_OBJS = socket_inet.o bootinfo_aux.o 31LOC_SRCS = $(LOC_OBJS:%.o=$(LOC_DIR)/%.c) 32 33# List of common wanboot objects. 34COM_DIR = ../../../common/net/wanboot 35COM_OBJS = auxutil.o \ 36 boot_http.o \ 37 bootconf.o \ 38 bootconf_errmsg.o \ 39 bootinfo.o \ 40 bootlog.o \ 41 http_errorstr.o \ 42 p12access.o \ 43 p12auxpars.o \ 44 p12auxutl.o \ 45 p12err.o \ 46 p12misc.o \ 47 parseURL.o 48COM_SRCS = $(COM_OBJS:%.o=$(COM_DIR)/%.c) 49 50# List of common DHCP modules. 51DHCP_DIR = $(SRC)/common/net/dhcp 52DHCP_OBJS = dhcpinfo.o 53DHCP_SRCS = $(DHCP_OBJS:%.o=$(DHCP_DIR)/%.c) 54 55OBJECTS = $(LOC_OBJS) $(COM_OBJS) $(DHCP_OBJS) 56 57include ../../Makefile.lib 58 59LIBS += $(LINTLIB) 60LDLIBS += -lnvpair -lresolv -lnsl -lsocket -ldevinfo -ldhcputil \ 61 -linetutil -lc -lcrypto -lssl 62CPPFLAGS = -I$(SRC)/common/net/wanboot/crypt $(CPPFLAGS.master) 63CERRWARN += -_gcc=-Wno-switch 64CERRWARN += -_gcc=-Wno-parentheses 65CERRWARN += -_gcc=-Wno-unused-value 66CERRWARN += -_gcc=-Wno-uninitialized 67 68# Must override SRCS from Makefile.lib since sources have 69# multiple source directories. 70SRCS = $(LOC_SRCS) $(COM_SRCS) $(DHCP_SRCS) 71 72# Must define location of lint library source. 73SRCDIR = $(LOC_DIR) 74$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC) 75 76# OpenSSL requires us to turn this off 77LINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN 78 79CFLAGS += $(CCVERBOSE) 80CPPFLAGS += -I$(LOC_DIR) -I$(COM_DIR) -I$(DHCP_DIR) 81 82.KEEP_STATE: 83 84all: $(LIBS) 85 86lint: lintcheck 87 88pics/%.o: $(COM_DIR)/%.c 89 $(COMPILE.c) -o $@ $< 90 $(POST_PROCESS_O) 91 92pics/%.o: $(DHCP_DIR)/%.c 93 $(COMPILE.c) -o $@ $< 94 $(POST_PROCESS_O) 95 96include ../../Makefile.targ 97