summaryrefslogtreecommitdiff
path: root/phpmake
diff options
context:
space:
mode:
Diffstat (limited to 'phpmake')
-rw-r--r--phpmake/Makefile.php41
-rw-r--r--phpmake/defaults.php0
-rw-r--r--phpmake/functions.php61
-rw-r--r--phpmake/library.php5
-rw-r--r--phpmake/version.php5
5 files changed, 112 insertions, 0 deletions
diff --git a/phpmake/Makefile.php b/phpmake/Makefile.php
new file mode 100644
index 0000000..cd3d83a
--- /dev/null
+++ b/phpmake/Makefile.php
@@ -0,0 +1,41 @@
+<?php
+ include getenv("PHPMAKE_LIBPATH") . "library.php";
+
+ phpmake_makefile_rules();
+?>
+
+# Makefile for Open Sound System module main
+
+CC=cc -ffreestanding
+HOSTCC=cc
+CPLUSPLUS=g++ -fno-rtti -fno-exceptions -I.
+OSFLAGS=-fno-common -fno-stack-protector -Wall -Werror -DOSS_LITTLE_ENDIAN
+OS=Linux
+ARCH=x86_64
+TOPDIR=.
+OBJDIR=$(TOPDIR)/target/objects
+TMPDIR=.
+MODDIR=$(TOPDIR)/target/modules
+BINDIR=$(TOPDIR)/target/bin
+LIBDIR=$(TOPDIR)/target/lib
+SBINDIR=$(TOPDIR)/target/sbin
+OSSLIBDIR="/usr/lib/oss"
+THISOS=kernel/OS/Linux
+CFLAGS=-O
+SUBDIRS=lib cmd kernel os_cmd kernel/OS/Linux
+TARGETS=main
+DEPDIR=
+
+include .makefile
+
+all: subdirs
+lint: lint_subdirs
+
+dep: dep_subdirs
+
+include $(TOPDIR)/make.defs
+
+clean: clean_local clean_subdirs
+
+
+include setup/Linux/make.local
diff --git a/phpmake/defaults.php b/phpmake/defaults.php
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/phpmake/defaults.php
diff --git a/phpmake/functions.php b/phpmake/functions.php
new file mode 100644
index 0000000..ac99655
--- /dev/null
+++ b/phpmake/functions.php
@@ -0,0 +1,61 @@
+<?php
+
+function phpmake_makefile_top_rules()
+{
+ echo "# Generated from Makefile.php by phpmake v" . PHPMAKE_VERSION . "\n";
+ echo "# PHPMAKE_LIBPATH = " . getenv("PHPMAKE_LIBPATH") . "\n";
+ echo "# Project = " . getenv("PHPMAKE_PROJECT") . "\n";
+ echo "\n";
+/*
+ * Generate the default rules and settings to be located
+ * in the beginning of Makefile
+ */
+
+ echo "\n";
+ echo "# ** Start of phpmake definitions\n";
+ echo ".SUFFIXES: .PHc .PHh .PHinc .inc\t# PHP source files\n";
+ echo "PHP=php\n";
+ echo "PHPMAKE_PROJECT=" . getenv("PHPMAKE_PROJECT") . "\n";
+ echo "PHPMAKE_LIBPATH=" . getenv("PHPMAKE_LIBPATH") . "\n";
+ echo "# ** End of phpmake definitions\n";
+}
+
+function phpmake_makefile_rules()
+{
+ echo "\n";
+ echo "# ** Start of phpmake generated rules\n";
+ echo "\n";
+ echo ".PHc.c:\n";
+ echo "\t" . 'PHPMAKE_PROJECT=$(PHPMAKE_PROJECT) PHPMAKE_LIBPATH=$(PHPMAKE_LIBPATH) $(PHP) $< > $@' . "\n";
+ echo "\n";
+ echo ".PHh.h:\n";
+ echo "\t" . 'PHPMAKE_PROJECT=$(PHPMAKE_PROJECT) PHPMAKE_LIBPATH=$(PHPMAKE_LIBPATH) $(PHP) $< > $@' . "\n";
+ echo "\n";
+ echo ".PHinc.inc:\n";
+ echo "\t" . 'PHPMAKE_PROJECT=$(PHPMAKE_PROJECT) PHPMAKE_LIBPATH=$(PHPMAKE_LIBPATH) $(PHP) $< > $@' . "\n";
+ echo "\n";
+ echo "# ** End of phpmake generated rules\n";
+ echo "\n";
+}
+
+function phpmake_print_subdirs($subdirs)
+{
+ echo "SUBDIRS=";
+
+ foreach($subdirs as $d)
+ {
+ echo $d . " ";
+ }
+
+ echo "\t# Automatically generated by phpmake\n";
+}
+
+function phpmake_init_c()
+{
+ echo "// Generated by phpmake v" . PHPMAKE_VERSION . "\n";
+ echo "// PHPMAKE_LIBPATH = " . getenv("PHPMAKE_LIBPATH") . "\n";
+ echo "// Project = " . getenv("PHPMAKE_PROJECT") . "\n";
+ echo "\n";
+}
+
+?>
diff --git a/phpmake/library.php b/phpmake/library.php
new file mode 100644
index 0000000..12f13cf
--- /dev/null
+++ b/phpmake/library.php
@@ -0,0 +1,5 @@
+<?php
+ include "version.php";
+ include "defaults.php";
+ include "functions.php";
+?>
diff --git a/phpmake/version.php b/phpmake/version.php
new file mode 100644
index 0000000..9326264
--- /dev/null
+++ b/phpmake/version.php
@@ -0,0 +1,5 @@
+<?php
+
+define("PHPMAKE_VERSION", "0.1");
+
+?>