From 6720dfdc95246f85aeb1e867e0105d4eb43ad759 Mon Sep 17 00:00:00 2001
From: Jeremy Soller <jeremy@system76.com>
Date: Sun, 9 Dec 2018 11:26:46 -0700
Subject: [PATCH] Add makefile and include osal and types

---
 Makefile    | 10 ++++++++++
 pte_osal.h  | 21 +++++++++++++++++++++
 pte_types.h |  8 ++++++++
 3 files changed, 39 insertions(+)
 create mode 100644 Makefile
 create mode 100644 pte_osal.h
 create mode 100644 pte_types.h

diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..63e56d8
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,10 @@
+SRC=$(wildcard *.c)
+OBJ=$(patsubst %.c,%.o,$(SRC))
+
+all: libpthread.a
+
+libpthread.a: $(OBJ)
+	$(AR) -rcs $@ $(OBJ)
+
+%.o: %.c
+	$(CC) $(CFLAGS) -I . -c $< -o $@
diff --git a/pte_osal.h b/pte_osal.h
new file mode 100644
index 0000000..d5cfe3b
--- /dev/null
+++ b/pte_osal.h
@@ -0,0 +1,21 @@
+#ifndef _OS_SUPPORT_H_
+#define _OS_SUPPORT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+
+#include <sys/types.h>
+
+// XXX
+typedef unsigned long pte_osThreadHandle;
+typedef unsigned long pte_osSemaphoreHandle;
+typedef int32_t* pte_osMutexHandle;
+
+#include <pte_generic_osal.h>
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+
+#endif // _OS_SUPPORT_H
diff --git a/pte_types.h b/pte_types.h
new file mode 100644
index 0000000..cfa46e9
--- /dev/null
+++ b/pte_types.h
@@ -0,0 +1,8 @@
+#ifndef PTE_TYPES_H
+#define PTE_TYPES_H
+
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/timeb.h>
+
+#endif /* PTE_TYPES_H */
-- 
GitLab