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