CC=gcc SRC = $(wildcard *.c) OBJS = $(patsubst %.c, %.o, $(SRC)) NAME = js1 all: $(NAME) .PHONY: clean $(NAME): $(OBJS) $(CC) $(shell pkg-config --cflags sdl2 ) $< $(shell pkg-config --libs sdl2 ) -o $@ clean: rm -f $(OBJS) $(NAME)