forked from nakidai/csnake
1
0
Fork 0
csnake/Makefile

30 lines
435 B
Makefile
Raw Normal View History

2023-10-30 03:00:39 +03:00
include config/config.mk
2023-10-29 20:03:23 +03:00
OUT = game
CFLAGS =
LDFLAGS =
2023-10-30 03:05:29 +03:00
INCLUDE = -Iinclude -Iconfig
2023-10-29 20:03:23 +03:00
CC = cc
LD = ld
RM = rm -f
SRCDIR = src
OBJDIR = obj
2023-10-29 23:14:51 +03:00
SRC = main.c screen.c input.c player.c
2023-10-29 20:03:23 +03:00
OBJ = $(addprefix $(OBJDIR)/,$(SRC:.c=.o))
default: $(OUT)
obj:
mkdir obj
$(OBJDIR)/%.o: $(SRCDIR)/%.c
$(CC) -c -o $@ $< $(CFLAGS) $(INCLUDE)
$(OUT): obj $(OBJ)
$(CC) -o $@ $(OBJ) $(LDFLAGS)
clean:
2023-10-30 03:05:29 +03:00
$(RM) $(OUT) $(OBJDIR)/*
2023-10-29 20:03:23 +03:00
.PHONY: default clean