ChorusOS 5.0 Source Delivery Guide

Makefile

The Makefile generated by mkmk contains two parts. The first part has a list of the definitions of variables as defined in Table 4-8, Table 4-9, Table 4-7 and Table 4-10. The second part contains preprocessed copies of the .bf, .lf, and .mf files found in the work directory. In this example there is only a .bf file present in the work directory.


Example 4-4 A Makefile Generated by mkmk

BDIR = build_dir
FAMILY = usparc
COMPILER = gcc

include $(BDIR)/Paths
include $(DEVTOOLS_DIR)/tgt-make/host.conf
include $(DEVTOOLS_DIR)/tgt-make/variables.rf

BNAME = sys
MPATH = src/sys
DEFINES = -DKERNEL -D_KERNEL -D__FreeBSD__ -DINET -DNO_CACHE -DMSDOSFS -DNFS
INCLUDES = -I/build_dir/build-OS/src/sys -Ibuild_dir
/build-OS/src/sys/chorus/sys
-I/build_dir/build-OS/src/sys/sys
-I/build_dir/build-OS/src/sys/machine
-I/build_dir/build-NUCLEUS/include
-I/build_dir/build-NUCLEUS/include/chorus
-I/build_dir/build-OS/include/chorus
-I/build_dir/build-OS/include
FEXCEPTION = OFF
FFPU = ON
FOPTIM = OFF
FPROF = OFF
FREMOTEDEB = ON
FVERBOSE = OFF
FASSERT = ON
FWARN = STRICT
FGCOV = OFF
FPIC = OFF
FLARGEGOT = OFF
FVEC = OFF
VARIABLES = OS_DIR NUCLEUS_DIR DRV_DIR OS_USER_LIBS OS_SUP_LIBS
SUB_DIRS = cam chorus crypto dev isofs kern libkern machine miscfs 
msdosfs net netinet
netinet6 netkey netns nfs nfs_noserver solaris sys ufs vm
EXTRA_DIRS = 
BFILES = sys.bf
MFILES = 
DFILES = debug.df sys.df
MODULES = 
OS_DIR = build_dir/build-OS
NUCLEUS_DIR = build_dir/build-NUCLEUS
DRV_DIR = build_dir/build-DRV
OS_USER_LIBS = build_dir/build-OS/lib/libc.a build_dir/build-OS/lib/sys/
libsystrap.u.a
/net/abdias/export/build/orivat/chorus/dev-r50/sparc/dev-int2709/
build-OS/lib/libc.a
OS_SUP_LIBS = build_dir/build-OS/lib/libc.a build_dir/build-OS/lib/sys/
libsyscall.a
/build_dir/build-OS/lib/libc.a

include $(BDIR)/Paths
include $(DEVTOOLS_DIR)/tgt-make/shared.rf

# produced from sys.bf -- begin

S_LIBS = $(OS_DIR)/lib/sys/libufs.a \
         $(OS_DIR)/lib/sys/libdisk.a \
         $(OS_DIR)/lib/sys/libgen.a \
         $(OS_DIR)/lib/sys/libmem.a \
         $(OS_DIR)/lib/sys/libunresolved.a \
         $(OS_DIR)/lib/sys/libloader.s.a \
         $(NUCLEUS_DIR)/lib/zlib/zlib.a \
         $(OS_DIR)/lib/sys/libio.s.a \
         $(NUCLEUS_DIR)/lib/stdc/libstdc++.a \
         $(NUCLEUS_DIR)/lib/embedded/libebd.s.a \
         $(NUCLEUS_DIR)/lib/cpu/cpu.s.a \
         $(NUCLEUS_DIR)/lib/ddi/net.s.a \
         $(NUCLEUS_DIR)/lib/ddm/ddm.s.a \
         $(NUCLEUS_DIR)/lib/sysevent/sysevent.a \
         $(NUCLEUS_DIR)/lib/visu/visu.s.a \
         $(NUCLEUS_DIR)/lib/gauges/gauges.s.a \
         $(NUCLEUS_DIR)/lib/classix/libsys.s.a \
         $(DRV_DIR)/lib/drv_tools/drv_tools.s.a

BINARY += C_OS

C_OS: $(S_LIBS)
        $(MKLINK) -r -c -e _start -o C_OS -B $(S_LIBS)

# produced from sys.bf -- end

include all.dp
include $(DEVTOOLS_DIR)/tgt-make/tgtdevsys.rf
DTL=${DEVTOOLS_DIR}/host/bin/