summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.doxygen2
-rw-r--r--Makefile39
-rw-r--r--example/test.cpp (renamed from test.cpp)0
-rw-r--r--example/test_old.cpp (renamed from test_old.cpp)0
-rw-r--r--src/cInput.cpp (renamed from cInput.cpp)0
-rw-r--r--src/cInput.h (renamed from cInput.h)0
-rw-r--r--src/cObject.cpp (renamed from cObject.cpp)0
-rw-r--r--src/cObject.h (renamed from cObject.h)0
-rw-r--r--src/cObjectHandler.cpp (renamed from cObjectHandler.cpp)0
-rw-r--r--src/cObjectHandler.h (renamed from cObjectHandler.h)0
-rw-r--r--src/cRender.cpp (renamed from cRender.cpp)0
-rw-r--r--src/cRender.h (renamed from cRender.h)0
-rw-r--r--src/cWiremesh.cpp (renamed from cWiremesh.cpp)0
-rw-r--r--src/cWiremesh.h (renamed from cWiremesh.h)0
14 files changed, 24 insertions, 17 deletions
diff --git a/.doxygen b/.doxygen
index 529e3fa..64bccfe 100644
--- a/.doxygen
+++ b/.doxygen
@@ -112,7 +112,7 @@ WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
#---------------------------------------------------------------------------
-INPUT = .
+INPUT = ./src
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.c \
*.cc \
diff --git a/Makefile b/Makefile
index ee0f6d2..0fec7c2 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,7 @@ DEBUGFLAGS = -Wall -g -std=c++11
LDFLAGS =
SONAME = engine
BUILDDIR = build
+SOURCEDIR = src
#VERSION
VERSION = 0
PATCHLEVEL = 4
@@ -11,22 +12,28 @@ OUTPUT = lib$(SONAME).so.$(VERSION).$(PATCHLEVEL)
OBJ = cObject.o cObjectHandler.o cRender.o cInput.o cWiremesh.o
-build: genversion $(OBJ)
- mkdir -p $(BUILDDIR)
- mkdir -p $(BUILDDIR)/lib
- mkdir -p $(BUILDDIR)/inc
+build: dir genversion $(OBJ)
$(CC) $(CFLAGS) -o $(BUILDDIR)/lib/$(OUTPUT) $(OBJ) $(LDFLAGS) -Wl,-soname=lib$(SONAME).so.$(VERSION)
ln -sf $(OUTPUT) $(BUILDDIR)/lib/lib$(SONAME).so.$(VERSION)
ln -sf $(OUTPUT) $(BUILDDIR)/lib/lib$(SONAME).so
- cp c*.h $(BUILDDIR)/inc
- cp version.h $(BUILDDIR)/inc
+ cp src/c*.h $(BUILDDIR)/inc
+ cp src/version.h $(BUILDDIR)/inc
+
+dir:
+ mkdir -p $(BUILDDIR)
+ mkdir -p $(BUILDDIR)/lib
+ mkdir -p $(BUILDDIR)/inc
+
-%.o: %.cpp
+%.o: $(SOURCEDIR)/%.cpp
@echo
@echo Building $<
@echo ==============
@echo
$(CC) $(CFLAGS) -c $<
+
+%.o: example/%.cpp
+ $(CC) $(CFLAGS) -I$(SOURCEDIR) -c $<
all: clean build
@@ -34,7 +41,7 @@ all: clean build
.PHONY: clean
clean:
- rm -df $(OBJ) test.o version.h
+ rm -df $(OBJ) test.o src/version.h
rm -Rdf $(BUILDDIR)/lib $(BUILDDIR)/inc $(BUILDDIR)/test doc/
run: gentest
@@ -45,15 +52,15 @@ memleak: gentest
genversion:
@echo Building Version
- @echo "//Generated by MAKEFILE. DO NOT Edit." > version.h
- @echo "#pragma once" >> version.h
- @echo "#define VERSION $(VERSION)" >> version.h
- @echo "#define PATCHLEVEL $(PATCHLEVEL)" >> version.h
- @echo "#define VERSTRING \"`git describe`\"" >> version.h
- @echo "#define DATE \"`date +'%d.%m.20%y'`\"" >> version.h
- @echo "#define TIME \"`date +'%H:%M:%S'`\"" >> version.h
+ @echo "//Generated by MAKEFILE. DO NOT Edit." > src/version.h
+ @echo "#pragma once" >> src/version.h
+ @echo "#define VERSION $(VERSION)" >> src/version.h
+ @echo "#define PATCHLEVEL $(PATCHLEVEL)" >> src/version.h
+ @echo "#define VERSTRING \"`git describe`\"" >> src/version.h
+ @echo "#define DATE \"`date +'%d.%m.20%y'`\"" >> src/version.h
+ @echo "#define TIME \"`date +'%H:%M:%S'`\"" >> src/version.h
-gentest: genversion test.o $(OBJ)
+gentest: build test.o
mkdir -p $(BUILDDIR)/test
$(CC) $(DEBUGFLAGS) -o $(BUILDDIR)/test/test test.o $(OBJ) $(LDFLAGS)
diff --git a/test.cpp b/example/test.cpp
index b09e6ec..b09e6ec 100644
--- a/test.cpp
+++ b/example/test.cpp
diff --git a/test_old.cpp b/example/test_old.cpp
index 313b632..313b632 100644
--- a/test_old.cpp
+++ b/example/test_old.cpp
diff --git a/cInput.cpp b/src/cInput.cpp
index 6384c91..6384c91 100644
--- a/cInput.cpp
+++ b/src/cInput.cpp
diff --git a/cInput.h b/src/cInput.h
index 00ddb7d..00ddb7d 100644
--- a/cInput.h
+++ b/src/cInput.h
diff --git a/cObject.cpp b/src/cObject.cpp
index 7dc194c..7dc194c 100644
--- a/cObject.cpp
+++ b/src/cObject.cpp
diff --git a/cObject.h b/src/cObject.h
index 50b9d18..50b9d18 100644
--- a/cObject.h
+++ b/src/cObject.h
diff --git a/cObjectHandler.cpp b/src/cObjectHandler.cpp
index 11c02e6..11c02e6 100644
--- a/cObjectHandler.cpp
+++ b/src/cObjectHandler.cpp
diff --git a/cObjectHandler.h b/src/cObjectHandler.h
index 4a0306b..4a0306b 100644
--- a/cObjectHandler.h
+++ b/src/cObjectHandler.h
diff --git a/cRender.cpp b/src/cRender.cpp
index 9fbdc8f..9fbdc8f 100644
--- a/cRender.cpp
+++ b/src/cRender.cpp
diff --git a/cRender.h b/src/cRender.h
index 415db6e..415db6e 100644
--- a/cRender.h
+++ b/src/cRender.h
diff --git a/cWiremesh.cpp b/src/cWiremesh.cpp
index 62fee0d..62fee0d 100644
--- a/cWiremesh.cpp
+++ b/src/cWiremesh.cpp
diff --git a/cWiremesh.h b/src/cWiremesh.h
index 82d3bd6..82d3bd6 100644
--- a/cWiremesh.h
+++ b/src/cWiremesh.h