mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-26 00:16:28 +08:00
feat(code/c): add c code Makefile compile method
This commit is contained in:
parent
2a1b479002
commit
cbbb7d34b2
1 changed files with 15 additions and 0 deletions
15
codes/c/Makefile
Normal file
15
codes/c/Makefile
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
CXXFLAGS = # -Wall -Werror
|
||||||
|
LDFLAGS =
|
||||||
|
|
||||||
|
src = $(wildcard ./*/*.c)
|
||||||
|
target = $(patsubst %.c, %, ${src})
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
|
|
||||||
|
%:%.cpp
|
||||||
|
$(CXX) ${CXXFLAGS} ${LDFLAGS} $^ -o $@
|
||||||
|
|
||||||
|
all: ${target}
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f ${target}
|
Loading…
Reference in a new issue