funni-square/Makefile
xAlpharax 961e9316f5
Made Makefile correct with proper SDL paths.
Made the README more beginner friendly.

Changes to be committed:
    modified:   Makefile
    modified:   README.md
    modified:   src/rectangle.c

Co-authored-by: Patrick Covaci <ty3r0x@chaox.ro>
2024-07-24 17:56:47 +03:00

24 lines
376 B
Makefile

.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
all: $(OBJ) $(OUT)
%.o: %.c
$(CC) $< -c $(CFLAGS) -o "$@"
clean:
rm -f $(OBJ) $(OUT)
ifneq ($(OUT),)
$(OUT): $(OBJ)
$(CC) $^ $(LDFLAGS) -o "$@"
endif
.PHONY: all clean