From 3dfc42de7a4c6605313abbfc276f8539e39a6422 Mon Sep 17 00:00:00 2001 From: m8pple Date: Mon, 19 Oct 2015 16:49:51 +0100 Subject: Added support for nested src directories. Closes #2. --- README.md | 5 ++++- makefile | 6 +++++- 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/. +stuff in src/). 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))) -- cgit