CC = cc
CFLAGS = -Wall -Wextra -O3 $(shell pkg-config --cflags sdl3 sdl3-image libpulse libpulse-simple)
LDFLAGS = $(shell pkg-config --libs sdl3 sdl3-image libpulse libpulse-simple) -lm

SRC_DIR = src
BIN_DIR = bin

all: $(BIN_DIR)/pndacc

$(BIN_DIR)/pndacc: $(SRC_DIR)/Main.c
	mkdir -p $(BIN_DIR)
	$(CC) $(CFLAGS) -o $@ $(SRC_DIR)/Main.c $(LDFLAGS)

run: $(BIN_DIR)/pndacc
	./$(BIN_DIR)/pndacc

clean:
	rm -rf $(BIN_DIR)

.PHONY: all run clean
