2023-10-30 15:50:12 +03:00
|
|
|
include config.mk
|
2023-10-30 03:00:39 +03:00
|
|
|
|
2023-10-30 15:50:12 +03:00
|
|
|
INCLUDE = -Iinclude
|
2023-10-29 20:03:23 +03:00
|
|
|
RM = rm -f
|
|
|
|
SRCDIR = src
|
|
|
|
OBJDIR = obj
|
2023-11-25 13:24:01 +03:00
|
|
|
SRC = main.c screen.c input.c player.c platform.c sleep.c
|
2023-10-29 20:03:23 +03:00
|
|
|
OBJ = $(addprefix $(OBJDIR)/,$(SRC:.c=.o))
|
|
|
|
|
2023-11-25 00:55:36 +03:00
|
|
|
all: $(OUT)
|
2023-10-29 20:03:23 +03:00
|
|
|
|
|
|
|
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
|