Annotation of driverkit/Config/Makefile, revision 1.1

1.1     ! root        1: #
        !             2: # Config server Makefile.
        !             3: #
        !             4: 
        !             5: MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles
        !             6: include $(MAKEFILEDIR)/platform.make
        !             7: 
        !             8: BUILD_NAME=    Config
        !             9: BIN_NAME=      $(BUILD_NAME)
        !            10: MIGSOURCE=     Config.defs
        !            11: MIGHEADER=     Config.h
        !            12: INSTALL_BIN_DIR = /usr/local/bin
        !            13: INSTALL_HDR_DIR = $(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/Headers/driverkit
        !            14: DRIVER_PATH     = /usr/Devices
        !            15: INSTALLFLAGS= -s -m 555
        !            16: ifneq "" "$(wildcard /bin/mkdirs)"
        !            17:   MKDIRS = /bin/mkdirs
        !            18: else
        !            19:   MKDIRS = /bin/mkdir -p
        !            20: endif
        !            21: 
        !            22: #
        !            23: # OBJROOT and SYMROOT are overridden by RC tools for builds from read-only
        !            24: # source.
        !            25: #
        !            26: OBJROOT= .
        !            27: SYMROOT= .
        !            28: 
        !            29: CC = cc
        !            30: MIG= mig
        !            31: DEBUG_CFLAGS= -DDEBUG -DDDM_DEBUG
        !            32: RELEASE_CFLAGS= 
        !            33: CFLAGS= -g -O -Wall -Wnoformat -I. -I.. -MD
        !            34: 
        !            35: #
        !            36: # Define target directories.
        !            37: #
        !            38: TARGETS=
        !            39: VPATH = $(BUILD_DIR):$(OBJROOT)
        !            40: 
        !            41: CFILES = Config.c ConfigUtils.c ConfigScan.c ConfigUfs.c
        !            42: 
        !            43: MIGCFILES = ConfigServer.c
        !            44: PRIVATE_HFILES = ConfigPrivate.h ConfigUtils.h ConfigScan.h ConfigUfs.h
        !            45: PUBLIC_HFILES =
        !            46: 
        !            47: OFILES= $(CFILES:.c=.o) $(MIGCFILES:.c=.o)
        !            48: LIBOFILES= $(LIBCFILES:.c=.o)
        !            49: 
        !            50: SOURCEFILES= $(CFILES) $(PRIVATE_HFILES) $(PUBLIC_HFILES) Makefile \
        !            51:        $(MIGSOURCE)
        !            52: 
        !            53: .SUFFIXES: .defs .h
        !            54:  
        !            55: # 
        !            56: # Libraries.
        !            57: #
        !            58: RELEASE_LIBS=          $(SYMROOT)/../libDriver/syms/libDriver.a
        !            59: DEBUG_LIBS=            $(SYMROOT)/../libDriver/syms/libDriver_g.a
        !            60: 
        !            61: first:         debug
        !            62: all:   $(TARGETS)
        !            63: 
        !            64: #
        !            65: # Note for clean build of other modules in this project, we copy header files
        !            66: # over to ../Devices, but we still install the header files from this 
        !            67: # directory.
        !            68: #
        !            69: $(HFILES): $(LHFILES)
        !            70:        cp -p $(*F).h $(INCDIR)
        !            71: 
        !            72: #
        !            73: # For now, install the debug version...
        !            74: #
        !            75: install: DSTROOT $(DSTROOT)$(INSTALL_BIN_DIR) $(DSTROOT)$(DRIVER_PATH)
        !            76: 
        !            77: install_only: DSTROOT $(DSTROOT)$(INSTALL_BIN_DIR) $(DSTROOT)$(DRIVER_PATH)
        !            78: 
        !            79: #
        !            80: # No installed headers for now.
        !            81: #
        !            82: #installhdrs: DSTROOT $(DSTROOT)$(INSTALL_HDR_DIR)
        !            83: #      install ${INSTFLAGS} $(PUBLIC_HFILES) $(DSTROOT)$(INSTALL_HDR_DIR)
        !            84: installhdrs:
        !            85: 
        !            86: kern:
        !            87: 
        !            88: installsrc: SRCROOT $(SRCROOT)
        !            89:        gnutar cf - $(SOURCEFILES) | (cd $(SRCROOT); gnutar xpf -)      
        !            90: 
        !            91: clean: 
        !            92:        rm -rf *.[aod] *~ Release Debug  $(BUILD_NAME) $(BUILD_NAME)_g tags
        !            93: 
        !            94: tags:  always
        !            95:        rm -f tags
        !            96:        ctags *.[mch]
        !            97: 
        !            98: release: $(OBJROOT) $(SYMROOT) always
        !            99:        @if [ -n "$(RC_ARCHS)" ]; then                                  \
        !           100:            machines="$(RC_ARCHS)";                                     \
        !           101:        else                                                            \
        !           102:            machines="`/usr/bin/arch`";                                 \
        !           103:        fi;                                                             \
        !           104:        BUILDDIR=$(OBJROOT)/Release;                                    \
        !           105:        echo Building release version for $$machines...;                \
        !           106:        for machine in $$machines; do                                   \
        !           107:            arch_flags="$$arch_flags -arch $$machine";                  \
        !           108:        done;                                                           \
        !           109:        $(MAKE) $$BUILDDIR/$(BUILD_NAME)  \
        !           110:                "BUILD_DIR=$$BUILDDIR"  \
        !           111:                "OBJROOT=$(OBJROOT)" \
        !           112:                "OTHER_CFLAGS=$(DEBUG_CFLAGS) $$arch_flags $(RC_CFLAGS)" \
        !           113:                "LIBS=$(RELEASE_LIBS)"
        !           114: 
        !           115: debug: $(OBJROOT) $(SYMROOT) always
        !           116:        @if [ -n "$(RC_ARCHS)" ]; then                                  \
        !           117:            machines="$(RC_ARCHS)";                                     \
        !           118:        else                                                            \
        !           119:            machines="`/usr/bin/arch`";                                 \
        !           120:        fi;                                                             \
        !           121:        BUILDDIR=$(OBJROOT)/Debug;                                      \
        !           122:        echo Building debug version for $$machines...;                  \
        !           123:        for machine in $$machines; do                                   \
        !           124:            arch_flags="$$arch_flags -arch $$machine";                  \
        !           125:        done;                                                           \
        !           126:        $(MAKE) $$BUILDDIR/$(BUILD_NAME)  \
        !           127:                "BUILD_DIR=$$BUILDDIR"  \
        !           128:                "OBJROOT=$(OBJROOT)" \
        !           129:                "OTHER_CFLAGS=$(DEBUG_CFLAGS) $$arch_flags $(RC_CFLAGS)" \
        !           130:                "LIBS=$(DEBUG_LIBS)"
        !           131: 
        !           132: #
        !           133: # Copy the defs file to the build directory because mig is so lame. 
        !           134: # libDriver builds the user side.
        !           135: #
        !           136: $(MIGCFILES): $(MIGSOURCE)
        !           137:        rm -f $(BUILD_DIR)/$(MIGSOURCE)
        !           138:        cp $(MIGSOURCE) $(BUILD_DIR)
        !           139:        (cd $(BUILD_DIR); \
        !           140:                ${MIG} ${MIGFLAGS} -user /dev/null $(MIGSOURCE))
        !           141:        
        !           142: always:
        !           143: 
        !           144: #
        !           145: # The executable Config.
        !           146: #
        !           147: $(BUILD_DIR)/$(BUILD_NAME) \
        !           148: $(BUILD_DIR)/$(BUILD_NAME)_g: $(BUILD_DIR) $(MIGCFILES) $(OFILES) $(LIBS) 
        !           149:        $(CC) $(CFLAGS) $(OTHER_CFLAGS) -o $@ $(OFILES) $(LIBS) -lcs
        !           150: 
        !           151: .c.o:
        !           152:        $(CC) $(CFLAGS) $(OTHER_CFLAGS) -c $(*F).c \
        !           153:                -dependency-file $(BUILD_DIR)/$(*F).d -o $(BUILD_DIR)/$(*F).o 
        !           154:        md -u $(BUILD_DIR)/Makedep -d $(BUILD_DIR)/$(*F).d
        !           155: 
        !           156: .m.o:
        !           157:        $(CC) $(CFLAGS) $(OTHER_CFLAGS) -c $(*F).m \
        !           158:                -dependency-file $(BUILD_DIR)/$(*F).d -o $(BUILD_DIR)/$(*F).o 
        !           159:        md -u $(BUILD_DIR)/Makedep -d $(BUILD_DIR)/$(*F).d
        !           160: 
        !           161: $(SRCROOT) $(DSTROOT)$(INSTALL_HDR_DIR) $(DSTROOT)$(INSTALL_BIN_DIR) $(BUILD_DIR) $(OBJROOT) $(SYMROOT) $(DSTROOT)$(DRIVER_PATH):
        !           162:        $(MKDIRS) $@
        !           163: 
        !           164: SRCROOT DSTROOT:
        !           165:        @if [ -n "${$@}" ]; \
        !           166:        then \
        !           167:                exit 0; \
        !           168:        else \
        !           169:                echo Must define $@; \
        !           170:                exit 1; \
        !           171:        fi
        !           172: 
        !           173: -include Makedep

unix.superglobalmegacorp.com

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