From 8162253d751a8b2037757f0ef6139f93ef6cef0d Mon Sep 17 00:00:00 2001 From: eug-vs Date: Tue, 8 Jun 2021 15:20:19 +0300 Subject: chore: setup Makefile --- Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..10e7c66 --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +CC=tcc +SRC=src +OBJ=obj +SOURCES=$(wildcard $(SRC)/*.c) +OBJECTS=$(patsubst $(SRC)/%.c, $(OBJ)/%.o, $(SOURCES)) +BIN=main + + +$(BIN): $(OBJECTS) + $(CC) $(OBJECTS) -o $(BIN) + +$(OBJ)/%.o: $(SRC)/%.c + $(CC) -c $< -o $@ + +clean: + rm -r $(BIN) $(OBJ)/*.o + -- cgit v1.2.3