Infinity Calculator implementation for Assignment 2 in Computer Organization.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

37 lines
674 B

objs = main.o token.o expr.o parse.o infint.o eval.o
CC = gcc
release: FLAGS= -O2
release: clean build
rm *.o
dev: FLAGS= -g -D UNIT_TESTS
dev: build
valgrind ./infcalc
build: $(objs)
$(CC) $(FLAGS) -o infcalc $(objs)
clean:
touch foo.o
touch infcalc
rm *.o infcalc
main.o: main.c expr.h
$(CC) $(FLAGS) -c main.c -o main.o
token.o: token.c token.h
$(CC) $(FLAGS) -c token.c -o token.o
expr.o: expr.c expr.h
$(CC) $(FLAGS) -c expr.c -o expr.o
parse.o: parse.c parse.h token.h expr.h
$(CC) $(FLAGS) -c parse.c -o parse.o
infint.o: infint*.c
$(CC) $(FLAGS) -c infint.c -o infint.o
eval.o: eval.c eval.h expr.h infint.h
$(CC) $(FLAGS) -c eval.c -o eval.o