--- /dev/null
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ; while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" = `pwd` ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+ @echo -e "\nThe Makefile.rules has not been found in this or parent directory\n"
+else
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
--- /dev/null
+SUBDIRS = generic mach-$(MACH)
--- /dev/null
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ; while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" = `pwd` ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+ @echo -e "\nThe Makefile.rules has not been found in this or parent directory\n"
+else
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
--- /dev/null
+SUBDIRS = defines libs
--- /dev/null
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ; while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" = `pwd` ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+ @echo -e "\nThe Makefile.rules has not been found in this or parent directory\n"
+else
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
--- /dev/null
+include_HEADERS = $(notdir $(wildcard $(SOURCES_DIR)/*.h))
--- /dev/null
+/*-
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+#ifndef _SYS_TYPES_H_
+#define _SYS_TYPES_H_
+
+#include <sys/cdefs.h>
+#include <sys/inttypes.h>
+
+/* Machine type dependent parameters. */
+
+typedef unsigned char u_char;
+typedef unsigned short u_short;
+typedef unsigned int u_int;
+typedef unsigned long u_long;
+typedef unsigned short ushort; /* Sys V compatibility */
+typedef unsigned int uint; /* Sys V compatibility */
+
+typedef uint8_t u_int8_t;
+typedef uint16_t u_int16_t;
+typedef uint32_t u_int32_t;
+typedef uint64_t u_int64_t;
+
+typedef u_int64_t u_quad_t; /* quads */
+typedef int64_t quad_t;
+typedef quad_t * qaddr_t;
+
+typedef char * caddr_t; /* core address */
+typedef __const char * c_caddr_t; /* core address, pointer to const */
+typedef __volatile char *v_caddr_t; /* core address, pointer to volatile */
+typedef u_int32_t fixpt_t; /* fixed point number */
+typedef u_int32_t gid_t; /* group id */
+typedef u_int32_t in_addr_t; /* base type for internet address */
+typedef u_int16_t in_port_t;
+typedef u_int32_t ino_t; /* inode number */
+typedef long key_t; /* IPC key (for Sys V IPC) */
+typedef u_int16_t mode_t; /* permissions */
+typedef u_int16_t nlink_t; /* link count */
+typedef quad_t rlim_t; /* resource limit */
+typedef int32_t segsz_t; /* segment size */
+typedef int32_t swblk_t; /* swap offset */
+typedef int32_t ufs_daddr_t;
+typedef int32_t ufs_time_t;
+typedef u_int32_t uid_t; /* user id */
+
+#endif /* !_SYS_TYPES_H_ */
--- /dev/null
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ; while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" = `pwd` ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+ @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n"
+else
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
--- /dev/null
+# -*- makefile -*-
+
+include_HEADERS = stdio.h unistd.h malloc.h
+
+lib_obj_SOURCES = system_stub.c
--- /dev/null
+/*
+ * Copyright (c) 2001 Dmitry Dicky diwil@eis.ru
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS `AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $Id: stdio.h,v 1.9 2004/01/28 22:25:29 cliechti Exp $
+ */
+
+#ifndef _STDIO_H_
+#define _STDIO_H_
+
+#include <stddef.h>
+#include <sys/types.h>
+
+#ifdef __STDC__
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
+
+
+/* This is declaration of empty variables/functions which should enable
+ compiling of libraries using files. Definitions are in system_stub.c */
+typedef struct {
+} FILE;
+
+extern FILE * stdin;
+extern FILE * stdout;
+
+int fflush(FILE *stream);
+
+
+#ifndef EOF
+# define EOF (-1)
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif //__cplusplus
+
+int __attribute__((format (printf, 2, 3))) uprintf(int (*func)(int c), const char *fmt, ...);
+int __attribute__((format (printf, 3, 4))) snprintf (char *buf, size_t size, const char *fmt, ...);
+int __attribute__((format (printf, 2, 3))) sprintf (char *buf, const char *fmt, ...);
+int __attribute__((format (printf, 1, 2))) printf(const char *string, ...);
+int vuprintf(int (*func)(int c), const char *fmt0, va_list ap);
+int vsnprintf(char *dest, size_t maxlen, const char *string, va_list ap);
+int vsprintf(char *dest, const char *string, va_list ap);
+int vprintf(const char *string, va_list ap);
+
+int puts(const char *s);
+int putchar(int c); //has to be supplied by the user, but avoids useless warnings
+int getchar(); //has to be supplied by the user
+
+#ifdef __cplusplus
+}
+#endif //__cplusplus
+
+#endif
--- /dev/null
+#include <stdio.h>
+#include <unistd.h>
+
+
+FILE * stdin = NULL;
+FILE * stdout = NULL;
+
+
+int write(int fd, const void *buf, int count) {
+ int i;
+
+ for (i = 0; i < count; i++) {
+ putchar(*((char*)buf++));
+ }
+
+ return count;
+}
+
+int read(int fd, void *buf, int count) {
+ int i;
+
+ for (i = 0; i < count; i++) {
+ *((char*)buf + i) = getchar();
+ }
+
+ return count;
+}
+
+int fflush(FILE *stream) {
+ return 0;
+}
+
+
--- /dev/null
+#ifndef UNISTD_H
+#define UNISTD_H
+
+int write(int fd, const void *buf, int count);
+int read(int fd, void *buf, int count);
+
+#endif
+