libscomp/Makefile

19 lines
422 B
Makefile
Raw Normal View History

2021-07-31 20:39:04 -04:00
OUT=libscomp.a
2021-07-30 23:57:22 -04:00
TESTS=test/input test/exec
2021-07-10 15:10:00 -04:00
2021-07-31 20:39:04 -04:00
$(OUT): input.o exec.o
$(AR) rcs $(OUT) input.o exec.o
2021-07-10 15:10:00 -04:00
tests: $(TESTS)
2021-07-10 15:43:39 -04:00
for i in $(TESTS); do ./$$i -v; done
2021-07-10 15:10:00 -04:00
2021-07-30 23:57:22 -04:00
TEST_EXEC=test/exec.o exec.o
test/exec: $(TEST_EXEC)
$(CC) -Wall $(TEST_EXEC) -o test/exec
2021-07-10 15:10:00 -04:00
TEST_INPUT=test/input.o input.o
test/input: $(TEST_INPUT)
$(CC) -Wall $(TEST_INPUT) -o test/input
.c.o:
2021-07-30 23:57:22 -04:00
$(CC) -g -std=c89 -Wall -c $< -o $@
2021-07-31 20:42:30 -04:00
clean:
$(RM) $(TESTS) $(OUT) *.o