2023-12-26 01:58:36 -03:00
|
|
|
CC=gcc
|
2023-12-26 03:09:28 -03:00
|
|
|
CFLAGS=-g -Wall -Iinclude
|
2023-12-26 01:58:36 -03:00
|
|
|
SRC=src
|
|
|
|
OBJ=obj
|
|
|
|
SRCS=$(wildcard $(SRC)/*.c)
|
|
|
|
OBJS=$(patsubst $(SRC)/%.c, $(OBJ)/%.o, $(SRCS))
|
2023-12-16 03:08:59 -03:00
|
|
|
|
2023-12-26 01:58:36 -03:00
|
|
|
BIN=./main
|
2023-12-16 03:08:59 -03:00
|
|
|
|
2023-12-26 01:58:36 -03:00
|
|
|
all:$(BIN)
|
|
|
|
|
|
|
|
$(BIN): $(OBJS)
|
|
|
|
$(CC) $(CFLAGS) $(OBJS) -o $@
|
|
|
|
|
|
|
|
$(OBJ)/%.o: $(SRC)/%.c
|
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) -r $(OBJ)/*
|