diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2009-09-20 23:10:31 +0200 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2009-09-20 23:10:31 +0200 |
commit | 1f7ca9fd3964481318bbaddfb39acc5de8c7d65d (patch) | |
tree | f13ae2ddd03c23d81157b86bf9305de36a5ace60 /Utils | |
parent | eb3bf203a14e81735d6f74467541a6500a3bdf86 (diff) |
Basic makefile structure; making the project at least compilable.
Diffstat (limited to 'Utils')
-rw-r--r-- | Utils/Makefile | 13 | ||||
-rw-r--r-- | Utils/allocator.h | 13 | ||||
-rw-r--r-- | Utils/log.cpp | 0 | ||||
-rw-r--r-- | Utils/log.h | 8 |
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 |