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 (c) 2010, Oracle and/or its affiliates. All rights reserved.
27 # Path to the base of the uts directory tree (usually /usr/src/uts).
32 # Define the module and object file sets.
35 OBJECTS
= $(IBD_OBJS
:%=$(OBJS_DIR
)/%)
36 LINTS
= $(IBD_OBJS
:%.o
=$(LINTS_DIR
)/%.ln
)
37 ROOTMODULE
= $(ROOT_DRV_DIR
)/$(MODULE
)
38 CONF_SRCDIR
= $(UTSBASE
)/common
/io
/ib
/clients
/ibd
39 LDFLAGS
+= -dy
-Nmisc
/mac
-Nmisc
/ibtl
-Nmisc
/ibcm
-Nmisc
/ibmf
-Ndrv
/ip \
41 WARLOCK_OUT
= $(IBD_OBJS
:%.o
=%.ll
)
42 WARLOCK_OK
= $(MODULE
).ok
43 WLCMD_DIR
= $(UTSBASE
)/common
/io
/warlock
45 # Include common rules.
47 include $(UTSBASE
)/intel
/Makefile.intel
52 ALL_TARGET
= $(BINARY
) $(CONFMOD
)
53 LINT_TARGET
= $(MODULE
).lint
54 INSTALL_TARGET
= $(BINARY
) $(ROOTMODULE
) $(ROOT_CONFFILE
)
57 # For now, disable these lint checks; maintainers should endeavor
58 # to investigate and remove these for maximum lint coverage.
59 # Please do not carry these forward to new Makefiles.
61 LINTTAGS
+= -erroff
=E_BAD_PTR_CAST_ALIGN
62 LINTTAGS
+= -erroff
=E_PTRDIFF_OVERFLOW
64 CERRWARN
+= -_gcc
=-Wno-uninitialized
65 CERRWARN
+= -_gcc
=-Wno-switch
68 # Default build targets.
77 $(RM
) $(WARLOCK_OUT
) $(WARLOCK_OK
)
79 clobber: $(CLOBBER_DEPS
)
80 $(RM
) $(WARLOCK_OUT
) $(WARLOCK_OK
)
84 modlintlib
: $(MODLINTLIB_DEPS
)
86 clean.lint
: $(CLEAN_LINT_DEPS
)
88 install: $(INSTALL_DEPS
)
91 # Include common targets.
93 include $(UTSBASE
)/intel
/Makefile.targ
96 # Defines for local commands.
103 warlock
: $(WARLOCK_OK
)
105 $(WARLOCK_OK
): $(WARLOCK_OUT
) $(WLCMD_DIR
)/ibd.wlcmd warlock_ddi.files
106 $(WARLOCK
) -c
$(WLCMD_DIR
)/ibd.wlcmd
$(WARLOCK_OUT
) \
107 -l ..
/warlock
/ddi_dki_impl.ll
110 %.ll
: $(UTSBASE
)/common
/io
/ib
/clients
/ibd
/%.c \
111 $(UTSBASE
)/common
/sys
/ib
/clients
/ibd
/ibd.h
112 $(WLCC
) $(CPPFLAGS
) -DDEBUG
-o
$@
$<
115 @cd ..
/warlock
; pwd
; $(MAKE
) warlock