umorna/makefile

34 lines
565 B
Makefile
Raw Normal View History

2023-12-29 07:41:35 -05:00
.PHONY: all debug release clean
CFLAGS := -std=gnu17 -pedantic -Wall -Wextra ${CFLAGS}
LDLIBS :=
sources := source/engine.c \
source/game.c \
source/main.c \
source/menu.c \
source/render.c \
source/source.c \
source/system.c
obj = ${sources:.c=.o}
dep = ${sources:.c=.d}
.c.o:
$(CC) -MD -MP $(CFLAGS) -c $< -o $@
all: debug
debug: CFLAGS += -g
release: CFLAGS += -O3
debug release: umorna
umorna: $(obj)
$(CC) $(LDLIBS) $< -o $@
clean:
rm -f umorna ${obj} ${dep}
-include ${dep}