xglcomp

view Makefile @ 4:57050ca14de6

forgot to add texture.h/cc
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 22 Jan 2016 22:33:34 +0200
parents d9b3fba68705
children 86e57e56a454
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 -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)