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