Annotation of driverkit/MakefileDir/Makefile.project_common, revision 1.1

1.1     ! root        1: #
        !             2: # Additional support for building driverkit-based driver.
        !             3: # This is the glue between ProjectBuilder's Makefiles and a driverkit-style
        !             4: # subproject. (The term "subproject" is used here loosely; PB doesn't
        !             5: # know anything about the driverkit driver). 
        !             6: #
        !             7: # This files is inlcuded by Makefile.postamble in a driver's .bproj 
        !             8: # directory; below this directory is another directory defined by
        !             9: # $(DRIVER_DIR), specified in Makefile.postamble. The DRIVER_DIR 
        !            10: # subdirectory contains all of the source for building an actual 
        !            11: # driver binary, along with a Makefile which uses a standard driverkit 
        !            12: # Makefile.device_common. 
        !            13: #
        !            14: 
        !            15: ifneq "" "$(wildcard /bin/mkdirs)"
        !            16:   MKDIRS = /bin/mkdirs
        !            17: else
        !            18:   MKDIRS = /bin/mkdir -p
        !            19: endif
        !            20: 
        !            21: # 
        !            22: # This is interpreted as "make all" for the driverkit driver.
        !            23: #
        !            24: project::
        !            25:        @echo making all for $(NAME)/$(DRIVER_DIR)
        !            26:        @if [ "$(OBJROOT)" = "$(SRCROOT)" ] ; then \
        !            27:           prod_root="../$(PRODUCT_ROOT)" ;\
        !            28:        else \
        !            29:           prod_root="$(PRODUCT_ROOT)" ; \
        !            30:        fi ;\
        !            31:        (cd $(DRIVER_DIR); $(MAKE) all \
        !            32:                "OBJROOT=$(OBJROOT)" \
        !            33:                "SYMROOT=$$prod_root" \
        !            34:                "DSTROOT=$(DSTROOT)" \
        !            35:                "RC_ARCHS=$(RC_ARCHS)")
        !            36: 
        !            37: installhdrs:: 
        !            38:        @echo make installhdrs for $(NAME)/$(DRIVER_DIR)
        !            39:        @(cd $(DRIVER_DIR); $(MAKE) $@ \
        !            40:                "OBJROOT=$(OBJROOT)" \
        !            41:                "SYMROOT=$(SYMROOT)" \
        !            42:                "DSTROOT=$(DSTROOT)" \
        !            43:                "RC_ARCHS=$(RC_ARCHS)")
        !            44: 
        !            45: clean::
        !            46:        @echo make clean for $(NAME)/$(DRIVER_DIR)
        !            47:        @(cd $(DRIVER_DIR); $(MAKE) $@)
        !            48: 
        !            49: #
        !            50: # Rename .bundle to .config, and strip driver binary.
        !            51: #
        !            52: CONFIG_EXTENSION = .config
        !            53: RELOC_SUFFIX = _reloc
        !            54: after_install::
        !            55:        $(MV) $(DSTROOT)/$(NAME)$(BUNDLE_EXTENSION) \
        !            56:              $(DSTROOT)/$(NAME)$(CONFIG_EXTENSION)
        !            57:        @(reloc=$(DSTROOT)/$(NAME)$(CONFIG_EXTENSION)/$(NAME)$(RELOC_SUFFIX); \
        !            58:        if [ -s $$reloc ]; then \
        !            59:                echo stripping $$reloc ; \
        !            60:                $(STRIP) $(RELOCATABLE_STRIP_OPTS) $$reloc ; \
        !            61:        fi)
        !            62: 
        !            63: 
        !            64: #
        !            65: # App Makefiles have their own way of doing installsrc...
        !            66: #
        !            67: $(NAME).copy:: DEST $(DEST)/$(DRIVER_DIR)
        !            68:        echo installsrc for $(NAME)/$(DRIVER_DIR)
        !            69:        (cd $(DRIVER_DIR); $(MAKE) installsrc \
        !            70:                "SRCROOT=$(DEST)/$(DRIVER_DIR)")
        !            71: 
        !            72: $(DEST)/$(DRIVER_DIR):
        !            73:        $(MKDIRS) $@

unix.superglobalmegacorp.com

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