From 732aa075ab444231b4608127c5d96afd2399d2d6 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 8 Aug 2014 11:11:17 +0200 Subject: add Makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..dc0e08d --- /dev/null +++ b/Makefile @@ -0,0 +1,39 @@ +LIBS = libdrm + +FLAGS = -std=gnu99 -Og -g -Wall -Wextra -pedantic -Wdouble-promotion -Wformat=2 \ + -Winit-self -Wmissing-include-dirs -Wtrampolines -Wfloat-equal -Wshadow \ + -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls \ + -Wnested-externs -Winline -Wno-variadic-macros -Wswitch-default \ + -Wsync-nand -Wunsafe-loop-optimizations -Wcast-align -Wstrict-overflow \ + -Wdeclaration-after-statement -Wundef -Wbad-function-cast -Wcast-qual \ + -Wwrite-strings -Wlogical-op -Waggregate-return -Wstrict-prototypes \ + -Wold-style-definition -Wpacked -Wvector-operation-performance \ + -Wunsuffixed-float-constants -Wsuggest-attribute=const \ + -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \ + -Wsuggest-attribute=format -Wnormalized=nfkc -Wconversion \ + -fstrict-aliasing -fstrict-overflow -fipa-pure-const -ftree-vrp \ + -fstack-usage -funsafe-loop-optimizations -Wtraditional-conversion + +LD_FLAGS = -lm $(shell pkg-config --libs $(LIBS)) $(FLAGS) $(LDFLAGS) +C_FLAGS = $(shell pkg-config --cflags $(LIBS)) $(FLAGS) $(CFLAGS) $(CPPFLAGS) + +OBJS = calibrator drmgamma framebuffer gamma state + + + +.PHONY: all +all: bin/crt-calibrator + +bin/crt-calibrator: $(foreach O,$(OBJS),obj/$(O).o) + @mkdir -p bin + $(CC) $(LD_FLAGS) -o $@ $^ + +obj/%.o: src/%.c src/*.h + @mkdir -p obj + $(CC) $(C_FLAGS) -c -o $@ $< + + +.PHONY: clean +clean: + -rm -r bin obj + -- cgit v1.2.3-70-g09d2