Skip to content

Commit

Permalink
Added option to generate nasm code and build/test for part 27
Browse files Browse the repository at this point in the history
  • Loading branch information
the-grue committed Dec 29, 2022
1 parent 25162d8 commit 55c55e0
Show file tree
Hide file tree
Showing 3 changed files with 771 additions and 2 deletions.
13 changes: 11 additions & 2 deletions 27_Testing_Errors/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,30 @@ HSRCS= data.h decl.h defs.h
SRCS= cg.c decl.c expr.c gen.c main.c misc.c \
scan.c stmt.c sym.c tree.c types.c

ARMSRCS= cg.c decl.c expr.c gen.c main.c misc.c \
SRCN= cgn.c decl.c expr.c gen.c main.c misc.c \
scan.c stmt.c sym.c tree.c types.c

ARMSRCS= cg_arm.c decl.c expr.c gen.c main.c misc.c \
scan.c stmt.c sym.c tree.c types.c

comp1: $(SRCS) $(HSRCS)
cc -o comp1 -g -Wall $(SRCS)

compn: $(SRCN) $(HSRCS)
cc -o compn -g -Wall $(SRCN)

comp1arm: $(ARMSRCS) $(HSRCS)
cc -o comp1arm -g -Wall $(ARMSRCS)
cp comp1arm comp1

clean:
rm -f comp1 comp1arm *.o *.s out
rm -f comp1 comp1arm compn *.o *.s out

test: comp1 tests/runtests
(cd tests; chmod +x runtests; ./runtests)

armtest: comp1arm tests/runtests
(cd tests; chmod +x runtests; ./runtests)

testn: compn tests/runtestsn
(cd tests; chmod +x runtestsn; ./runtestsn)
Loading

0 comments on commit 55c55e0

Please sign in to comment.