xref: /titanic_41/usr/src/uts/intel/ip/Makefile (revision 7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fe)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#ident	"%Z%%M%	%I%	%E% SMI"
27#
28#	This makefile drives the production of the ip driver
29#	kernel module.
30#
31#	intel implementation architecture dependent
32#
33
34#
35#	Path to the base of the uts directory tree (usually /usr/src/uts).
36#
37UTSBASE	= ../..
38
39#
40#	Define the module and object file sets.
41#
42MODULE		= ip
43OBJECTS		= $(IP_OBJS:%=$(OBJS_DIR)/%)
44LINTS		= $(IP_OBJS:%.o=$(LINTS_DIR)/%.ln)
45ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
46ROOTLINK	= $(ROOT_STRMOD_DIR)/$(MODULE)
47CONF_SRCDIR	= $(UTSBASE)/common/inet/ip
48
49#
50#	Include common rules.
51#
52include $(UTSBASE)/intel/Makefile.intel
53
54#
55#	Define targets
56#
57ALL_TARGET	= $(BINARY) $(SRC_CONFILE)
58LINT_TARGET	= $(MODULE).lint
59INSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOTLINK) $(ROOT_CONFFILE)
60
61CINLINEFLAGS = -xinline=tcp_set_ws_value
62
63CFLAGS += $(CINLINEFLAGS)
64
65#
66# Depends on md5 and swrand (for SCTP). SCTP needs to depend on
67# swrand as it needs random numbers early on during boot before
68# kCF subsystem can load swrand.
69#
70LDFLAGS		+= -dy -Nmisc/md5 -Ncrypto/swrand
71
72#
73#	Default build targets.
74#
75.KEEP_STATE:
76
77def:		$(DEF_DEPS)
78
79all:		$(ALL_DEPS)
80
81clean:		$(CLEAN_DEPS)
82
83clobber:	$(CLOBBER_DEPS)
84
85lint:		$(LINT_DEPS)
86
87modlintlib:	$(MODLINTLIB_DEPS)
88
89clean.lint:	$(CLEAN_LINT_DEPS)
90
91install:	$(INSTALL_DEPS)
92
93$(ROOTLINK):	$(ROOT_STRMOD_DIR) $(ROOTMODULE)
94	-$(RM) $@; ln $(ROOTMODULE) $@
95
96#
97#	Include common targets.
98#
99include $(UTSBASE)/intel/Makefile.targ
100
101#
102# The ip CTF data is merged into the genunix module because these types are
103# complex and heavily shared.  The genunix build will execute one of the
104# rules below to create an archive, ipctf.a, containing the ip objects.  The
105# real ip will be uniquified against genunix later in the build, and will
106# emerge containing very few types.
107#
108$(OBJS_DIR)/ipctf.a: $(OBJECTS)
109	-$(RM) $@
110	$(AR) -r $@ $(OBJECTS)
111
112$(OBJECTS): $(OBJS_DIR)
113
114CLOBBERFILES += $(OBJS_DIR)/ipctf.a
115
116ipctf.obj32: FRC
117	@BUILD_TYPE=OBJ32 VERSION='$(VERSION)' $(MAKE) obj32/ipctf.a
118
119ipctf.debug32: FRC
120	@BUILD_TYPE=DBG32 VERSION='$(VERSION)' $(MAKE) debug32/ipctf.a
121
122ipctf.obj64: FRC
123	@BUILD_TYPE=OBJ64 VERSION='$(VERSION)' $(MAKE) obj64/ipctf.a
124
125ipctf.debug64: FRC
126	@BUILD_TYPE=DBG64 VERSION='$(VERSION)' $(MAKE) debug64/ipctf.a
127