From ea7cd94f7aeb177618db3907a6c86b7252e018f0 Mon Sep 17 00:00:00 2001 From: quou Date: Sat, 1 Jun 2024 12:19:16 +1000 Subject: Initial commit. --- Makefile | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..14527e7 --- /dev/null +++ b/Makefile @@ -0,0 +1,42 @@ +compiler = gcc +linker = gcc +cflags = -I./ -g $(includes) $(defines) \ + -Wall -Wextra -pedantic -std=c99 +lflags = -lX11 -lm +target = twinkplayer +includes = +defines = -Dplat_x11 \ + -Dplat_posix \ + -Dplat_pulse \ + -Dis64bit=1 \ + -Dplat_x86 \ + -DDEBUG + +sources = \ + cfgparse.c \ + font.c \ + library.c \ + main.c \ + memory.c \ + plat.c \ + rcache.c \ + rect.c \ + render.c \ + ui.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