summaryrefslogtreecommitdiff
path: root/Utils
diff options
context:
space:
mode:
Diffstat (limited to 'Utils')
-rw-r--r--Utils/Makefile13
-rw-r--r--Utils/allocator.h13
-rw-r--r--Utils/log.cpp0
-rw-r--r--Utils/log.h8
4 files changed, 34 insertions, 0 deletions
diff --git a/Utils/Makefile b/Utils/Makefile
new file mode 100644
index 0000000..1b001a8
--- /dev/null
+++ b/Utils/Makefile
@@ -0,0 +1,13 @@
+TARGET = Utils.a
+
+SRCS = \
+log.cpp \
+
+CPPFLAGS = -I.
+
+include ../Makefile.cfg
+
+$(TARGET): $(OBJS)
+ $(AR) $@ $^
+
+-include $(DEPS)
diff --git a/Utils/allocator.h b/Utils/allocator.h
new file mode 100644
index 0000000..8b0fdb6
--- /dev/null
+++ b/Utils/allocator.h
@@ -0,0 +1,13 @@
+#ifndef __ALLOCATOR_H__
+#define __ALLOCATOR_H__
+
+#include <stdlib.h>
+
+template<class T>
+class Allocator {
+ public:
+ static T * alloc(int n) { return (T*) calloc(n, sizeof(T)); };
+ static void free(T * & ptr) { free(ptr); ptr = 0; }
+};
+
+#endif
diff --git a/Utils/log.cpp b/Utils/log.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Utils/log.cpp
diff --git a/Utils/log.h b/Utils/log.h
new file mode 100644
index 0000000..33b03d7
--- /dev/null
+++ b/Utils/log.h
@@ -0,0 +1,8 @@
+#ifndef __LOG_H__
+#define __LOG_H__
+
+#define LOG(...)
+#define CONSOLE
+#define ERROR
+
+#endif