From 3456d6517e549df76a299ef987b1389d74b8aa10 Mon Sep 17 00:00:00 2001 From: Tom Everett Date: Sat, 19 Mar 2016 18:55:32 -0600 Subject: [PATCH] makefile updates --- Makefile | 27 ++------------------------- build/Makefile | 29 +++++++++++++++++++++++++++-- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/Makefile b/Makefile index 0913396..1c2ba34 100644 --- a/Makefile +++ b/Makefile @@ -1,31 +1,8 @@ -# Top level makefile to build the tests and everything else -AS=tools/as7 -ASARGS=--format=ptr -TESTDIR=tests -all: buildit testit +all: buildit buildit: - cd build && make - -runsh: all - cd bin && ../tools/a7out sh - -testit: - mkdir -p $(TESTDIR) - $(AS) $(ASARGS) -o $(TESTDIR)/decimal_out src/tests/decimal_out.s - $(AS) $(ASARGS) -o $(TESTDIR)/fork_test src/tests/fork_test.s - $(AS) $(ASARGS) -o $(TESTDIR)/octal_test src/tests/octal_test.s - $(AS) $(ASARGS) -o $(TESTDIR)/testmul src/tests/testmul.s - $(AS) $(ASARGS) -o $(TESTDIR)/write_test src/tests/write_test.s - -runtests: tests - cd tests && ../tools/a7out decimal_out - cd tests && ../tools/a7out fork_test - cd tests && ../tools/a7out octal_test -# cd tests && ../tools/a7out testmul -# cd tests && ../tools/a7out write_test + cd build && make all clean: - rm -rf $(TESTDIR)/* cd build && make clean diff --git a/build/Makefile b/build/Makefile index 0d31b31..288e0f3 100644 --- a/build/Makefile +++ b/build/Makefile @@ -3,11 +3,15 @@ AS=../tools/as7 ASARGS=--format=ptr MKFS=../tools/mkfs7 +A7OUT=../tools/a7out +FSCK=../tools/fsck7 SYSSRC=../src/sys CMDSRC=../src/cmd OTHERSRC=../src/other +TESTSRC=../src/tests BINDIR=../bin +TESTDIR=../tests all: cmd others a.rim image.fs @@ -25,12 +29,16 @@ coldboot: image.fs: $(MKFS) --format simh proto - + $(FSCK) image.fs + clean: - rm -f a.rim image.fs a.lst n.out $(BINDIR)/* + rm -f a.rim image.fs a.lst n.out + rm -rf $(BINDIR) + rm -rr $(TESTDIR) dirs: mkdir -p $(BINDIR) + mkdir -p $(TESTDIR) cmd: dirs # $(AS) $(ASARGS) -o $(BINDIR)/adm $(CMDSRC)/adm.s @@ -66,3 +74,20 @@ others: dirs $(AS) $(ASARGS) -o $(BINDIR)/ls $(OTHERSRC)/wktls.s $(AS) $(ASARGS) -o $(BINDIR)/mv $(OTHERSRC)/wktmv.s $(AS) $(ASARGS) -o $(BINDIR)/stat $(OTHERSRC)/wktstat.s + +testit: + mkdir -p $(TESTDIR) + $(AS) $(ASARGS) -o $(TESTDIR)/decimal_out $(TESTSRC)/decimal_out.s + $(AS) $(ASARGS) -o $(TESTDIR)/fork_test $(TESTSRC)/fork_test.s + $(AS) $(ASARGS) -o $(TESTDIR)/octal_test $(TESTSRC)/octal_test.s + $(AS) $(ASARGS) -o $(TESTDIR)/testmul $(TESTSRC)/testmul.s + $(AS) $(ASARGS) -o $(TESTDIR)/write_test $(TESTSRC)/write_test.s + +runtests: tests + cd $(TESTDIR) && $(A7OUT) decimal_out + cd $(TESTDIR) && $(A7OUT) fork_test + cd $(TESTDIR) && $(A7OUT) octal_test +# cd $(TESTDIR) && $(A7OUT) testmul +# cd $(TESTDIR) && $(A7OUT) write_test + +