testing compressed cubemaps
[cubetest] / Makefile
1 # -- options --
2 PREFIX = /usr/local
3 opt = -O3
4 dbg = -g
5 # -------------
6
7 src = $(wildcard src/*.cc)
8 obj = $(src:.cc=.o)
9 dep = $(obj:.o=.d)
10 bin = cubetest
11
12 CXXFLAGS = -pedantic -Wall $(opt) $(dbg) $(inc)
13 LDFLAGS = -lGL -lGLU -lglut
14
15 $(bin): $(obj)
16         $(CXX) -o $@ $(obj) $(LDFLAGS)
17
18 -include $(dep)
19
20 %.d: %.c
21         @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
22
23 %.d: %.cc
24         @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
25
26 .PHONY: clean
27 clean:
28         rm -f $(obj) $(bin)
29
30 .PHONY: cleandep
31 cleandep:
32         rm -f $(dep)
33
34 .PHONY: install
35 install: $(bin)
36         mkdir -p $(DESTDIR)$(PREFIX)/bin
37         cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin)
38
39 .PHONY: uninstall
40 uninstall:
41         rm -f $(DESTDIR)$(PREFIX)/bin/$(bin)