This repository has been archived on 2025-01-22. You can view files and clone it, but cannot push or open issues or pull requests.
mifare-classic-editor/makefile
2023-12-26 01:58:36 -03:00

19 lines
335 B
Makefile

CC = gcc
CFLAGS = -Wall -I$(INCLUDE)
INCLUDE = include
SRC_DIR = src
OBJ_DIR = obj
SRC = $(wildcard $(SRC_DIR)/*.c)
OBJ = $(patsubst $(SRC_DIR)/%.c, $(OBJ_DIR)/%.o, $(SRC))
BIN = ./main
all: $(BIN)
$(BIN): $(OBJ)
$(CC) -o $@ $^
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c MKOBJ
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJ_DIR)/*.o $(BIN)