xref: /titanic_41/usr/src/lib/libwanboot/Makefile.com (revision 657a8c206b913d1ee578fd725f0b25eca5b77253)
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)
63
64# Must override SRCS from Makefile.lib since sources have
65# multiple source directories.
66SRCS =		$(LOC_SRCS) $(COM_SRCS) $(DHCP_SRCS)
67
68# Must define location of lint library source.
69SRCDIR =	$(LOC_DIR)
70$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
71
72# OpenSSL requires us to turn this off
73LINTFLAGS +=    -erroff=E_BAD_PTR_CAST_ALIGN
74
75CFLAGS +=	$(CCVERBOSE)
76CPPFLAGS +=	-I$(LOC_DIR) -I$(COM_DIR) -I$(DHCP_DIR)
77
78.KEEP_STATE:
79
80all: $(LIBS)
81
82lint: lintcheck
83
84pics/%.o: $(COM_DIR)/%.c
85	$(COMPILE.c) -o $@ $<
86	$(POST_PROCESS_O)
87
88pics/%.o: $(DHCP_DIR)/%.c
89	$(COMPILE.c) -o $@ $<
90	$(POST_PROCESS_O)
91
92include ../../Makefile.targ
93