summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 149d7ca)
raw | patch | inline | side by side (parent: 149d7ca)
author | Gert van Valkenhoef <g.h.m.van.valkenhoef@rug.nl> | |
Tue, 15 Nov 2011 14:47:40 +0000 (14:47 +0000) | ||
committer | Gert van Valkenhoef <g.h.m.van.valkenhoef@rug.nl> | |
Tue, 15 Nov 2011 15:08:09 +0000 (15:08 +0000) |
22 files changed:
Makefile | patch | blob | history | |
alien/Make.inc | [new file with mode: 0644] | patch | blob |
alien/alien.cc | [moved from alien.cc with 100% similarity] | patch | blob | history |
alien/alien.h | [moved from alien.h with 100% similarity] | patch | blob | history |
fold/Make.inc | [new file with mode: 0644] | patch | blob |
fold/fold.cc | [moved from fold.cc with 100% similarity] | patch | blob | history |
fold/fold.h | [moved from fold.h with 100% similarity] | patch | blob | history |
reader/Make.inc | [new file with mode: 0644] | patch | blob |
reader/oberon.h | [moved from oberon.h with 100% similarity] | patch | blob | history |
reader/reader.cc | [moved from reader.cc with 100% similarity] | patch | blob | history |
reader/reader.h | [moved from reader.h with 100% similarity] | patch | blob | history |
reader/util.cc | [moved from util.cc with 100% similarity] | patch | blob | history |
store/Make.inc | [new file with mode: 0644] | patch | blob |
store/store.cc | [moved from store.cc with 100% similarity] | patch | blob | history |
store/store.h | [moved from store.h with 100% similarity] | patch | blob | history |
textmodel/Make.inc | [new file with mode: 0644] | patch | blob |
textmodel/textmodel.cc | [moved from textmodel.cc with 100% similarity] | patch | blob | history |
textmodel/textmodel.h | [moved from textmodel.h with 100% similarity] | patch | blob | history |
typeregister/Make.inc | [new file with mode: 0644] | patch | blob |
typeregister/typeregister.cc | [moved from typeregister.cc with 100% similarity] | patch | blob | history |
typeregister/typeregister.h | [moved from typeregister.h with 100% similarity] | patch | blob | history |
visitor/visitor.h | [moved from visitor.h with 100% similarity] | patch | blob | history |
diff --git a/Makefile b/Makefile
index 441faf9a7e82cf364d1f069d029307221b7bbdba..94be64aa62d6a2830bc12d153a9f158d43aeafb6 100644 (file)
--- a/Makefile
+++ b/Makefile
-# List all source files to be compiled
-SRCS=odcread.cc reader.cc store.cc util.cc alien.cc typeregister.cc \
- textmodel.cc fold.cc
+MODULES := reader store alien typeregister textmodel fold
+
+# Add module directories to the include path
+CFLAGS += -I. $(patsubst %,-I%,$(MODULES))
+
+# Variables for the modules to write to
+SRCS := odcread.cc
+
+# Include module definitions
+include $(patsubst %,%/Make.inc,$(MODULES))
# This rule just links the object files together
odcread: $(SRCS:.cc=.o)
# The .d file is not an explicit target because it will need to be (re-)built
# if and only if the .o needs to be rebuilt.
%.o: %.cc
- g++ -I. $< -MM -MF $*.d -MP -MT $@
- g++ -I. $< -c -o $@
+ g++ $(CFLAGS) $< -MM -MF $*.d -MP -MT $@
+ g++ $(CFLAGS) $< -c -o $@
clean:
- rm -f odcread *.d *.o
+ rm -f odcread *.d *.o */*.o */*.d
# Include the generated dependency files (if they exist)
-include $(SRCS:.cc=.d)
diff --git a/alien/Make.inc b/alien/Make.inc
--- /dev/null
+++ b/alien/Make.inc
@@ -0,0 +1 @@
+SRCS += alien/alien.cc
diff --git a/alien.cc b/alien/alien.cc
diff --git a/alien.h b/alien/alien.h
diff --git a/fold/Make.inc b/fold/Make.inc
--- /dev/null
+++ b/fold/Make.inc
@@ -0,0 +1 @@
+SRCS += fold/fold.cc
diff --git a/fold.cc b/fold/fold.cc
diff --git a/fold.h b/fold/fold.h
diff --git a/reader/Make.inc b/reader/Make.inc
--- /dev/null
+++ b/reader/Make.inc
@@ -0,0 +1 @@
+SRCS += reader/reader.cc reader/util.cc
diff --git a/oberon.h b/reader/oberon.h
diff --git a/reader.cc b/reader/reader.cc
diff --git a/reader.h b/reader/reader.h
diff --git a/util.cc b/reader/util.cc
diff --git a/store/Make.inc b/store/Make.inc
--- /dev/null
+++ b/store/Make.inc
@@ -0,0 +1 @@
+SRCS += store/store.cc
diff --git a/store.cc b/store/store.cc
diff --git a/store.h b/store/store.h
diff --git a/textmodel/Make.inc b/textmodel/Make.inc
--- /dev/null
+++ b/textmodel/Make.inc
@@ -0,0 +1 @@
+SRCS += textmodel/textmodel.cc
diff --git a/textmodel.cc b/textmodel/textmodel.cc
diff --git a/textmodel.h b/textmodel/textmodel.h
diff --git a/typeregister/Make.inc b/typeregister/Make.inc
--- /dev/null
+++ b/typeregister/Make.inc
@@ -0,0 +1 @@
+SRCS += typeregister/typeregister.cc
diff --git a/typeregister.cc b/typeregister/typeregister.cc
diff --git a/typeregister.h b/typeregister/typeregister.h
diff --git a/visitor.h b/visitor/visitor.h