ChorusOS 4.0 Production Guide

Makefile.src

Create a Makefile.src, containing the following information, in your MYCOMP directory.

all:: MYCOMP.all
    
    MYCOMP.all:: NUCLEUS.all OS.all
    MYCOMP.all:: $(MYCOMP_DIR)/DONE
    
    $(MYCOMP_DIR)/DONE:
    	rm -rf $(MYCOMP_DIR)
    	$(DEVTOOLS_DIR)/host/bin/mkmerge -s $(MYCOMP) -t $(MYCOMP_DIR)
    	cd $(MYCOMP_DIR); $(DEVTOOLS_DIR)/host/bin/mkmk -t $(NUCLEUS_DIR)
    	cd $(MYCOMP_DIR); $(make)
    	touch $(MYCOMP_DIR)/DONE

This file is more complex than the Makefile.bin file as it describes how to build the component. The first lines of output give the list of components that must be built before the MYCOMP component. As the application that you are building needs operating system services, you must build the NUCLEUS and OS components before building the MYCOMP component.

The other lines in the Makefile.src file explain the following phases of the build of an mkmk component: