diff options
author | David Thomas <m8pple@github.com> | 2016-10-10 06:27:37 +0100 |
---|---|---|
committer | David Thomas <m8pple@github.com> | 2016-10-10 06:27:37 +0100 |
commit | 0673cc3651b60203b90eccdc1c5af5e455f4b6fb (patch) | |
tree | 6c50f8b4387ebda2c647b8e7bd66d60884d1e557 /makefile | |
parent | 969874832d55c00c1c5874ef5ae1fdb82b3ded83 (diff) | |
download | MipsCPU-0673cc3651b60203b90eccdc1c5af5e455f4b6fb.tar.gz MipsCPU-0673cc3651b60203b90eccdc1c5af5e455f4b6fb.zip |
Updated for 2016.
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 51 |
1 files changed, 31 insertions, 20 deletions
@@ -2,34 +2,45 @@ # won't be eie2ugs... LOGIN ?= eie2ugs -CPPFLAGS += -W -Wall -g +# Turn on all warnings +CPPFLAGS += -W -Wall + +# Add debug information +CPPFLAGS += -g + +# Pick up any headers in the ./include directories CPPFLAGS += -I include -CFLAGS += -std=c99 +# C++11 by default CXXFLAGS += -std=c++11 -# Force the inclusion of C++ standard libraries -LDLIBS += -lstdc++ - DEFAULT_OBJECTS = \ - src/shared/mips_test_framework.o \ - src/shared/mips_mem_ram.o + src/shared/mips_test_framework.o \ + src/shared/mips_mem_ram.o 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)/*/*.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))) - -src/$(LOGIN)/test_mips : $(DEFAULT_OBJECTS) $(USER_CPU_OBJECTS) + $(wildcard src/$(LOGIN)/mips_cpu.cpp) \ + $(wildcard src/$(LOGIN)/mips_cpu_*.cpp) \ + $(wildcard src/$(LOGIN)/mips_cpu/*.cpp) + +USER_TEST_SRCS = \ + $(wildcard src/$(LOGIN)/test_mips.cpp) \ + $(wildcard src/$(LOGIN)/test_mips_*.cpp) \ + $(wildcard src/$(LOGIN)/test_mips/*.cpp) + +USER_CPU_OBJECTS = $(patsubst %.cpp,%.o,$(USER_CPU_SRCS)) +USER_TEST_OBJECTS = $(patsubst %.cpp,%.o,$(USER_TEST_SRCS)) + +src/$(LOGIN)/test_mips : $(DEFAULT_OBJECTS) $(USER_CPU_OBJECTS) $(USER_TEST_OBJECTS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ $(LFLAGS) $(LDLIBS) + fragments/run_fibonacci : $(DEFAULT_OBJECTS) $(USER_CPU_OBJECTS) - + fragments/run_addu : $(DEFAULT_OBJECTS) $(USER_CPU_OBJECTS) +clean : + -rm src/$(LOGIN)/test_mips + -rm $(DEFAULT_OBJECTS) $(USER_CPU_OBJECTS) $(USER_TEST_OBJECTS) + +all : src/$(LOGIN)/test_mips |