Makefile.sparc.shared revision 3302:e75a684d1697
1151497Sru# 2104862Sru# CDDL HEADER START 3104862Sru# 4104862Sru# The contents of this file are subject to the terms of the 5104862Sru# Common Development and Distribution License (the "License"). 6104862Sru# You may not use this file except in compliance with the License. 7104862Sru# 8104862Sru# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9104862Sru# or http://www.opensolaris.org/os/licensing. 10104862Sru# See the License for the specific language governing permissions 11104862Sru# and limitations under the License. 12104862Sru# 13104862Sru# When distributing Covered Code, include this CDDL HEADER in each 14104862Sru# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15104862Sru# If applicable, add the following below this CDDL HEADER, with the 16104862Sru# fields enclosed by brackets "[]" replaced with your own identifying 17104862Sru# information: Portions Copyright [yyyy] [name of copyright owner] 18151497Sru# 19104862Sru# CDDL HEADER END 20104862Sru# 21104862Sru 22104862Sru# 23104862Sru# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 24104862Sru# Use is subject to license terms. 25104862Sru# 26104862Sru# ident "%Z%%M% %I% %E% SMI" 27104862Sru# 28104862Sru# This makefile contains the common definitions for all sparc 29104862Sru# implementation architecture independent modules. 30104862Sru# 31104862Sru 32151497Sru# 33104862Sru# Define supported builds 34151497Sru# 35114402SruDEF_BUILDS = $(DEF_BUILDS64) 36104862SruALL_BUILDS = $(ALL_BUILDS64) 37114402Sru 38114402Sru# 39114402Sru# Everybody needs to know how to build modstubs.o and to locate unix.o. 40114402Sru# Note that unix.o must currently be selected from among the possible 41104862Sru# "implementation architectures". Note further, that unix.o is only 42151497Sru# used as an optional error check for undefines so (theoretically) 43151497Sru# any "implementation architectures" could be used. We choose sun4u 44151497Sru# because it is the reference port. 45104862Sru# 46104862SruUNIX_DIR = $(UTSBASE)/sun4u/unix 47104862SruGENLIB_DIR = $(UTSBASE)/sun4u/genunix 48104862SruIPDRV_DIR = $(UTSBASE)/sparc/ip 49104862SruMODSTUBS_DIR = $(UNIX_DIR) 50104862SruDSF_DIR = $(UNIX_DIR) 51104862SruLINTS_DIR = $(OBJS_DIR) 52104862SruLINT_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR) 53104862Sru 54104862SruUNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o 55104862SruMODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o 56104862SruGENLIB = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/libgenunix.so 57104862Sru 58104862SruLINT_LIB_32 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lunix.ln 59104862SruGEN_LINT_LIB_32 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln 60104862Sru 61104862SruLINT_LIB_64 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lunix.ln 62104862SruGEN_LINT_LIB_64 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln 63104862Sru 64104862SruLINT_LIB = $(LINT_LIB_$(CLASS)) 65104862SruGEN_LINT_LIB = $(GEN_LINT_LIB_$(CLASS)) 66104862Sru 67104862SruLINT32_DIRS = $(LINT32_BUILDS:%=$(UTSBASE)/sparc/lint-libs/%) 68104862SruLINT32_FILES = $(LINT32_DIRS:%=%/llib-l$(MODULE).ln) 69104862Sru 70104862SruLINT64_DIRS = $(LINT64_BUILDS:%=$(UTSBASE)/sparc/lint-libs/%) 71104862SruLINT64_FILES = $(LINT64_DIRS:%=%/llib-l$(MODULE).ln) 72104862Sru 73104862Sru# 74104862Sru# Include the makefiles which define build rule templates, the 75114402Sru# collection of files per module, and a few specific flags. Note 76104862Sru# that order is significant, just as with an include path. The 77104862Sru# first build rule template which matches the files name will be 78114402Sru# used. By including these in order from most machine dependent 79104862Sru# to most machine independent, we allow a machine dependent file 80104862Sru# to be used in preference over a machine independent version 81114402Sru# (Such as a machine specific optimization, which preserves the 82104862Sru# interfaces.) 83104862Sru# 84104862Sruinclude $(UTSBASE)/sparc/Makefile.files 85104862Sruinclude $(UTSBASE)/sparc/v9/Makefile.files 86151497Sruinclude $(UTSTREE)/sun/Makefile.files 87104862Sruinclude $(UTSTREE)/common/Makefile.files 88104862Sru 89104862Sru# 90104862Sru# ----- TRANSITIONAL SECTION -------------------------------------------------- 91104862Sru# 92104862Sru 93104862Sru# 94104862Sru# Not everything which *should* be a module is a module yet. The 95104862Sru# following is a list of such objects which are currently part of 96104862Sru# genunix but which might someday become kmods. This must be 97104862Sru# defined before we include Makefile.uts, or else genunix's build 98104862Sru# won't be as parallel as we might like. 99104862Sru# 100104862SruNOT_YET_KMODS = $(OLDPTY_OBJS) $(PTY_OBJS) $(MOD_OBJS) 101104862Sru 102104862Sru# 103104862Sru# ----- END OF TRANSITIONAL SECTION ------------------------------------------- 104104862Sru# 105104862Sru# Include machine independent rules. Note that this does not imply 106104862Sru# that the resulting module from rules in Makefile.uts is machine 107151497Sru# independent. Only that the build rules are machine independent. 108151497Sru# 109104862Sruinclude $(UTSBASE)/Makefile.uts 110104862Sru 111104862Sru# 112104862Sru# machine specific optimization, override default in Makefile.master 113151497Sru# 114104862SruXARCH_32 = -xarch=v8 115151497SruXARCH_64 = -xarch=v9 116104862SruXARCH = $(XARCH_$(CLASS)) 117104862Sru 118151497SruCOPTIMIZE_32 = -xO3 119104862SruCOPTIMIZE_64 = -xO3 120104862SruCOPTIMIZE = $(COPTIMIZE_$(CLASS)) 121114402Sru 122104862SruCCMODE = -Xa 123104862Sru 124104862SruCFLAGS_32 = -xcg92 125151497SruCFLAGS_64 = -xchip=ultra $(CCABS32) $(CCREGSYM) 126151497SruCFLAGS = $(CFLAGS_$(CLASS)) 127151497Sru 128151497SruCFLAGS += $(XARCH) 129151497SruCFLAGS += $(COPTIMIZE) 130151497SruCFLAGS += $(EXTRA_CFLAGS) 131104862SruCFLAGS += $(XAOPT) 132104862SruCFLAGS += $(INLINES) -D_ASM_INLINES 133104862SruCFLAGS += $(CCMODE) 134104862SruCFLAGS += $(SPACEFLAG) 135104862SruCFLAGS += $(CERRWARN) 136104862SruCFLAGS += $(CTF_FLAGS) 137151497SruCFLAGS += $(C99MODE) 138104862SruCFLAGS += $(CCUNBOUND) 139104862SruCFLAGS += $(CCSTATICSYM) 140104862SruCFLAGS += $(IROPTFLAG) 141104862SruCFLAGS += $(CGLOBALSTATIC) 142104862SruCFLAGS += -xregs=no%float 143104862Sru 144104862SruASFLAGS += $(XARCH) 145104862Sru 146104862SruLINT_DEFS_32 = 147151497SruLINT_DEFS_64 = -Xarch=v9 148104862SruLINT_DEFS += $(LINT_DEFS_$(CLASS)) 149151497Sru 150104862Sru# 151# The following must be defined for all implementations: 152# 153# MODSTUBS: Module stubs source file. 154# 155MODSTUBS = $(UTSBASE)/sparc/ml/modstubs.s 156 157# 158# Define the actual specific platforms - obviously none. 159# 160MACHINE_DEFS = 161 162# 163# Debugging level 164# 165# Special knowledge of which special debugging options effect which 166# file is used to optimize the build if these flags are changed. 167# 168# XXX: The above could possibly be done for more flags and files, but 169# is left as an experiment to the interested reader. Be forewarned, 170# that excessive use could lead to maintenance difficulties. 171# 172DEBUG_DEFS_OBJ32 = 173DEBUG_DEFS_DBG32 = -DDEBUG 174DEBUG_DEFS_OBJ64 = 175DEBUG_DEFS_DBG64 = -DDEBUG 176DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE)) 177 178DEBUG_COND_OBJ32 :sh = echo \\043 179DEBUG_COND_DBG32 = 180DEBUG_COND_OBJ64 :sh = echo \\043 181DEBUG_COND_DBG64 = 182IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/ 183 184$(IF_DEBUG_OBJ)syscall.o := DEBUG_DEFS += -DSYSCALLTRACE 185$(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=1 186 187# Comment these out if you don't want dispatcher lock statistics. 188 189# $(IF_DEBUG_OBJ)disp_lock.o := DEBUG_DEFS += -DDISP_LOCK_STATS 190 191# 192# This rather strange collection of definitions ensures that lint sees 193# 'struct cpu' containing a fully declared embedded 'struct machcpu' 194# 195# There's something deeply dissatisfying about this. 196# 197LINTMACHFLAGS = -D_MACHDEP -I../../sun4 -I../../$(PLATFORM) -I../../sfmmu 198$(LINTS_DIR)/kcpc.ln := LINTFLAGS += $(LINTMACHFLAGS) 199$(LINTS_DIR)/kdi.ln := LINTFLAGS += $(LINTMACHFLAGS) 200$(LINTS_DIR)/msacct.ln := LINTFLAGS += $(LINTMACHFLAGS) 201$(LINTS_DIR)/thread.ln := LINTFLAGS += $(LINTMACHFLAGS) 202 203# 204# Build `options'. These are mostly historical and the need for these 205# is largely removed by the module technology. However, the static 206# build will continue to require these. 207# 208OPTION_DEFS = -DC2_AUDIT 209 210# 211# Collect the preprocessor definitions to be associated with *all* 212# files. 213# 214ALL_DEFS = $(MACHINE_DEFS) $(DEBUG_DEFS) $(OPTION_DEFS) 215# 216# 217# The kernels modules which are "implementation architecture" 218# specific for this machine are enumerated below. Note that most 219# of these modules must exist (in one form or another) for each 220# architecture. 221# 222# Common Drivers (usually pseudo drivers) (/kernel/drv): 223# 224DRV_KMODS += aggr arp bl bofi clone cn conskbd consms cpuid 225DRV_KMODS += crypto cryptoadm devinfo dump 226DRV_KMODS += dtrace fasttrap fbt lockstat profile sdt systrace 227DRV_KMODS += fssnap icmp icmp6 ip ip6 ipsecah 228DRV_KMODS += ipsecesp iwscn keysock kmdb kstat ksyms llc1 229DRV_KMODS += lofi 230DRV_KMODS += log logindmux kssl mm nca physmem pm poll pool 231DRV_KMODS += pseudo ptc ptm pts ptsl ramdisk random rsm rts sad 232DRV_KMODS += sppp sppptun sy sysevent sysmsg 233DRV_KMODS += spdsock 234DRV_KMODS += tcp tcp6 tl tnf ttymux udp udp6 wc winlock zcons 235DRV_KMODS += ippctl sctp sctp6 236DRV_KMODS += dld 237DRV_KMODS += ipf 238DRV_KMODS += rpcib 239DRV_KMODS += vni 240DRV_KMODS += xge 241DRV_KMODS += rds 242 243# 244# Don't build some of these for OpenSolaris, since they will be 245# replaced by binaries that are signed by Sun Release Engineering. 246# 247$(CLOSED_BUILD)DRV_KMODS += dca 248 249$(CLOSED_BUILD)CLOSED_DRV_KMODS += glm 250$(CLOSED_BUILD)CLOSED_DRV_KMODS += isp 251$(CLOSED_BUILD)CLOSED_DRV_KMODS += llc2 252$(CLOSED_BUILD)CLOSED_DRV_KMODS += mpt 253$(CLOSED_BUILD)CLOSED_DRV_KMODS += se 254 255# 256# Hardware Drivers in common space 257# 258 259DRV_KMODS += rge 260$(CLOSED_BUILD)CLOSED_DRV_KMODS += ixgb 261 262# 263# Machine Specific Driver Modules (/kernel/drv): 264# 265DRV_KMODS += audio1575 audio810 audiohd audiocs audiots 266DRV_KMODS += bge bpp eri esp fas hme 267DRV_KMODS += openeepr options sd ses st 268DRV_KMODS += ssd 269DRV_KMODS += ecpp 270DRV_KMODS += hid hubd ehci ohci uhci usb_mid scsa2usb usbprn ugen 271DRV_KMODS += usbser usbsacm usbsksp usbsprl 272DRV_KMODS += usb_as usb_ac 273DRV_KMODS += usbskel 274DRV_KMODS += hci1394 av1394 scsa1394 dcam1394 275DRV_KMODS += sbp2 276DRV_KMODS += ib ibd rdsib 277DRV_KMODS += pci_pci px_pci pxb_plx pxb_bcm pcie 278DRV_KMODS += i8042 kb8042 mouse8042 279DRV_KMODS += fcode 280DRV_KMODS += socal 281DRV_KMODS += sgen 282 283$(CLOSED_BUILD)CLOSED_DRV_KMODS += audioens 284$(CLOSED_BUILD)CLOSED_DRV_KMODS += audiovia823x 285$(CLOSED_BUILD)CLOSED_DRV_KMODS += chxge 286$(CLOSED_BUILD)CLOSED_DRV_KMODS += dad 287$(CLOSED_BUILD)CLOSED_DRV_KMODS += ifp 288$(CLOSED_BUILD)CLOSED_DRV_KMODS += scsi_vhci 289$(CLOSED_BUILD)CLOSED_DRV_KMODS += uata 290$(CLOSED_BUILD)CLOSED_DRV_KMODS += usbser_edge 291 292# 293# I/O framework test drivers 294# 295DRV_KMODS += pshot 296DRV_KMODS += gen_drv 297DRV_KMODS += tvhci tphci tclient 298DRV_KMODS += emul64 299 300# 301# PCMCIA specific module(s) 302# 303DRV_KMODS += stp4020 pcs 304MISC_KMODS += busra cardbus dada pcmcia 305DRV_KMODS += pcata pcmem pcram 306DRV_KMODS += pcic 307DRV_KMODS += pem 308 309$(CLOSED_BUILD)CLOSED_DRV_KMODS += pcelx 310$(CLOSED_BUILD)CLOSED_DRV_KMODS += pcser 311 312# Add lvm 313# 314DRV_KMODS += md 315MISC_KMODS += md_mirror md_stripe md_hotspares md_raid md_trans md_notify 316MISC_KMODS += md_sp 317 318# 319# Exec Class Modules (/kernel/exec): 320# 321EXEC_KMODS += aoutexec elfexec intpexec javaexec 322 323# 324# Scheduling Class Modules (/kernel/sched): 325# 326SCHED_KMODS += RT TS RT_DPTBL TS_DPTBL IA FSS FX FX_DPTBL 327 328# 329# File System Modules (/kernel/fs): 330# 331FS_KMODS += dev devfs fdfs fifofs hsfs lofs namefs nfs pcfs tmpfs zfs 332FS_KMODS += specfs udfs ufs autofs cachefs procfs sockfs mntfs 333FS_KMODS += ctfs objfs 334 335# 336# Streams Modules (/kernel/strmod): 337# 338STRMOD_KMODS += 6to4tun atun bufmod connld dedump ldterm ms pckt pfmod 339STRMOD_KMODS += pipemod ptem redirmod rpcmod rlmod telmod timod 340STRMOD_KMODS += spppasyn spppcomp 341STRMOD_KMODS += tirdwr ttcompat tun 342STRMOD_KMODS += usbkbm usbms usb_ah 343STRMOD_KMODS += drcompat 344STRMOD_KMODS += nattymod 345STRMOD_KMODS += cryptmod 346STRMOD_KMODS += vuid3ps2 347 348# 349# 'System' Modules (/kernel/sys): 350# 351SYS_KMODS += c2audit 352SYS_KMODS += exacctsys 353SYS_KMODS += inst_sync kaio msgsys semsys shmsys sysacct pipe 354SYS_KMODS += doorfs pset acctctl portfs 355 356# 357# 'User' Modules (/kernel/misc): 358# 359MISC_KMODS += amsrc2 audiosup diaudio mixer 360MISC_KMODS += consconfig gld ipc nfs_dlboot nfssrv scsi 361MISC_KMODS += strplumb swapgeneric tlimod 362MISC_KMODS += krtld 363MISC_KMODS += rpcsec rpcsec_gss kgssapi kmech_dummy 364MISC_KMODS += kmech_krb5 365MISC_KMODS += fssnap_if 366MISC_KMODS += hidparser kbtrans usba usba10 usbs49_fw 367MISC_KMODS += s1394 368MISC_KMODS += hpcsvc pcihp pciehpc pcishpc 369MISC_KMODS += rsmops 370MISC_KMODS += kcf 371MISC_KMODS += ibcm 372MISC_KMODS += ibdm 373MISC_KMODS += ibmf 374MISC_KMODS += ibtl 375MISC_KMODS += hook 376MISC_KMODS += neti 377MISC_KMODS += ctf 378MISC_KMODS += zmod 379MISC_KMODS += mac dls 380MISC_KMODS += cmlb 381MISC_KMODS += tem 382MISC_KMODS += pcicfg.e fcodem fcpci 383 384$(CLOSED_BUILD)CLOSED_MISC_KMODS += amsrc1 385$(CLOSED_BUILD)CLOSED_MISC_KMODS += klmmod klmops 386$(CLOSED_BUILD)CLOSED_MISC_KMODS += phx 387 388# 389# Software Cryptographic Providers (/kernel/crypto): 390# 391# Don't build some of these for OpenSolaris, since they will be 392# replaced by binaries that are signed by Sun RE. 393# 394$(CLOSED_BUILD)CRYPTO_KMODS += aes 395$(CLOSED_BUILD)CRYPTO_KMODS += arcfour 396$(CLOSED_BUILD)CRYPTO_KMODS += blowfish 397$(CLOSED_BUILD)CRYPTO_KMODS += des 398CRYPTO_KMODS += md5 399CRYPTO_KMODS += rsa 400CRYPTO_KMODS += sha1 401CRYPTO_KMODS += sha2 402CRYPTO_KMODS += swrand 403 404# 405# IP Policy Modules (/kernel/ipp): 406# 407IPP_KMODS += dlcosmk 408IPP_KMODS += flowacct 409IPP_KMODS += ipgpc 410IPP_KMODS += dscpmk 411IPP_KMODS += tokenmt 412IPP_KMODS += tswtclmt 413 414# 415# 'Dacf' modules (/kernel/dacf) 416DACF_KMODS += consconfig_dacf 417 418# 419# SVVS Testing Modules (/kernel/strmod): 420# 421# These are streams and driver modules which are not to be 422# delivered with a released system. However, during development 423# it is convenient to build and install the SVVS kernel modules. 424# 425SVVS_KMODS += lmodb lmode lmodr lmodt lo tidg tivc tmux 426 427SVVS += svvs 428 429# 430# Modules eXcluded from the product: 431# 432XMODS += 433$(CLOSED_BUILD)CLOSED_XMODS = \ 434 daplt \ 435 e1000g \ 436 tavor \ 437 wsdrv 438 439# 440# 'Dacf' Modules (/kernel/dacf): 441# 442DACF_KMODS += usb_ac_dacf 443 444# 445# MAC-Type Plugin Modules (/kernel/mac) 446# 447MAC_KMODS += mac_ether 448 449# 450# 'Devname' Modules (kernel/devname) 451# 452DEVNAME_KMODS += sdev_nsconfig_mod 453