CFLAGS ?= -Wall -Wextra -Iinclude
|
|
|
|
CFILES := $(shell find src -type f -name '*.c')
|
|
OFILES := $(CFILES:%.c=%.o)
|
|
|
|
.PHONY: clean
|
|
|
|
psxc: $(OFILES)
|
|
$(CC) $(OFILES) -o $@
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
clean:
|
|
rm -f $(OFILES) psxc
|