17 lines
388 B
Makefile
17 lines
388 B
Makefile
OUT=libscomp.a
|
|
TESTS=test/input test/exec
|
|
|
|
$(OUT): input.o exec.o
|
|
$(AR) rcs $(OUT) input.o exec.o
|
|
tests: $(TESTS)
|
|
for i in $(TESTS); do ./$$i -v; done
|
|
|
|
TEST_EXEC=test/exec.o exec.o
|
|
test/exec: $(TEST_EXEC)
|
|
$(CC) -Wall $(TEST_EXEC) -o test/exec
|
|
TEST_INPUT=test/input.o input.o
|
|
test/input: $(TEST_INPUT)
|
|
$(CC) -Wall $(TEST_INPUT) -o test/input
|
|
.c.o:
|
|
$(CC) -g -std=c89 -Wall -c $< -o $@
|