aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-08-08 11:11:17 +0200
committerMattias Andrée <maandree@operamail.com>2014-08-08 11:11:17 +0200
commit732aa075ab444231b4608127c5d96afd2399d2d6 (patch)
tree2cffe5dbafddc756347a1f49012d7d8189b35cac
parentm (diff)
downloadcrt-calibrator-732aa075ab444231b4608127c5d96afd2399d2d6.tar.gz
crt-calibrator-732aa075ab444231b4608127c5d96afd2399d2d6.tar.bz2
crt-calibrator-732aa075ab444231b4608127c5d96afd2399d2d6.tar.xz
add Makefile
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--Makefile39
1 files changed, 39 insertions, 0 deletions
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
+