diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 32 |
1 files changed, 32 insertions, 0 deletions
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) |