funni-square/Makefile

24 lines
376 B
Makefile
Raw Permalink Normal View History

2023-11-24 17:37:22 +00:00
.SUFFIXES:
include config.mk
OBJ := $(SRC:.c=.o)
# MAKE sure that you have SDL2, SDL2-dev/devel, SDL2_ttf and SDL2_ttf-dev/devel installed
CFLAGS += -I/usr/include/SDL2
LDFLAGS += -lSDL2 -lSDL2_ttf
2023-11-24 17:37:22 +00:00
all: $(OBJ) $(OUT)
2023-11-24 17:37:22 +00:00
%.o: %.c
$(CC) $< -c $(CFLAGS) -o "$@"
2023-11-24 17:37:22 +00:00
clean:
rm -f $(OBJ) $(OUT)
ifneq ($(OUT),)
$(OUT): $(OBJ)
$(CC) $^ $(LDFLAGS) -o "$@"
2023-11-24 17:37:22 +00:00
endif
.PHONY: all clean