Below is an example of a Makefile.bin file, in
this case for the KTS, or microkernel tests, component.
The Makefile.bin file identifies the component, and provides a list of components it requires to work.
The following example shows a Makefile.bin file for the C_OS, created using mkmerge. This is used to build the root tree.
#****************************************************************
#
# Component = os
#
# Synopsis =
#
# Copyright 1999,2001 Sun Microsystems, Inc. All rights reserved.
#
#****************************************************************
#
# #ident "@(#)Makefile.bin 1.16 01/10/03 SMI"
#
#****************************************************************
COMPONENT += OS
ROOT += $(OS_DIR)/root $(BUILD_DIR)/obj/prebuild/os/root
PREBUILD += $(OS_DIR)/prebuild
OS.all:: NUCLEUS.all
OS_XML = os.xml sys_rule.xml sys_action.xml cinit.xml
cinit_action.xml hrCtrl.xml hrCtrl_action.xml
OS_SYSADM = sysadm.ini
xml:: DEVTOOLS.all $(OS_DIR)/exports.lst
@sh $(DEVTOOLS_DIR)/cpxml $(BUILD_DIR)/conf/mkconfig
$(OS_DIR)/conf/mkconfig $(OS_XML)
@sh $(DEVTOOLS_DIR)/cpxml $(BUILD_DIR)/conf $(OS_DIR)/conf
$(OS_SYSADM)
@sh $(DEVTOOLS_DIR)/cpxml $(OS_DIR) $(OS) Makefile.bin
root:: $(BUILD_DIR)/root/etc/resolv.conf
$(BUILD_DIR)/root/etc/resolv.conf:
@mkdir -p $(BUILD_DIR)/root/tmp
@chmod ugo+rwx $(BUILD_DIR)/root/tmp
@mkdir -p $(BUILD_DIR)/root/dev
@mkdir -p $(BUILD_DIR)/root/image
@mkdir -p $(BUILD_DIR)/root/etc
@mkdir -p $(BUILD_DIR)/root/proc
@mkdir -p $(BUILD_DIR)/root/var/run
@mkdir -p $(BUILD_DIR)/root/var/log
@mkdir -p $(BUILD_DIR)/root/var/db
@chmod ugo+rwx $(BUILD_DIR)/root/var/run
@chmod ugo+rwx $(BUILD_DIR)/root/var/log
@touch $(BUILD_DIR)/root/var/log/messages
@chmod ugo+rw $(BUILD_DIR)/root/var/log/messages
@[ -f /etc/resolv.conf ] && cp /etc/resolv.conf $@ || touch $@
XML2 += mkconfig/os.xml
The following example shows a Makefile.bin file for the EXAMPLES component.
#**************************************************************** # # Component = examples # # Synopsis = # # Copyright 1999 Sun Microsystems, Inc. All rights reserved. # #**************************************************************** # # #ident "@(#)Makefile.bin 1.4 01/10/03 SMI" # #**************************************************************** COMPONENT += EXAMPLES ROOT += $(EXAMPLES_DIR)/root EXAMPLES.all::