Makefile: Add 'tests' target, depend on headers too to rebuild on changes of those
这个提交包含在:
父节点
6f19c53acf
当前提交
c57ba807d7
10
Makefile
10
Makefile
@ -3,19 +3,21 @@ bindir = $(prefix)/bin
|
||||
CFLAGS = -std=c99 -Wall -Wextra -pedantic
|
||||
CXXFLAGS = -std=c++20 -Wall -Wextra -pedantic
|
||||
|
||||
.DEFAULT_GOAL := test
|
||||
.DEFAULT_GOAL := tests
|
||||
|
||||
|
||||
clean:
|
||||
rm -f test testcpp
|
||||
|
||||
test: test.c
|
||||
test: test.c exile.h
|
||||
$(CC) test.c -g $(CFLAGS) -o test
|
||||
|
||||
testcpp: test.cpp
|
||||
testcpp: test.cpp exile.h exile.hpp
|
||||
$(CXX) test.cpp -g $(CXXFLAGS) -o testcpp
|
||||
|
||||
check: test
|
||||
tests: test testcpp
|
||||
|
||||
check: tests
|
||||
./test.sh
|
||||
|
||||
.PHONY: check
|
||||
|
正在加载...
在新工单中引用
屏蔽一个用户