diff options
Diffstat (limited to 'Makefile')
-rwxr-xr-x | Makefile | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100755 index 0000000..94e43d6 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +CC=tcc +CFLAGS=-g +SRC=src +OBJ=obj +SOURCES=$(wildcard $(SRC)/*.c) +OBJECTS=$(patsubst $(SRC)/%.c, $(OBJ)/%.o, $(SOURCES)) +BIN=main + + +run: $(BIN) + ./$(BIN) + +build: $(BIN) + +$(BIN): $(OBJECTS) + $(CC) $(CFLAGS) $(OBJECTS) -o $(BIN) + +$(OBJ)/%.o: $(SRC)/%.c $(SRC)/*.h + $(CC) -c $< -o $@ + +clean: + rm -r $(BIN) $(OBJ)/*.o + |