Homework 07: Initial Import
This commit is contained in:
parent
1432c00d54
commit
1a1cb9f122
8 changed files with 482 additions and 0 deletions
66
homework07/Makefile
Normal file
66
homework07/Makefile
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
CC= gcc
|
||||
CFLAGS= -Wall -g -std=gnu99
|
||||
LD= gcc
|
||||
LDFLAGS= -L.
|
||||
TARGETS= seqit tailit
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
#--------------------------------------------------------------------------------
|
||||
# TODO: Add rules for node.o, list.o, seqit.o, tailit.o, seqit, tailit
|
||||
#--------------------------------------------------------------------------------
|
||||
|
||||
node.o:
|
||||
|
||||
list.o:
|
||||
|
||||
seqit.o:
|
||||
|
||||
tailit.o:
|
||||
|
||||
seqit:
|
||||
|
||||
tailit:
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# DO NOT MODIFY BELOW
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
test:
|
||||
@$(MAKE) -sk test-all
|
||||
|
||||
test-all: test-gitignore test-node test-list test-seqit test-tailit
|
||||
|
||||
test-gitignore:
|
||||
@echo "*.o" >> .gitignore
|
||||
@echo "*.sh" >> .gitignore
|
||||
@echo "*.unit" >> .gitignore
|
||||
|
||||
node.unit: node.unit.c node.o
|
||||
$(LD) $(LDFLAGS) -o node.unit node.unit.c node.o
|
||||
|
||||
test-node: node.unit
|
||||
@curl -sLO https://www3.nd.edu/~pbui/teaching/cse.20289.sp25/static/txt/homework07/node.unit.sh
|
||||
@chmod +x node.unit.sh
|
||||
@./node.unit.sh
|
||||
|
||||
list.unit: list.unit.c node.o list.o
|
||||
$(LD) $(LDFLAGS) -o list.unit list.unit.c node.o list.o
|
||||
|
||||
test-list: list.unit
|
||||
@curl -sLO https://www3.nd.edu/~pbui/teaching/cse.20289.sp25/static/txt/homework07/list.unit.sh
|
||||
@chmod +x list.unit.sh
|
||||
@./list.unit.sh
|
||||
|
||||
test-seqit: seqit
|
||||
@curl -sLO https://www3.nd.edu/~pbui/teaching/cse.20289.sp25/static/txt/homework07/seqit.test.sh
|
||||
@chmod +x seqit.test.sh
|
||||
@./seqit.test.sh
|
||||
|
||||
test-tailit: tailit
|
||||
@curl -sLO https://www3.nd.edu/~pbui/teaching/cse.20289.sp25/static/txt/homework07/tailit.test.sh
|
||||
@chmod +x tailit.test.sh
|
||||
@./tailit.test.sh
|
||||
|
||||
clean:
|
||||
@rm -f *.o *.unit *.unit.sh *.test.sh seqit tailit
|
||||
Loading…
Reference in a new issue