Makefile.intel.shared revision 5206:34f0b41fc3c5
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 2007 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26# ident "%Z%%M% %I% %E% SMI" 27# 28 29# 30# This makefile contains the common definitions for all intel 31# implementation architecture independent modules. 32# 33 34# 35# Machine type (implementation architecture): 36# 37PLATFORM = i86pc 38 39# 40# Everybody needs to know how to build modstubs.o and to locate unix.o. 41# Note that unix.o must currently be selected from among the possible 42# "implementation architectures". Note further, that unix.o is only 43# used as an optional error check for undefines so (theoretically) 44# any "implementation architectures" could be used. We choose i86pc 45# because it is the reference port. 46# 47UNIX_DIR = $(UTSBASE)/i86pc/unix 48GENLIB_DIR = $(UTSBASE)/intel/genunix 49GENASSYM_DIR = $(UTSBASE)/intel/genassym 50IPDRV_DIR = $(UTSBASE)/intel/ip 51MODSTUBS_DIR = $(UNIX_DIR) 52DSF_DIR = $(UTSBASE)/$(PLATFORM)/genassym 53LINTS_DIR = $(OBJS_DIR) 54LINT_LIB_DIR = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR) 55 56UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o 57GENLIB = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so 58MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o 59LINT_LIB = $(UTSBASE)/i86pc/lint-libs/$(OBJS_DIR)/llib-lunix.ln 60GEN_LINT_LIB = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln 61 62# 63# Include the makefiles which define build rule templates, the 64# collection of files per module, and a few specific flags. Note 65# that order is significant, just as with an include path. The 66# first build rule template which matches the files name will be 67# used. By including these in order from most machine dependent 68# to most machine independent, we allow a machine dependent file 69# to be used in preference over a machine independent version 70# (Such as a machine specific optimization, which preserves the 71# interfaces.) 72# 73include $(UTSTREE)/intel/Makefile.files 74include $(UTSTREE)/common/Makefile.files 75 76# 77# ----- TRANSITIONAL SECTION -------------------------------------------------- 78# 79 80# 81# Not everything which *should* be a module is a module yet. The 82# following is a list of such objects which are currently part of 83# genunix but which might someday become kmods. This must be 84# defined before we include Makefile.uts, or else genunix's build 85# won't be as parallel as we might like. 86# 87NOT_YET_KMODS = $(OLDPTY_OBJS) $(PTY_OBJS) $(MOD_OBJS) 88 89# 90# ----- END OF TRANSITIONAL SECTION ------------------------------------------- 91# 92# Include machine independent rules. Note that this does not imply 93# that the resulting module from rules in Makefile.uts is machine 94# independent. Only that the build rules are machine independent. 95# 96include $(UTSBASE)/Makefile.uts 97 98# 99# The following must be defined for all implementations: 100# 101MODSTUBS = $(UTSBASE)/intel/ia32/ml/modstubs.s 102 103# 104# Define supported builds 105# 106DEF_BUILDS = $(DEF_BUILDS64) $(DEF_BUILDS32) 107ALL_BUILDS = $(ALL_BUILDS64) $(ALL_BUILDS32) 108 109# 110# x86 or amd64 inline templates 111# 112INLINES_32 = $(UTSBASE)/intel/ia32/ml/ia32.il 113INLINES_64 = $(UTSBASE)/intel/amd64/ml/amd64.il 114INLINES += $(INLINES_$(CLASS)) 115 116# 117# kernel-specific optimizations; override default in Makefile.master 118# 119 120CFLAGS_XARCH_32 = $(i386_CFLAGS) 121CFLAGS_XARCH_64 = $(amd64_CFLAGS) 122CFLAGS_XARCH = $(CFLAGS_XARCH_$(CLASS)) 123 124COPTFLAG_32 = $(COPTFLAG) 125COPTFLAG_64 = $(COPTFLAG64) 126COPTIMIZE = $(COPTFLAG_$(CLASS)) 127 128CFLAGS = $(CFLAGS_XARCH) 129CFLAGS += $(COPTIMIZE) 130CFLAGS += $(INLINES) -D_ASM_INLINES 131CFLAGS += $(CCMODE) 132CFLAGS += $(SPACEFLAG) 133CFLAGS += $(CCUNBOUND) 134CFLAGS += $(CFLAGS_uts) 135CFLAGS += -xstrconst 136 137ASFLAGS_XARCH_32 = $(i386_ASFLAGS) 138ASFLAGS_XARCH_64 = $(amd64_ASFLAGS) 139ASFLAGS_XARCH = $(ASFLAGS_XARCH_$(CLASS)) 140 141ASFLAGS += $(ASFLAGS_XARCH) 142AS_INC_PATH += -I$(GENASSYM_DIR)/$(OBJS_DIR) 143 144# 145# Define the base directory for installation. 146# 147BASE_INS_DIR = $(ROOT) 148 149# 150# Debugging level 151# 152# Special knowledge of which special debugging options affect which 153# file is used to optimize the build if these flags are changed. 154# 155DEBUG_DEFS_OBJ32 = 156DEBUG_DEFS_DBG32 = -DDEBUG 157DEBUG_DEFS_OBJ64 = 158DEBUG_DEFS_DBG64 = -DDEBUG 159DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE)) 160 161DEBUG_COND_OBJ32 :sh = echo \\043 162DEBUG_COND_DBG32 = 163DEBUG_COND_OBJ64 :sh = echo \\043 164DEBUG_COND_DBG64 = 165IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/ 166 167$(IF_DEBUG_OBJ)syscall.o := DEBUG_DEFS += -DSYSCALLTRACE 168$(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=1 169 170# 171# This rather strange collection of definitions ensures that lint sees 172# 'struct cpu' containing a fully declared embedded 'struct machcpu' 173# 174# There's something deeply dissatisfying about this. 175# 176LINTMACHFLAGS = -D_MACHDEP -I../../i86pc 177$(LINTS_DIR)/kcpc.ln := LINTFLAGS += $(LINTMACHFLAGS) 178$(LINTS_DIR)/kdi.ln := LINTFLAGS += $(LINTMACHFLAGS) 179$(LINTS_DIR)/msacct.ln := LINTFLAGS += $(LINTMACHFLAGS) 180$(LINTS_DIR)/thread.ln := LINTFLAGS += $(LINTMACHFLAGS) 181 182# 183# Build `options'. These are entirely historical and the need for these 184# is completely removed by the module technology. 185# 186OPTION_DEFS = -DC2_AUDIT 187 188# 189# Collect the preprocessor definitions to be associated with *all* 190# files. 191# 192ALL_DEFS = $(DEBUG_DEFS) $(OPTION_DEFS) 193 194# 195# The kernels modules which are "implementation architecture" 196# specific for this machine are enumerated below. Note that most 197# of these modules must exist (in one form or another) for each 198# architecture. 199# 200# Common Drivers (usually pseudo drivers) (/kernel/drv) 201# DRV_KMODS are built both 32-bit and 64-bit 202# DRV_KMODS_32 are built only 32-bit 203# DRV_KMODS_64 are built only 64-bit 204# 205DRV_KMODS += aac 206DRV_KMODS += aggr 207DRV_KMODS += ahci 208DRV_KMODS += amd64_gart 209DRV_KMODS += amr 210DRV_KMODS += agpgart 211DRV_KMODS += agptarget 212DRV_KMODS += arp 213DRV_KMODS += asy 214DRV_KMODS += ata 215DRV_KMODS += ath 216DRV_KMODS += audio810 217DRV_KMODS += audiohd 218DRV_KMODS += audioixp 219DRV_KMODS += bl 220DRV_KMODS += bge 221DRV_KMODS += bofi 222DRV_KMODS += bscbus 223DRV_KMODS += bscv 224DRV_KMODS += clone 225DRV_KMODS += cmdk 226DRV_KMODS += cn 227DRV_KMODS += conskbd 228DRV_KMODS += consms 229DRV_KMODS += cpuid 230DRV_KMODS += cpunex 231DRV_KMODS += crypto 232DRV_KMODS += cryptoadm 233DRV_KMODS += devinfo 234DRV_KMODS += dld 235DRV_KMODS_32 += dnet 236DRV_KMODS += dump 237DRV_KMODS += ecpp 238DRV_KMODS += fd 239DRV_KMODS += fdc 240DRV_KMODS += fssnap 241DRV_KMODS += i8042 242DRV_KMODS += i915 243DRV_KMODS += icmp 244DRV_KMODS += icmp6 245DRV_KMODS += ip 246DRV_KMODS += ip6 247DRV_KMODS += ipf 248DRV_KMODS += ippctl 249DRV_KMODS += ipsecah 250DRV_KMODS += ipsecesp 251DRV_KMODS += ipw 252DRV_KMODS += iwi 253DRV_KMODS += iwscn 254DRV_KMODS += kb8042 255DRV_KMODS += keysock 256DRV_KMODS += kssl 257DRV_KMODS += kstat 258DRV_KMODS += ksyms 259DRV_KMODS += kmdb 260DRV_KMODS += llc1 261DRV_KMODS += lofi 262DRV_KMODS += log 263DRV_KMODS += logi 264DRV_KMODS += logindmux 265DRV_KMODS += mm 266DRV_KMODS += mouse8042 267DRV_KMODS_32 += mscsi 268DRV_KMODS_32 += msm 269DRV_KMODS += nca 270DRV_KMODS += nv_sata 271DRV_KMODS += openeepr 272DRV_KMODS += pci_pci 273DRV_KMODS += pcic 274DRV_KMODS += pcie_pci 275DRV_KMODS += physmem 276DRV_KMODS += pcan 277DRV_KMODS += pcwl 278DRV_KMODS += pit_beep 279DRV_KMODS += pm 280DRV_KMODS += poll 281DRV_KMODS += pool 282DRV_KMODS += power 283DRV_KMODS += pseudo 284DRV_KMODS += ptc 285DRV_KMODS += ptm 286DRV_KMODS += pts 287DRV_KMODS += ptsl 288DRV_KMODS += ral 289DRV_KMODS += ramdisk 290DRV_KMODS += random 291DRV_KMODS += rds 292DRV_KMODS += rpcib 293DRV_KMODS += rsm 294DRV_KMODS += rts 295DRV_KMODS += rtw 296DRV_KMODS += sad 297DRV_KMODS += sctp 298DRV_KMODS += sctp6 299DRV_KMODS += sd 300DRV_KMODS += sgen 301DRV_KMODS += si3124 302DRV_KMODS += smbios 303DRV_KMODS += spdsock 304DRV_KMODS += sppp 305DRV_KMODS += sppptun 306DRV_KMODS += st 307DRV_KMODS += sy 308DRV_KMODS += sysevent 309DRV_KMODS += sysmsg 310DRV_KMODS += tcp 311DRV_KMODS += tcp6 312DRV_KMODS += tl 313DRV_KMODS += tnf 314DRV_KMODS += udp 315DRV_KMODS += udp6 316DRV_KMODS += ucode 317DRV_KMODS += vgatext 318DRV_KMODS += vni 319DRV_KMODS += vnic 320DRV_KMODS += wc 321DRV_KMODS += winlock 322DRV_KMODS += wpi 323DRV_KMODS += xge 324DRV_KMODS += zcons 325DRV_KMODS += chxge 326 327# 328# Don't build some of these for OpenSolaris, since they will be 329# replaced by binaries that are signed by Sun Release Engineering. 330# 331$(CLOSED_BUILD)DRV_KMODS += dca 332 333$(CLOSED_BUILD)CLOSED_DRV_KMODS += audioens 334$(CLOSED_BUILD)CLOSED_DRV_KMODS += audiovia823x 335$(CLOSED_BUILD)CLOSED_DRV_KMODS += bmc 336$(CLOSED_BUILD)CLOSED_DRV_KMODS += elxl 337$(CLOSED_BUILD)CLOSED_DRV_KMODS += glm 338$(CLOSED_BUILD)CLOSED_DRV_KMODS += iprb 339$(CLOSED_BUILD)CLOSED_DRV_KMODS += llc2 340$(CLOSED_BUILD)CLOSED_DRV_KMODS += marvell88sx 341$(CLOSED_BUILD)CLOSED_DRV_KMODS += mpt 342$(CLOSED_BUILD)CLOSED_DRV_KMODS_32 += ncrs 343$(CLOSED_BUILD)CLOSED_DRV_KMODS += pcn 344$(CLOSED_BUILD)CLOSED_DRV_KMODS += rtls 345$(CLOSED_BUILD)CLOSED_DRV_KMODS_32 += sbpro 346 347# 348# Common code drivers 349# 350 351DRV_KMODS += afe 352DRV_KMODS += dmfe 353DRV_KMODS += e1000g 354DRV_KMODS += mxfe 355DRV_KMODS += rge 356$(CLOSED_BUILD)CLOSED_DRV_KMODS += ixgb 357 358# 359# DTrace and DTrace Providers 360# 361DRV_KMODS += dtrace 362DRV_KMODS += fbt 363DRV_KMODS += lockstat 364DRV_KMODS += profile 365DRV_KMODS += sdt 366DRV_KMODS += systrace 367DRV_KMODS += fasttrap 368 369# 370# I/O framework test drivers 371# 372DRV_KMODS += pshot 373DRV_KMODS += gen_drv 374DRV_KMODS += tvhci tphci tclient 375DRV_KMODS += emul64 376 377# 378# Machine Specific Driver Modules (/kernel/drv): 379# 380DRV_KMODS += options 381DRV_KMODS += scsi_vhci 382 383# 384# PCMCIA specific module(s) 385# 386DRV_KMODS += pcs 387DRV_KMODS += pcata pcmem pcram 388DRV_KMODS += pem 389MISC_KMODS += cardbus 390$(CLOSED_BUILD)CLOSED_DRV_KMODS += pcelx 391$(CLOSED_BUILD)CLOSED_DRV_KMODS += pcser 392 393# 394# SCSI Enclosure Services driver 395# 396DRV_KMODS += ses 397 398# 399# USB specific modules 400# 401DRV_KMODS += hid 402DRV_KMODS += hubd 403DRV_KMODS += uhci 404DRV_KMODS += ehci 405DRV_KMODS += ohci 406DRV_KMODS += usb_mid 407DRV_KMODS += usb_ia 408DRV_KMODS += scsa2usb 409DRV_KMODS += usbprn 410DRV_KMODS += ugen 411DRV_KMODS += usbser 412DRV_KMODS += usbsacm 413DRV_KMODS += usbsksp 414DRV_KMODS += usbsprl 415DRV_KMODS += usb_ac 416DRV_KMODS += usb_as 417DRV_KMODS += usbskel 418DRV_KMODS += usbvc 419 420$(CLOSED_BUILD)CLOSED_DRV_KMODS += usbser_edge 421 422# 423# 1394 modules 424# 425MISC_KMODS += s1394 sbp2 426DRV_KMODS += hci1394 scsa1394 427DRV_KMODS += av1394 428DRV_KMODS += dcam1394 429 430# 431# InfiniBand pseudo drivers 432# 433DRV_KMODS += ib ibd rdsib sdp 434 435# 436# LVM modules 437# 438DRV_KMODS += md 439MISC_KMODS += md_stripe md_hotspares md_mirror md_raid md_trans md_notify 440MISC_KMODS += md_sp 441 442# 443# Brand modules 444# 445BRAND_KMODS += sn1_brand lx_brand 446DRV_KMODS += lx_systrace lx_ptm lx_audio 447STRMOD_KMODS += ldlinux 448 449# 450# Exec Class Modules (/kernel/exec): 451# 452EXEC_KMODS += elfexec intpexec javaexec 453 454# 455# Scheduling Class Modules (/kernel/sched): 456# 457SCHED_KMODS += IA RT TS RT_DPTBL TS_DPTBL FSS FX FX_DPTBL 458 459# 460# File System Modules (/kernel/fs): 461# 462FS_KMODS += autofs cachefs ctfs dev devfs fdfs fifofs hsfs lofs 463FS_KMODS += lx_afs lx_proc mntfs namefs nfs objfs zfs 464FS_KMODS += pcfs procfs sockfs specfs tmpfs udfs ufs sharefs 465 466# 467# Streams Modules (/kernel/strmod): 468# 469STRMOD_KMODS += 6to4tun atun bufmod connld dedump ldterm pckt pfmod pipemod 470STRMOD_KMODS += ptem redirmod rpcmod rlmod telmod timod 471STRMOD_KMODS += spppasyn spppcomp 472STRMOD_KMODS += tirdwr ttcompat tun 473STRMOD_KMODS += usbkbm 474STRMOD_KMODS += usbms 475STRMOD_KMODS += usb_ah 476STRMOD_KMODS += drcompat 477STRMOD_KMODS += cryptmod 478STRMOD_KMODS += vuid2ps2 479STRMOD_KMODS += vuid3ps2 480STRMOD_KMODS += vuidm3p 481STRMOD_KMODS += vuidm4p 482STRMOD_KMODS += vuidm5p 483 484# 485# 'System' Modules (/kernel/sys): 486# 487SYS_KMODS += c2audit 488SYS_KMODS += doorfs 489SYS_KMODS += exacctsys 490SYS_KMODS += inst_sync 491SYS_KMODS += kaio 492SYS_KMODS += msgsys 493SYS_KMODS += pipe 494SYS_KMODS += portfs 495SYS_KMODS += pset 496SYS_KMODS += semsys 497SYS_KMODS += shmsys 498SYS_KMODS += sysacct 499SYS_KMODS += acctctl 500 501# 502# 'Misc' Modules (/kernel/misc) 503# MISC_KMODS are built both 32-bit and 64-bit 504# MISC_KMODS_32 are built only 32-bit 505# MISC_KMODS_64 are built only 64-bit 506# 507MISC_KMODS += acpica 508MISC_KMODS += agpmaster 509MISC_KMODS += amsrc2 510MISC_KMODS += audiosup 511MISC_KMODS += bootdev 512MISC_KMODS += busra 513MISC_KMODS += cmlb 514MISC_KMODS += consconfig 515MISC_KMODS += ctf 516MISC_KMODS += dadk 517MISC_KMODS += diaudio 518MISC_KMODS += dls 519MISC_KMODS += drm 520MISC_KMODS += fssnap_if 521MISC_KMODS += gda 522MISC_KMODS += gld 523MISC_KMODS += hidparser 524MISC_KMODS += hook 525MISC_KMODS += hpcsvc 526MISC_KMODS += ibcm 527MISC_KMODS += ibdm 528MISC_KMODS += ibmf 529MISC_KMODS += ibtl 530MISC_KMODS += idmap 531MISC_KMODS += ipc 532MISC_KMODS += kbtrans 533MISC_KMODS += kcf 534MISC_KMODS += kgssapi 535MISC_KMODS += kmech_dummy 536MISC_KMODS += kmech_krb5 537MISC_KMODS += mac 538MISC_KMODS += mixer 539MISC_KMODS += net80211 540MISC_KMODS += nfs_dlboot 541MISC_KMODS += nfssrv 542MISC_KMODS += neti 543MISC_KMODS += pci_autoconfig 544MISC_KMODS += pcicfg 545MISC_KMODS += pciehpc 546MISC_KMODS += pcihp 547MISC_KMODS += pcmcia 548MISC_KMODS += rpcsec 549MISC_KMODS += rpcsec_gss 550MISC_KMODS += rsmops 551MISC_KMODS += sata 552MISC_KMODS += scsi 553MISC_KMODS += strategy 554MISC_KMODS += strplumb 555MISC_KMODS += sysinit 556MISC_KMODS += tem 557MISC_KMODS += tlimod 558MISC_KMODS += usba usba10 usbs49_fw 559MISC_KMODS += scsi_vhci_f_sym 560MISC_KMODS += scsi_vhci_f_tpgs 561MISC_KMODS += scsi_vhci_f_asym_sun 562 563$(CLOSED_BUILD)CLOSED_MISC_KMODS += amsrc1 564$(CLOSED_BUILD)CLOSED_MISC_KMODS += klmmod klmops 565$(CLOSED_BUILD)CLOSED_MISC_KMODS += phx 566$(CLOSED_BUILD)CLOSED_MISC_KMODS += scsi_vhci_f_asym_lsi 567$(CLOSED_BUILD)CLOSED_MISC_KMODS += scsi_vhci_f_asym_emc 568$(CLOSED_BUILD)CLOSED_MISC_KMODS += scsi_vhci_f_sym_emc 569 570# 571# Software Cryptographic Providers (/kernel/crypto): 572# 573# Don't build some of these for OpenSolaris, since they will be 574# replaced by binaries that are signed by Sun RE. 575# 576$(CLOSED_BUILD)CRYPTO_KMODS += aes 577$(CLOSED_BUILD)CRYPTO_KMODS += arcfour 578$(CLOSED_BUILD)CRYPTO_KMODS += blowfish 579$(CLOSED_BUILD)CRYPTO_KMODS += des 580CRYPTO_KMODS += md4 581CRYPTO_KMODS += md5 582CRYPTO_KMODS += rsa 583CRYPTO_KMODS += sha1 584CRYPTO_KMODS += sha2 585CRYPTO_KMODS += swrand 586 587# 588# IP Policy Modules (/kernel/ipp) 589# 590IPP_KMODS += dlcosmk 591IPP_KMODS += flowacct 592IPP_KMODS += ipgpc 593IPP_KMODS += dscpmk 594IPP_KMODS += tokenmt 595IPP_KMODS += tswtclmt 596 597# 598# generic-unix module (/kernel/genunix): 599# 600GENUNIX_KMODS += genunix 601 602# 603# SVVS Testing Modules (/kernel/strmod): 604# 605# These are streams and driver modules which are not to be 606# delivered with a released system. However, during development 607# it is convenient to build and install the SVVS kernel modules. 608# 609SVVS_KMODS += lmodb lmode lmodr lmodt lo tidg tivc tmux 610 611SVVS += svvs 612 613# 614# Modules eXcluded from the product: 615# 616$(CLOSED_BUILD)CLOSED_XMODS = \ 617 adpu320 \ 618 bnx \ 619 daplt \ 620 lsimega \ 621 nge \ 622 sdpib \ 623 spwr \ 624 tavor 625 626 627# 628# 'Dacf' Modules (/kernel/dacf): 629# 630DACF_KMODS += usb_ac_dacf 631 632# 633# Performance Counter BackEnd modules (/usr/kernel/pcbe) 634# 635PCBE_KMODS += p123_pcbe p4_pcbe opteron_pcbe 636 637# 638# MAC-Type Plugin Modules (/kernel/mac) 639# 640MAC_KMODS += mac_ether 641MAC_KMODS += mac_wifi 642 643# 644# 'Devname' Modules (kernel/devname) 645# 646DEVNAME_KMODS += sdev_nsconfig_mod 647 648# 649# kiconv modules (/kernel/kiconv): 650# 651KICONV_KMODS += kiconv_emea 652