Makefile revision d8d810637042c2a73a269f125dee75e8ed1421d1
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# CDDL HEADER START
04428429c4e689333e3ef8d19a2debeb20d4d15dMark Andrews#
e999539fb3e45b2617571e0e3ecd651992291701Mark Andrews# The contents of this file are subject to the terms of the
e999539fb3e45b2617571e0e3ecd651992291701Mark Andrews# Common Development and Distribution License (the "License").
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# You may not use this file except in compliance with the License.
555d01f4c02295e896a26c649d0ffc8808a0bbdcAutomatic Updater#
a3b428812703d22a605a9f882e71ed65f0ffdc65Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# or http://www.opensolaris.org/os/licensing.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# See the License for the specific language governing permissions
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews# and limitations under the License.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# When distributing Covered Code, include this CDDL HEADER in each
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
56874aef380a64a2c183b7c282c3e7a361d67fa1Automatic Updater# If applicable, add the following below this CDDL HEADER, with the
56874aef380a64a2c183b7c282c3e7a361d67fa1Automatic Updater# fields enclosed by brackets "[]" replaced with your own identifying
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
56874aef380a64a2c183b7c282c3e7a361d67fa1Automatic Updater#
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews# CDDL HEADER END
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
04eba969cb9a54bbda2896db2067c07b2ac5ba16Automatic Updater# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews# Use is subject to license terms.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews#
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# This makefile drives the production of the mwlfw kernel module.
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# Path to the base of the uts directory tree (usually /usr/src/uts).
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonUTSBASE = ../..
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# Define the module and object file sets.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
bac1bc98410bd876b8d38a6de6126709a7f8cc5aAutomatic UpdaterMODULE = mwlfw
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark AndrewsOBJECTS = $(MWLFW_OBJS:%=$(OBJS_DIR)/%)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsLINTS = $(MWLFW_OBJS:%.o=$(LINTS_DIR)/%.ln)
f8448666aa53603696bea83de971a05007735d8fMark AndrewsROOTMODULE = $(ROOT_MISC_DIR)/$(MODULE)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
3098364bcdd7a719fbafa5fc8d2cc9e90e5a5989Automatic UpdaterFWOBJ = $(OBJS_DIR)/$(MODULE).o
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsOBJECTS += $(FWOBJ)
3098364bcdd7a719fbafa5fc8d2cc9e90e5a5989Automatic Updater
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
3a6600c8d319275d73c36eb625f77103cd83e824Automatic Updater# Include common rules.
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsinclude $(UTSBASE)/intel/Makefile.intel
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonLDFLAGS =
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# Define targets
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsALL_TARGET = $(BINARY)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonLINT_TARGET = $(MODULE).lint
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# For now, disable these lint checks; maintainers should endeavor
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# to investigate and remove these for maximum lint coverage.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# Please do not carry these forward to new Makefiles.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
6f046a065e5543f8cd7e2f24991c65d2372f4c8dMark AndrewsLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark AndrewsLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsLINTTAGS += -erroff=E_STATIC_UNUSED
a8644ebab678a1de66cbfaabb513651a739958afAutomatic Updater
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Default build targets.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater.KEEP_STATE:
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrewsdef: $(DEF_DEPS) $(FWOBJ)
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssonall: $(ALL_DEPS)
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrewsclean: $(CLEAN_DEPS)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson $(RM) $(BINDEST)/$(FWBINCOPY)
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews $(RM) $(BINDEST)/$(BOOTBINCOPY)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrewsclobber: $(CLOBBER_DEPS)
96ea71632887c58a9d00f47eb318bf76b35903c3Mark Andrews
dde4bc92964ec60a35212dfed59562580e3265e3Mark Andrewslint: $(LINT_DEPS)
80f9a970ae6681c08529ef209eaabbe078c27ca3Mark Andrews
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updatermodlintlib: $(MODLINTLIB_DEPS)
dde4bc92964ec60a35212dfed59562580e3265e3Mark Andrews
04eba969cb9a54bbda2896db2067c07b2ac5ba16Automatic Updaterclean.lint: $(CLEAN_LINT_DEPS)
3098364bcdd7a719fbafa5fc8d2cc9e90e5a5989Automatic Updater
dde4bc92964ec60a35212dfed59562580e3265e3Mark Andrewsinstall: $(INSTALL_DEPS)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
04eba969cb9a54bbda2896db2067c07b2ac5ba16Automatic Updater# customized section for transforming firmware binary
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterELFWRAP = elfwrap
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterBINSRC = $(UTSBASE)/common/io/mwl/mwl_fw
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterBINDEST = $(UTSBASE)/intel/mwlfw
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterFWBINCOPY = mw88W8363fw
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterBOOTBINCOPY = mwlboot
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterORIGIN_FWBIN = mw88W8363
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterORIGIN_BOOTBIN = mwlboot
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#get build type, 32/64
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterWRAPTYPE = $(CLASS:%=-%)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#set elfwrap option
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterWRAPOPT = $(WRAPTYPE:-32=)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater$(FWOBJ):
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater cp $(BINSRC)/$(ORIGIN_FWBIN) $(BINDEST)/$(FWBINCOPY)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater cp $(BINSRC)/$(ORIGIN_BOOTBIN) $(BINDEST)/$(BOOTBINCOPY)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater $(ELFWRAP) $(WRAPOPT) -o $@ $(BINDEST)/$(FWBINCOPY) $(BINDEST)/$(BOOTBINCOPY)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# Include common targets.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updaterinclude $(UTSBASE)/intel/Makefile.targ
ea935c46e8261ea10621e5b038426539fe8a7cc5Mark Andrews
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater