xglcomp
annotate Makefile @ 11:cb636a23f4f2
lifted X error reporting from Xlib
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 04 Feb 2016 04:15:15 +0200 |
parents | b2b7cb950c28 |
children |
rev | line source |
---|---|
nuclear@0 | 1 PREFIX = /usr/local |
nuclear@0 | 2 |
nuclear@0 | 3 ccsrc = $(wildcard src/*.cc) |
nuclear@0 | 4 csrc = $(wildcard src/*.c) $(wildcard src/optcfg/*.c) |
nuclear@0 | 5 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o) |
nuclear@0 | 6 dep = $(obj:.o=.d) |
nuclear@0 | 7 bin = xglcomp |
nuclear@0 | 8 |
nuclear@0 | 9 warn = -pedantic -Wall |
nuclear@0 | 10 dbg = -g |
nuclear@0 | 11 opt = -O0 |
nuclear@0 | 12 incpaths = -Isrc/optcfg |
nuclear@0 | 13 |
nuclear@0 | 14 CFLAGS = $(warn) $(dbg) $(opt) $(incpaths) |
nuclear@1 | 15 CXXFLAGS = -std=c++11 $(warn) $(dbg) $(opt) $(incpaths) |
nuclear@5 | 16 LDFLAGS = -lGL -lGLEW -lX11 -lXext -lXcomposite -lXdamage -lXfixes -lm -lpthread |
nuclear@0 | 17 |
nuclear@0 | 18 $(bin): $(obj) |
nuclear@0 | 19 $(CXX) -o $@ $(obj) $(LDFLAGS) |
nuclear@0 | 20 |
nuclear@0 | 21 -include $(dep) |
nuclear@0 | 22 |
nuclear@0 | 23 %.d: %.c |
nuclear@0 | 24 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@0 | 25 |
nuclear@0 | 26 %.d: %.cc |
nuclear@0 | 27 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@0 | 28 |
nuclear@0 | 29 .PHONY: clean |
nuclear@0 | 30 clean: |
nuclear@0 | 31 rm -f $(obj) $(bin) |
nuclear@0 | 32 |
nuclear@0 | 33 .PHONY: cleandep |
nuclear@0 | 34 cleandep: |
nuclear@0 | 35 rm -f $(dep) |
nuclear@0 | 36 |
nuclear@0 | 37 .PHONY: install |
nuclear@0 | 38 install: $(bin) |
nuclear@0 | 39 mkdir -p $(DESTDIR)$(PREFIX)/bin |
nuclear@0 | 40 cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin) |
nuclear@0 | 41 |
nuclear@0 | 42 .PHONY: uninstall |
nuclear@0 | 43 uninstall: |
nuclear@0 | 44 rm -f $(DESTDIR)$(PREFIX)/bin/$(bin) |