diff options
| author | Wayne-Cole <77279425+Wacky404@users.noreply.github.com> | 2026-04-24 13:50:50 -0500 |
|---|---|---|
| committer | Wayne-Cole <77279425+Wacky404@users.noreply.github.com> | 2026-04-24 13:50:50 -0500 |
| commit | bba3542f15c1f559d8bc2fd1a744d7d7b0e6a001 (patch) | |
| tree | 1fa8999b3ba99400b27602bc0c1b9d0281af7fa0 /Makefile | |
| parent | 8fb94cecb0cec273640981fae77b4dc299591f52 (diff) | |
| download | dissidence-main.tar.xz dissidence-main.zip | |
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..99cf17f --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +CC = gcc +CFLAGS = -Wall -Wextra -g -I./include +LDFLAGS = + +SRC_DIR = src +OBJ_DIR = obj +BIN_DIR = bin +TARGET = $(BIN_DIR)/dissidence + +SRCS = $(wildcard $(SRC_DIR)/*.c) +OBJS = $(patsubst $(SRC_DIR)/%.c, $(OBJ_DIR)/%.o, $(SRCS)) + +all: $(TARGET) + +$(TARGET): $(OBJS) + @mkdir -p $(BIN_DIR) + $(CC) $(OBJS) -o $@ $(LDFLAGS) + +$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c + @mkdir -p $(OBJ_DIR) + $(CC) $(CFLAGS) -c $< -o $@ + +run: $(TARGET) + ./$(TARGET) + +clean: + rm -rf $(OBJ_DIR) $(TARGET) + +.PHONY: all clean run |
