2021-07-01 02:27:05 +00:00
|
|
|
CC = gcc
|
2021-07-01 05:20:09 +00:00
|
|
|
CFLAGS = -Wall -Wextra -pedantic-errors -std=c99 -Wno-format -lncurses
|
2021-07-01 02:27:05 +00:00
|
|
|
OUTFILE = cards
|
|
|
|
|
|
|
|
SRCDIR = src
|
|
|
|
OBJDIR = obj
|
|
|
|
INCDIR = src/include
|
|
|
|
|
|
|
|
SRC = $(wildcard $(SRCDIR)/*.c)
|
|
|
|
INC = $(wildcard $(INCDIR)/*.h)
|
|
|
|
_OBJ = $(SRC:.c=.o)
|
|
|
|
OBJ = $(subst $(SRCDIR),$(OBJDIR),$(_OBJ))
|
|
|
|
|
|
|
|
$(OUTFILE): $(OBJ)
|
|
|
|
$(CC) $(CFLAGS) -o $(OUTFILE) $(OBJ)
|
|
|
|
|
|
|
|
$(OBJDIR)/%.o: $(SRCDIR)/%.c $(INCDIR)/%.h
|
2021-07-03 00:14:12 +00:00
|
|
|
@mkdir -p $(@D)
|
2021-07-01 02:27:05 +00:00
|
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
-rm $(OUTFILE) $(OBJ)
|