From 39100e7292d3ee12d387fddfa0f0d7b712e31e1c Mon Sep 17 00:00:00 2001 From: quou Date: Sun, 30 Jun 2024 18:24:01 +1000 Subject: initial commit. --- Makefile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8b774cd --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +compiler = gcc +linker = gcc +cflags = -I./ -g -DDEBUG -Dplat_x11 -Dplat_x86 \ +-Dplat_posix -Dallocation_default_alignment=8 \ +-Wall -Wextra -pedantic -std=c90 +lflags = -lX11 +target = 3de + +sources = \ + 3de.c \ + maths.c \ + memory.c \ + plat.c \ + rect.c \ + render.c + +objects = $(sources:%.c=%.o) + +all: $(target) + +$(objects): %.o : %.c + $(compiler) -MMD -MF $(basename $@).d $(cflags) -o $@ -c $< + +$(target): $(objects) + $(linker) $(objects) -o $@ $(lflags) + +clean: + rm *.d + rm *.o + rm $(target) + +-include $(sources:%.c=%.d) -- cgit v1.2.3-54-g00ecf