istereo2
annotate Makefile @ 9:64e15874f3bd
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 26 Sep 2015 02:56:07 +0300 |
parents | |
children | 2a0ef5efb8e2 |
rev | line source |
---|---|
nuclear@9 | 1 src = $(wildcard src/*.c) $(wildcard src/glut/*.c) |
nuclear@9 | 2 ccsrc = $(wildcard src/*.cc) |
nuclear@9 | 3 |
nuclear@9 | 4 obj = $(src:.c=.o) $(ccsrc:.cc=.o) |
nuclear@9 | 5 dep = $(obj:.o=.d) |
nuclear@9 | 6 bin = test |
nuclear@9 | 7 |
nuclear@9 | 8 incdir = -Isrc |
nuclear@9 | 9 def = -DNO_FREETYPE |
nuclear@9 | 10 |
nuclear@9 | 11 CFLAGS = -pedantic -Wall -g $(def) $(incdir) |
nuclear@9 | 12 CXXFLAGS = $(CFLAGS) |
nuclear@9 | 13 LDFLAGS = -lGL -lGLU -lglut -lGLEW -lm -ldl |
nuclear@9 | 14 |
nuclear@9 | 15 include libs/Makefile |
nuclear@9 | 16 |
nuclear@9 | 17 $(bin): $(obj) |
nuclear@9 | 18 $(CXX) -o $@ $(obj) $(LDFLAGS) |
nuclear@9 | 19 |
nuclear@9 | 20 -include $(dep) |
nuclear@9 | 21 |
nuclear@9 | 22 %.d: %.c |
nuclear@9 | 23 @$(CPP) $(CFLAGS) -MM -MT $(@:.d=.o) $< >$@ |
nuclear@9 | 24 |
nuclear@9 | 25 %.d: %.cc |
nuclear@9 | 26 @$(CPP) $(CXXFLAGS) -MM -MT $(@:.d=.o) $< >$@ |
nuclear@9 | 27 |
nuclear@9 | 28 .PHONY: clean |
nuclear@9 | 29 clean: |
nuclear@9 | 30 rm -f $(obj) $(bin) |
nuclear@9 | 31 |
nuclear@9 | 32 .PHONY: cleandep |
nuclear@9 | 33 cleandep: |
nuclear@9 | 34 rm -f $(dep) |