19 lines
422 B
Makefile
19 lines
422 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 $@
|
|
clean:
|
|
$(RM) $(TESTS) $(OUT) *.o
|