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 = libwanboot.a 29VERS = .1 30 31include $(SRC)/lib/openssl/Makefile.openssl 32 33# List of locally located modules. 34LOC_DIR = ../common 35LOC_OBJS = socket_inet.o bootinfo_aux.o 36LOC_SRCS = $(LOC_OBJS:%.o=$(LOC_DIR)/%.c) 37 38# List of common wanboot objects. 39COM_DIR = ../../../common/net/wanboot 40COM_OBJS = auxutil.o \ 41 boot_http.o \ 42 bootconf.o \ 43 bootconf_errmsg.o \ 44 bootinfo.o \ 45 bootlog.o \ 46 http_errorstr.o \ 47 p12access.o \ 48 p12auxpars.o \ 49 p12auxutl.o \ 50 p12err.o \ 51 p12misc.o \ 52 parseURL.o 53COM_SRCS = $(COM_OBJS:%.o=$(COM_DIR)/%.c) 54 55# List of common DHCP modules. 56DHCP_DIR = $(SRC)/common/net/dhcp 57DHCP_OBJS = dhcpinfo.o 58DHCP_SRCS = $(DHCP_OBJS:%.o=$(DHCP_DIR)/%.c) 59 60OBJECTS = $(LOC_OBJS) $(COM_OBJS) $(DHCP_OBJS) 61 62include ../../Makefile.lib 63 64LIBS += $(LINTLIB) 65LDLIBS += -lnvpair -lresolv -lnsl -lsocket -ldevinfo -ldhcputil \ 66 -linetutil -lc $(OPENSSL_LDFLAGS) -lcrypto -lssl 67DYNFLAGS += $(OPENSSL_DYNFLAGS) 68# 69# Note this uses CPPFLAGS.master to prepend because our parent may have 70# an old version of the OpenSSL headers in $ROOT/usr/include/openssl 71CPPFLAGS = $(OPENSSL_CPPFLAGS) \ 72 -I$(SRC)/common/net/wanboot/crypt $(CPPFLAGS.master) 73 74# Must override SRCS from Makefile.lib since sources have 75# multiple source directories. 76SRCS = $(LOC_SRCS) $(COM_SRCS) $(DHCP_SRCS) 77 78# Must define location of lint library source. 79SRCDIR = $(LOC_DIR) 80$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC) 81 82# OpenSSL requires us to turn this off 83LINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN 84 85CFLAGS += $(CCVERBOSE) 86CPPFLAGS += -I$(LOC_DIR) -I$(COM_DIR) -I$(DHCP_DIR) 87 88.KEEP_STATE: 89 90all: $(LIBS) 91 92lint: lintcheck 93 94pics/%.o: $(COM_DIR)/%.c 95 $(COMPILE.c) -o $@ $< 96 $(POST_PROCESS_O) 97 98pics/%.o: $(DHCP_DIR)/%.c 99 $(COMPILE.c) -o $@ $< 100 $(POST_PROCESS_O) 101 102include ../../Makefile.targ 103