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