Makefile.sparc.shared revision 2311:2d86e52dcdf0
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 22# 23# Copyright 2006 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 contains the common definitions for all sparc 29# implementation architecture independent modules. 30# 31 32# 33# Define supported builds 34# 35DEF_BUILDS = $(DEF_BUILDS64) 36ALL_BUILDS = $(ALL_BUILDS64) 37 38# 39# Everybody needs to know how to build modstubs.o and to locate unix.o. 40# Note that unix.o must currently be selected from among the possible 41# "implementation architectures". Note further, that unix.o is only 42# used as an optional error check for undefines so (theoretically) 43# any "implementation architectures" could be used. We choose sun4u 44# because it is the reference port. 45# 46UNIX_DIR = $(UTSBASE)/sun4u/unix 47GENLIB_DIR = $(UTSBASE)/sun4u/genunix 48IPDRV_DIR = $(UTSBASE)/sparc/ip 49MODSTUBS_DIR = $(UNIX_DIR) 50DSF_DIR = $(UNIX_DIR) 51LINTS_DIR = $(OBJS_DIR) 52LINT_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR) 53 54UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o 55MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o 56GENLIB = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/libgenunix.so 57 58LINT_LIB_32 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lunix.ln 59GEN_LINT_LIB_32 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln 60 61LINT_LIB_64 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lunix.ln 62GEN_LINT_LIB_64 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln 63 64LINT_LIB = $(LINT_LIB_$(CLASS)) 65GEN_LINT_LIB = $(GEN_LINT_LIB_$(CLASS)) 66 67LINT32_DIRS = $(LINT32_BUILDS:%=$(UTSBASE)/sparc/lint-libs/%) 68LINT32_FILES = $(LINT32_DIRS:%=%/llib-l$(MODULE).ln) 69 70LINT64_DIRS = $(LINT64_BUILDS:%=$(UTSBASE)/sparc/lint-libs/%) 71LINT64_FILES = $(LINT64_DIRS:%=%/llib-l$(MODULE).ln) 72 73# 74# Include the makefiles which define build rule templates, the 75# collection of files per module, and a few specific flags. Note 76# that order is significant, just as with an include path. The 77# first build rule template which matches the files name will be 78# used. By including these in order from most machine dependent 79# to most machine independent, we allow a machine dependent file 80# to be used in preference over a machine independent version 81# (Such as a machine specific optimization, which preserves the 82# interfaces.) 83# 84include $(UTSBASE)/sparc/Makefile.files 85include $(UTSBASE)/sparc/v9/Makefile.files 86include $(UTSTREE)/sun/Makefile.files 87include $(UTSTREE)/common/Makefile.files 88 89# 90# ----- TRANSITIONAL SECTION -------------------------------------------------- 91# 92 93# 94# Not everything which *should* be a module is a module yet. The 95# following is a list of such objects which are currently part of 96# genunix but which might someday become kmods. This must be 97# defined before we include Makefile.uts, or else genunix's build 98# won't be as parallel as we might like. 99# 100NOT_YET_KMODS = $(OLDPTY_OBJS) $(PTY_OBJS) $(MOD_OBJS) 101 102# 103# ----- END OF TRANSITIONAL SECTION ------------------------------------------- 104# 105# Include machine independent rules. Note that this does not imply 106# that the resulting module from rules in Makefile.uts is machine 107# independent. Only that the build rules are machine independent. 108# 109include $(UTSBASE)/Makefile.uts 110 111# 112# machine specific optimization, override default in Makefile.master 113# 114XARCH_32 = -xarch=v8 115XARCH_64 = -xarch=v9 116XARCH = $(XARCH_$(CLASS)) 117 118COPTIMIZE_32 = -xO3 119COPTIMIZE_64 = -xO3 120COPTIMIZE = $(COPTIMIZE_$(CLASS)) 121 122CCMODE = -Xa 123 124CFLAGS_32 = -xcg92 125CFLAGS_64 = -xchip=ultra $(CCABS32) $(CCREGSYM) 126CFLAGS = $(CFLAGS_$(CLASS)) 127 128CFLAGS += $(XARCH) 129CFLAGS += $(COPTIMIZE) 130CFLAGS += $(EXTRA_CFLAGS) 131CFLAGS += $(XAOPT) 132CFLAGS += $(INLINES) -D_ASM_INLINES 133CFLAGS += $(CCMODE) 134CFLAGS += $(SPACEFLAG) 135CFLAGS += $(CERRWARN) 136CFLAGS += $(CTF_FLAGS) 137CFLAGS += $(C99MODE) 138CFLAGS += $(CCUNBOUND) 139CFLAGS += -xregs=no%float 140 141ASFLAGS += $(XARCH) 142 143LINT_DEFS_32 = 144LINT_DEFS_64 = -Xarch=v9 145LINT_DEFS += $(LINT_DEFS_$(CLASS)) 146 147# 148# The following must be defined for all implementations: 149# 150# MODSTUBS: Module stubs source file. 151# 152MODSTUBS = $(UTSBASE)/sparc/ml/modstubs.s 153 154# 155# Define the actual specific platforms - obviously none. 156# 157MACHINE_DEFS = 158 159# 160# Debugging level 161# 162# Special knowledge of which special debugging options effect which 163# file is used to optimize the build if these flags are changed. 164# 165# XXX: The above could possibly be done for more flags and files, but 166# is left as an experiment to the interested reader. Be forewarned, 167# that excessive use could lead to maintenance difficulties. 168# 169DEBUG_DEFS_OBJ32 = 170DEBUG_DEFS_DBG32 = -DDEBUG 171DEBUG_DEFS_OBJ64 = 172DEBUG_DEFS_DBG64 = -DDEBUG 173DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE)) 174 175DEBUG_COND_OBJ32 :sh = echo \\043 176DEBUG_COND_DBG32 = 177DEBUG_COND_OBJ64 :sh = echo \\043 178DEBUG_COND_DBG64 = 179IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/ 180 181$(IF_DEBUG_OBJ)syscall.o := DEBUG_DEFS += -DSYSCALLTRACE 182$(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=1 183 184# Comment these out if you don't want dispatcher lock statistics. 185 186# $(IF_DEBUG_OBJ)disp_lock.o := DEBUG_DEFS += -DDISP_LOCK_STATS 187 188# 189# This rather strange collection of definitions ensures that lint sees 190# 'struct cpu' containing a fully declared embedded 'struct machcpu' 191# 192# There's something deeply dissatisfying about this. 193# 194LINTMACHFLAGS = -D_MACHDEP -I../../sun4 -I../../$(PLATFORM) -I../../sfmmu 195$(LINTS_DIR)/kcpc.ln := LINTFLAGS += $(LINTMACHFLAGS) 196$(LINTS_DIR)/kdi.ln := LINTFLAGS += $(LINTMACHFLAGS) 197$(LINTS_DIR)/msacct.ln := LINTFLAGS += $(LINTMACHFLAGS) 198$(LINTS_DIR)/thread.ln := LINTFLAGS += $(LINTMACHFLAGS) 199 200# 201# Build `options'. These are mostly historical and the need for these 202# is largely removed by the module technology. However, the static 203# build will continue to require these. 204# 205OPTION_DEFS = -DC2_AUDIT 206 207# 208# Collect the preprocessor definitions to be associated with *all* 209# files. 210# 211ALL_DEFS = $(MACHINE_DEFS) $(DEBUG_DEFS) $(OPTION_DEFS) 212# 213# 214# The kernels modules which are "implementation architecture" 215# specific for this machine are enumerated below. Note that most 216# of these modules must exist (in one form or another) for each 217# architecture. 218# 219# Common Drivers (usually pseudo drivers) (/kernel/drv): 220# 221DRV_KMODS += aggr arp bl bofi clone cn conskbd consms cpuid 222DRV_KMODS += crypto cryptoadm dca devinfo dump 223DRV_KMODS += dtrace fasttrap fbt lockstat profile sdt systrace 224DRV_KMODS += fssnap icmp icmp6 ip ip6 ipsecah 225DRV_KMODS += ipsecesp iwscn keysock kmdb kstat ksyms llc1 226DRV_KMODS += lofi 227DRV_KMODS += log logindmux kssl mm nca pm poll pool 228DRV_KMODS += pseudo ptc ptm pts ptsl ramdisk random rsm rts sad 229DRV_KMODS += sppp sppptun sy sysevent sysmsg 230DRV_KMODS += spdsock 231DRV_KMODS += tcp tcp6 tl tnf ttymux udp udp6 vol wc winlock zcons 232DRV_KMODS += ippctl sctp sctp6 233DRV_KMODS += dld 234DRV_KMODS += ipf pfil 235DRV_KMODS += rpcib 236DRV_KMODS += vni 237DRV_KMODS += xge 238 239$(CLOSED_BUILD)CLOSED_DRV_KMODS += glm 240$(CLOSED_BUILD)CLOSED_DRV_KMODS += isp 241$(CLOSED_BUILD)CLOSED_DRV_KMODS += llc2 242$(CLOSED_BUILD)CLOSED_DRV_KMODS += mpt 243$(CLOSED_BUILD)CLOSED_DRV_KMODS += se 244 245# 246# Hardware Drivers in common space 247# 248 249DRV_KMODS += rge 250$(CLOSED_BUILD)CLOSED_DRV_KMODS += ixgb 251 252# 253# Machine Specific Driver Modules (/kernel/drv): 254# 255DRV_KMODS += audio1575 audio810 audiohd audiocs audiots 256DRV_KMODS += bge bpp eri esp fas hme 257DRV_KMODS += openeepr options sd ses st 258DRV_KMODS += ssd 259DRV_KMODS += ecpp 260DRV_KMODS += hid hubd ehci ohci uhci usb_mid scsa2usb usbprn ugen 261DRV_KMODS += usbser usbsksp usbsprl 262DRV_KMODS += usb_as usb_ac 263DRV_KMODS += usbskel 264DRV_KMODS += hci1394 av1394 scsa1394 dcam1394 265DRV_KMODS += sbp2 266DRV_KMODS += ib ibd 267DRV_KMODS += pci_pci px_pci pxb_bcm pcie 268DRV_KMODS += i8042 kb8042 mouse8042 269DRV_KMODS += fcode 270DRV_KMODS += socal 271 272$(CLOSED_BUILD)CLOSED_DRV_KMODS += audioens 273$(CLOSED_BUILD)CLOSED_DRV_KMODS += audioixp 274$(CLOSED_BUILD)CLOSED_DRV_KMODS += audiovia823x 275$(CLOSED_BUILD)CLOSED_DRV_KMODS += chxge 276$(CLOSED_BUILD)CLOSED_DRV_KMODS += dad 277$(CLOSED_BUILD)CLOSED_DRV_KMODS += ifp 278$(CLOSED_BUILD)CLOSED_DRV_KMODS += scsi_vhci 279$(CLOSED_BUILD)CLOSED_DRV_KMODS += sgen 280$(CLOSED_BUILD)CLOSED_DRV_KMODS += uata 281$(CLOSED_BUILD)CLOSED_DRV_KMODS += usbser_edge 282 283# 284# I/O framework test drivers 285# 286DRV_KMODS += pshot 287DRV_KMODS += gen_drv 288DRV_KMODS += tvhci tphci tclient 289DRV_KMODS += emul64 290 291# 292# PCMCIA specific module(s) 293# 294DRV_KMODS += stp4020 pcs 295MISC_KMODS += busra cardbus dada pcmcia 296DRV_KMODS += pcata pcmem pcram 297DRV_KMODS += pcic 298DRV_KMODS += pem 299 300$(CLOSED_BUILD)CLOSED_DRV_KMODS += pcelx 301$(CLOSED_BUILD)CLOSED_DRV_KMODS += pcser 302 303# Add lvm 304# 305DRV_KMODS += md 306MISC_KMODS += md_mirror md_stripe md_hotspares md_raid md_trans md_notify 307MISC_KMODS += md_sp 308 309# 310# Exec Class Modules (/kernel/exec): 311# 312EXEC_KMODS += aoutexec elfexec intpexec javaexec 313 314# 315# Scheduling Class Modules (/kernel/sched): 316# 317SCHED_KMODS += RT TS RT_DPTBL TS_DPTBL IA FSS FX FX_DPTBL 318 319# 320# File System Modules (/kernel/fs): 321# 322FS_KMODS += devfs fdfs fifofs hsfs lofs namefs nfs pcfs tmpfs zfs 323FS_KMODS += specfs udfs ufs autofs cachefs procfs sockfs mntfs 324FS_KMODS += ctfs objfs 325 326# 327# Streams Modules (/kernel/strmod): 328# 329STRMOD_KMODS += 6to4tun atun bufmod connld dedump ldterm ms pckt pfmod 330STRMOD_KMODS += pipemod ptem redirmod rpcmod rlmod telmod timod 331STRMOD_KMODS += spppasyn spppcomp 332STRMOD_KMODS += tirdwr ttcompat tun 333STRMOD_KMODS += usbkbm usbms usb_ah 334STRMOD_KMODS += drcompat 335STRMOD_KMODS += nattymod 336STRMOD_KMODS += cryptmod 337STRMOD_KMODS += vuid3ps2 338 339# 340# 'System' Modules (/kernel/sys): 341# 342SYS_KMODS += c2audit 343SYS_KMODS += exacctsys 344SYS_KMODS += inst_sync kaio msgsys semsys shmsys sysacct pipe 345SYS_KMODS += doorfs pset acctctl portfs 346 347# 348# 'User' Modules (/kernel/misc): 349# 350MISC_KMODS += amsrc2 audiosup diaudio mixer 351MISC_KMODS += consconfig gld ipc nfs_dlboot nfssrv scsi 352MISC_KMODS += strplumb swapgeneric tlimod 353MISC_KMODS += krtld 354MISC_KMODS += rpcsec rpcsec_gss kgssapi kmech_dummy 355MISC_KMODS += kmech_krb5 356MISC_KMODS += fssnap_if 357MISC_KMODS += hidparser kbtrans usba usba10 usbs49_fw 358MISC_KMODS += s1394 359MISC_KMODS += hpcsvc pcihp pciehpc pcishpc 360MISC_KMODS += rsmops 361MISC_KMODS += kcf 362MISC_KMODS += ibcm 363MISC_KMODS += ibdm 364MISC_KMODS += ibmf 365MISC_KMODS += ibtl 366MISC_KMODS += ctf 367MISC_KMODS += zmod 368MISC_KMODS += mac dls 369MISC_KMODS += cmlb 370MISC_KMODS += tem 371MISC_KMODS += pcicfg.e fcodem fcpci 372 373$(CLOSED_BUILD)CLOSED_MISC_KMODS += amsrc1 374$(CLOSED_BUILD)CLOSED_MISC_KMODS += klmmod klmops 375$(CLOSED_BUILD)CLOSED_MISC_KMODS += phx 376 377# 378# Software Cryptographic Providers (/kernel/crypto): 379# 380# Don't build some of these for OpenSolaris, since they will be 381# replaced by binaries that are signed by Sun RE. 382# 383$(CLOSED_BUILD)CRYPTO_KMODS += aes 384$(CLOSED_BUILD)CRYPTO_KMODS += arcfour 385$(CLOSED_BUILD)CRYPTO_KMODS += blowfish 386$(CLOSED_BUILD)CRYPTO_KMODS += des 387CRYPTO_KMODS += md5 388CRYPTO_KMODS += rsa 389CRYPTO_KMODS += sha1 390CRYPTO_KMODS += sha2 391CRYPTO_KMODS += swrand 392 393# 394# IP Policy Modules (/kernel/ipp): 395# 396IPP_KMODS += dlcosmk 397IPP_KMODS += flowacct 398IPP_KMODS += ipgpc 399IPP_KMODS += dscpmk 400IPP_KMODS += tokenmt 401IPP_KMODS += tswtclmt 402 403# 404# 'Dacf' modules (/kernel/dacf) 405DACF_KMODS += consconfig_dacf 406 407# 408# SVVS Testing Modules (/kernel/strmod): 409# 410# These are streams and driver modules which are not to be 411# delivered with a released system. However, during development 412# it is convenient to build and install the SVVS kernel modules. 413# 414SVVS_KMODS += lmodb lmode lmodr lmodt lo tidg tivc tmux 415 416SVVS += svvs 417 418# 419# Modules eXcluded from the product: 420# 421XMODS += 422$(CLOSED_BUILD)CLOSED_XMODS = \ 423 daplt \ 424 e1000g \ 425 tavor \ 426 wsdrv 427 428# 429# 'Dacf' Modules (/kernel/dacf): 430# 431DACF_KMODS += usb_ac_dacf 432 433# 434# MAC-Type Plugin Modules (/kernel/mac) 435# 436MAC_KMODS += mac_ether 437