feat(code/c): add c code Makefile compile method

This commit is contained in:
Gonglja 2023-01-12 20:44:17 +08:00
parent 2a1b479002
commit cbbb7d34b2

15
codes/c/Makefile Normal file
View 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}