Annotation of XNU/makedefs/MakeInc.def, revision 1.1.1.1

1.1       root        1: 
                      2: export SOURCE=$(shell /bin/pwd)
                      3: 
                      4: #
                      5: # gnumake 3.77 support
                      6: #
                      7: export USE_APPLE_PB_SUPPORT = all
                      8: 
                      9: #
                     10: # Incremental Build option
                     11: #
                     12: ifndef INCR_EXPORTHDRS
                     13: ifeq ($(shell test -d $$OBJROOT/EXPORT_HDRS;echo $$?),0)
                     14: export INCR_EXPORTHDRS = TRUE
                     15: else
                     16: export INCR_EXPORTHDRS = FALSE
                     17: endif
                     18: endif
                     19: 
                     20: ifndef INCR_INSTALLHDRS
                     21: ifeq ($(shell test -d $$DSTROOT/$INCDIR;echo $$?),0)
                     22: export INCR_INSTALLHDRS        = TRUE
                     23: else
                     24: export INCR_INSTALLHDRS        = FALSE
                     25: endif
                     26: endif
                     27: 
                     28: #
                     29: # Component List
                     30: #
                     31: export COMPONENT_LIST  = osfmk bsd iokit pexpert libkern
                     32: export COMPONENT       = $(firstword $(subst /, ,$(shell $(RELPATH) $(SRCROOT) $(SOURCE))))
                     33: export COMPONENT_IMPORT_LIST = $(filter-out $(COMPONENT),$(COMPONENT_LIST)) 
                     34: 
                     35: # Architecture options
                     36: #
                     37: #  supported configurations : PPC I386
                     38: #
                     39: ifdef RC_ARCHS
                     40: export ARCH_CONFIGS    = $(shell echo -n $(RC_ARCHS) | tr a-z A-Z)
                     41: else
                     42: ifndef ARCH_CONFIGS
                     43: export ARCH_CONFIGS    = $(shell arch | tr a-z A-Z)
                     44: endif
                     45: endif
                     46: export ARCH_CONFIG     = $(firstword $(ARCH_CONFIGS))
                     47: export arch_config     = $(shell echo -n $(ARCH_CONFIG) | tr A-Z a-z)
                     48: 
                     49: 
                     50: # Kernel Configuration options  
                     51: #
                     52: # supported configurations : RELEASE DEBUG PROFILE
                     53: #
                     54: ifndef KERNEL_CONFIGS
                     55: export KERNEL_CONFIGS  = RELEASE
                     56: endif
                     57: export KERNEL_CONFIG   = $(firstword $(KERNEL_CONFIGS))
                     58: 
                     59: #
                     60: # Kernel Configuration to install
                     61: #
                     62: #  supported install architecture : PPC I386
                     63: #
                     64: export INSTALL_TYPE    = RELEASE
                     65: ifdef RC_ARCHS
                     66: export INSTALL_ARCHS   = $(ARCH_CONFIGS)
                     67: else
                     68: export INSTALL_ARCHS   = $(ARCH_CONFIGS)
                     69: endif
                     70: export INSTALL_ARCH    = $(ARCH_CONFIG)
                     71: 
                     72: export INSTALL_ARCH_DEFAULT    = PPC
                     73: 
                     74: #
                     75: # Standard defines list
                     76: #
                     77: export DEFINES = -DAPPLE -DNeXT -DKERNEL_PRIVATE -D__MACHO__=1 -D_ANSI_C_SOURCE -Dvolatile=__volatile $(IDENT)
                     78: 
                     79: #
                     80: # Compiler command
                     81: #
                     82: CC     = /usr/bin/cc
                     83: KCC    = /usr/bin/cc
                     84: 
                     85: #
                     86: # Default CFLAGS
                     87: #
                     88: ifdef RC_CFLAGS
                     89: export OTHER_CFLAGS    = $(subst $(addprefix -arch ,$(RC_ARCHS)),,$(RC_CFLAGS))
                     90: endif
                     91: 
                     92: export CFLAGS_GEN = -static -g -nostdinc -nostdlib -traditional-cpp -fno-builtin -finline -fno-keep-inline-functions -msoft-float -fsigned-bitfields -force_cpusubtype_ALL -Wpointer-arith $(OTHER_CFLAGS)
                     93: 
                     94: export CFLAGS_RELEASE  = -O2
                     95: export CFLAGS_DEBUG    = -O1 -fno-omit-frame-pointer
                     96: export CFLAGS_PROFILE  = 
                     97: 
                     98: export CFLAGS_PPC      = -arch ppc -Dppc -DPPC -D__PPC__ -mcpu=604 -D_BIG_ENDIAN=__BIG_ENDIAN__
                     99: export CFLAGS_I386     = -arch i386 -Di386 -DI386 -D__I386__ -D_BIG_ENDIAN=__LITTLE_ENDIAN__
                    100: 
                    101: export CFLAGS  = $(CFLAGS_GEN) \
                    102:                  $($(addsuffix $(ARCH_CONFIG),CFLAGS_)) \
                    103:                  $($(addsuffix $(KERNEL_CONFIG),CFLAGS_)) \
                    104:                  $(DEFINES)
                    105: 
                    106: #
                    107: # Assembler command
                    108: #
                    109: AS     = /usr/bin/cc
                    110: S_KCC  = /usr/bin/cc
                    111: 
                    112: #
                    113: # Default SFLAGS
                    114: #
                    115: export SFLAGS_GEN = -static -D__ASSEMBLER__ -force_cpusubtype_ALL $(OTHER_CFLAGS)
                    116: 
                    117: export SFLAGS_RELEASE  = 
                    118: export SFLAGS_DEBUG    = 
                    119: export SFLAGS_PROFILE  = 
                    120: 
                    121: export SFLAGS_PPC      = $(CFLAGS_PPC)
                    122: export SFLAGS_I386     = $(CFLAGS_I386)
                    123: 
                    124: export SFLAGS  = $(SFLAGS_GEN) \
                    125:                  $($(addsuffix $(ARCH_CONFIG),SFLAGS_)) \
                    126:                  $($(addsuffix $(KERNEL_CONFIG),SFLAGS_)) \
                    127:                  $(DEFINES)
                    128: 
                    129: #
                    130: # Linker command
                    131: #
                    132: LD     = /usr/bin/ld
                    133: 
                    134: #
                    135: # Default LDFLAGS
                    136: #
                    137: export LDFLAGS_COMPONENT_GEN = -static -r 
                    138: 
                    139: export LDFLAGS_COMPONENT_RELEASE       = 
                    140: export LDFLAGS_COMPONENT_DEBUG                 = 
                    141: export LDFLAGS_COMPONENT_PROFILE       = 
                    142: 
                    143: export LDFLAGS_COMPONENT_PPC   = -arch ppc
                    144: export LDFLAGS_COMPONENT_I386  = -arch i386
                    145: 
                    146: export LDFLAGS_COMPONENT       = $(LDFLAGS_COMPONENT_GEN) \
                    147:                  $($(addsuffix $(ARCH_CONFIG),LDFLAGS_COMPONENT_)) \
                    148:                  $($(addsuffix $(KERNEL_CONFIG),LDFLAGS_COMPONENT_))
                    149: 
                    150: export LDFLAGS_KERNEL_GEN = -static -force_cpusubtype_ALL -segalign 0x1000 
                    151: 
                    152: export LDFLAGS_KERNEL_RELEASE  =  -noseglinkedit
                    153: export LDFLAGS_KERNEL_DEBUG    = 
                    154: export LDFLAGS_KERNEL_PROFILE  = 
                    155: 
                    156: export LDFLAGS_KERNEL_PPC      = -arch ppc -segaddr __VECTORS 0x0 -segaddr __TEXT 0x11000 -e __start -sectalign __DATA __common 0x1000 -sectalign __DATA __bss 0x1000
                    157: export LDFLAGS_KERNEL_I386     = -arch i386 -segaddr __TEXT 0x100000 -segaddr __LINKEDIT 0x780000 -e _pstart
                    158: 
                    159: export LDFLAGS_KERNEL  = $(LDFLAGS_KERNEL_GEN) \
                    160:                  $($(addsuffix $(ARCH_CONFIG),LDFLAGS_KERNEL_)) \
                    161:                  $($(addsuffix $(KERNEL_CONFIG),LDFLAGS_KERNEL_))
                    162: 
                    163: 
                    164: #
                    165: # Default runtime libraries to be linked with the kernel
                    166: #
                    167: export LD_KERNEL_LIBS  = -lcc
                    168: 
                    169: #
                    170: # Default INCFLAGS
                    171: #
                    172: export INCFLAGS_IMPORT         = $(patsubst %, -I$(OBJROOT)/EXPORT_HDRS/%, $(COMPONENT_IMPORT_LIST))
                    173: export INCFLAGS_EXTERN         = -I$(OBJROOT)/EXTERN_HDRS -I$(SRCROOT)/EXTERNAL_HEADERS -I$(SRCROOT)/EXTERNAL_HEADERS/bsd
                    174: export INCFLAGS_GEN    = -I$(SRCROOT)/$(COMPONENT) 
                    175: export INCFLAGS_POSIX  = -I$(OBJROOT)/EXPORT_HDRS/bsd
                    176: export INCFLAGS_LOCAL  = -I.
                    177: 
                    178: export INCFLAGS        = -nostdinc $(INCFLAGS_LOCAL) $(INCFLAGS_GEN) $(INCFLAGS_IMPORT) $(INCFLAGS_EXTERN) $(INCFLAGS_MAKEFILE)
                    179: 
                    180: #
                    181: # Default MIGFLAGS
                    182: #
                    183: export MIGFLAGS        = $(DEFINES) $(INCFLAGS) $($(addsuffix $(ARCH_CONFIG),CFLAGS_))
                    184: 
                    185: #
                    186: # Default VPATH
                    187: #
                    188: empty:=
                    189: space:= $(empty) $(empty)
                    190: export VPATH_IMPORT    = $(subst $(space),:,$(patsubst %,$(OBJROOT)/EXPORT_HDRS/%,$(strip $(COMPONENT_IMPORT_LIST)))):
                    191: export VPATH_EXTERN    = $(OBJROOT)/EXTERN_HDRS:
                    192: export VPATH_GEN       = .:$(SOURCE):
                    193: 
                    194: export VPATH           = $(VPATH_GEN)$(VPATH_IMPORT)$(VPATH_EXTERN)$(VPATH_MAKEFILE)
                    195: 
                    196: #
                    197: # Macros that control installation of kernel and it's header files
                    198: #
                    199: # install flags for header files
                    200: # 
                    201: INSTALL_FLAGS = -c -m 0444
                    202: 
                    203: #
                    204: # Header file destinations
                    205: #
                    206: FRAMEDIR = System/Library/Frameworks
                    207: ifndef INCDIR
                    208:     INCDIR = $(FRAMEDIR)/System.framework/Versions/B/Headers
                    209: endif
                    210: ifndef LCLDIR
                    211:     LCLDIR = $(FRAMEDIR)/System.framework/Versions/B/PrivateHeaders
                    212: endif
                    213: 
                    214: KINCVERS = A
                    215: KINCFRAME = $(FRAMEDIR)/Kernel.framework
                    216: KINCDIR = $(KINCFRAME)/Versions/$(KINCVERS)/Headers
                    217: 
                    218: #
                    219: # Compononent Header file destinations
                    220: #
                    221: EXPDIR = EXPORT_HDRS/$(COMPONENT)
                    222: 
                    223: #
                    224: # Strip Flags
                    225: #
                    226: export STRIP_FLAGS_RELEASE     = -S 
                    227: export STRIP_FLAGS_DEBUG       = -S 
                    228: export STRIP_FLAGS_PROFILE     = -S 
                    229: 
                    230: export STRIP_FLAGS     = $($(addsuffix $(KERNEL_CONFIG),STRIP_FLAGS_)) 
                    231: 
                    232: #
                    233: #  This must be here before any rules are possibly defined by the
                    234: #  machine dependent makefile fragment so that a plain "make" command
                    235: #  always works.  The config program will emit an appropriate rule to
                    236: #  cause "all" to depend on every kernel configuration it generates.
                    237: #
                    238: 
                    239: default: all
                    240: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.