Ytshih/hw2

This commit is contained in:
Yi-Ting Shih
2024-11-02 07:58:12 +08:00
parent 549bc9bcdc
commit 4912fe4736
24 changed files with 752 additions and 4283 deletions

View File

@@ -113,7 +113,7 @@ ifeq ($(hosttype),unknown)
PROGRAMS = unknownhost
else
# change this if you create a new test program!
PROGRAMS = add halt consoleIO_test1 consoleIO_test2 fileIO_test1 fileIO_test2
PROGRAMS = add halt consoleIO_test1 consoleIO_test2 fileIO_test1 fileIO_test2 test
# PROGRAMS = halt
endif
@@ -189,6 +189,11 @@ fileIO_test3: fileIO_test3.o start.o
$(LD) $(LDFLAGS) start.o fileIO_test3.o -o fileIO_test3.coff
$(COFF2NOFF) fileIO_test3.coff fileIO_test3
test.o: test.c
$(CC) $(CFLAGS) -c test.c
test: test.o start.o
$(LD) $(LDFLAGS) start.o test.o -o test.coff
$(COFF2NOFF) test.coff test
clean:
$(RM) -f *.o *.ii
@@ -198,10 +203,11 @@ distclean: clean
$(RM) -f $(PROGRAMS)
run: $(PROGRAMS)
for i in $(PROGRAMS); do \
echo ===== $$i =====; \
$(NACHOS) -e $$i; \
done
timeout 1 $(NACHOS) -e consoleIO_test1 -e consoleIO_test2
echo 'done'
debug: $(PROGRAMS)
timeout 1 $(NACHOS) -e consoleIO_test1 -e consoleIO_test2 -d +
unknownhost: