aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorm8pple <dt10@imperial.ac.uk>2015-10-19 16:49:51 +0100
committerm8pple <dt10@imperial.ac.uk>2015-10-19 16:49:51 +0100
commit3dfc42de7a4c6605313abbfc276f8539e39a6422 (patch)
tree1245b075261fb7993e5acf2a3882701848b3d798
parentdae28f43f291090bc784384b345514a7edcc0b0e (diff)
downloadMipsCPU-3dfc42de7a4c6605313abbfc276f8539e39a6422.tar.gz
MipsCPU-3dfc42de7a4c6605313abbfc276f8539e39a6422.zip
Added support for nested src directories. Closes #2.
-rw-r--r--README.md5
-rw-r--r--makefile6
2 files changed, 9 insertions, 2 deletions
diff --git a/README.md b/README.md
index 322996b..c71ea9e 100644
--- a/README.md
+++ b/README.md
@@ -65,6 +65,9 @@ that matches the pattern `src/[your_login]/test_mips_*.c` or
`src/[your_login]/test_mips_*.cpp` will get compiled into
your program.
+Update: by request, I will also include c or C++ files in
+directories matching `src/[your_login]/*`. See issue #2.
+
You can also add your own private header files (generally
a good idea), which should be part of the submitted zip file,
but they don't need to follow any specific pattern. However,
@@ -119,7 +122,7 @@ with it. The given structure allows me to know exactly what
your code needs in order to compile (I need to tell the compiler
which source files to link together), and when I want to move
implementations around I need to know what is important (so
-stuff in src/<your_login>.
+stuff in src/<your_login>).
Assessment criteria
-------------------
diff --git a/makefile b/makefile
index d1aec94..d00ca10 100644
--- a/makefile
+++ b/makefile
@@ -19,7 +19,11 @@ USER_CPU_SRCS = \
$(wildcard src/$(LOGIN)/mips_cpu.c) \
$(wildcard src/$(LOGIN)/mips_cpu.cpp) \
$(wildcard src/$(LOGIN)/mips_cpu_*.c) \
- $(wildcard src/$(LOGIN)/mips_cpu_*.cpp)
+ $(wildcard src/$(LOGIN)/mips_cpu_*.cpp) \
+ $(wildcard src/$(LOGIN)/*/*.c) \
+ $(wildcard src/$(LOGIN)/*/*.cpp) \
+ $(wildcard src/$(LOGIN)/*/*.c) \
+ $(wildcard src/$(LOGIN)/*/*.cpp)
USER_CPU_OBJECTS = $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(USER_CPU_SRCS)))