csci4061/p1-code/Makefile
Michael Zhang 041f660ccd
f
2018-01-29 17:28:37 -06:00

35 lines
653 B
Makefile

CFLAGS = -Wall -g
CC = gcc
commando: commando.o cmd.o cmdctl.o util.o
$(CC) $(CFLAGS) -o commando $^
commando.o: commando.c commando.h
$(CC) $(CFLAGS) -c $<
cmd.o: cmd.c commando.h
$(CC) $(CFLAGS) -c $<
cmdctl.o: cmdctl.c commando.h
$(CC) $(CFLAGS) -c $<
util.o: util.c commando.h
$(CC) $(CFLAGS) -c $<
clean:
rm -f *.o actual.txt expect.txt valgrind.txt
binary_tests.o : binary_tests.c commando.h tests.h
$(CC) -c $<
test_utils.o : test_utils.c tests.h
$(CC) -c $<
binary_tests : binary_tests.o cmd.o cmdctl.o test_utils.o
$(CC) -o $@ $^
test-binary : binary_tests
valgrind ./binary_tests
test-shell : commando
./shell_tests.sh