summaryrefslogtreecommitdiff
path: root/lib/mk
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2006-12-30 21:29:14 +0000
committerCharles.Forsyth <devnull@localhost>2006-12-30 21:29:14 +0000
commit0e96539ff7cff23233d3f0a64bb285b385a3a1f4 (patch)
tree5e5363878c35855f236b12cd85ae13d9102b42bc /lib/mk
parent6e425a9de8c003b5a733621a6b6730ec3cc902b8 (diff)
20061219
Diffstat (limited to 'lib/mk')
-rw-r--r--lib/mk/binds2
-rw-r--r--lib/mk/mkconfig28
-rw-r--r--lib/mk/mksubdirs13
3 files changed, 43 insertions, 0 deletions
diff --git a/lib/mk/binds b/lib/mk/binds
new file mode 100644
index 00000000..34d4b2ae
--- /dev/null
+++ b/lib/mk/binds
@@ -0,0 +1,2 @@
+/lib/mk/mkconfig /mkconfig
+/lib/mk/mksubdirs /mkfiles/mksubdirs
diff --git a/lib/mk/mkconfig b/lib/mk/mkconfig
new file mode 100644
index 00000000..17d31a93
--- /dev/null
+++ b/lib/mk/mkconfig
@@ -0,0 +1,28 @@
+#
+# Set the following 4 variables. The host system is the system where
+# the software will be built; the target system is where it will run.
+# They are almost always the same.
+
+# On Nt systems, the ROOT path MUST be of the form `drive:/path'
+ROOT=
+
+#
+# Except for building kernels, SYSTARG must always be the same as SYSHOST
+#
+SYSHOST=Plan9 # build system OS type (Hp, Inferno, Irix, Linux, Nt, Plan9, Solaris)
+SYSTARG=$SYSHOST # target system OS type (Hp, Inferno, Irix, Linux, Nt, Plan9, Solaris)
+
+#
+# specify the architecture of the target system - Inferno imports it from the
+# environment; for other systems it is usually just hard-coded
+#
+#OBJTYPE=386 # target system object type (s800, mips, 386, arm, sparc)
+OBJTYPE=386
+
+#
+# no changes required beyond this point
+#
+OBJDIR=$SYSTARG/$OBJTYPE
+
+<$ROOT/mkfiles/mkhost-$SYSHOST # variables appropriate for host system
+<$ROOT/mkfiles/mkfile-$SYSTARG-$OBJTYPE # variables used to build target object type
diff --git a/lib/mk/mksubdirs b/lib/mk/mksubdirs
new file mode 100644
index 00000000..9b076930
--- /dev/null
+++ b/lib/mk/mksubdirs
@@ -0,0 +1,13 @@
+all:V: all-$SHELLTYPE
+install:V: install-$SHELLTYPE
+uninstall:V: uninstall-$SHELLTYPE
+nuke:V: nuke-$SHELLTYPE
+clean:V: clean-$SHELLTYPE
+
+%-rc %-nt %-sh:QV:
+ for j in $DIRS {
+ if { ftest -d $j } {
+ echo 'cd' $j '; mk' $MKFLAGS $stem
+ cd $j; mk $MKFLAGS $stem; cd ..
+ }
+ }