istereo2

diff Makefile @ 9:64e15874f3bd

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 26 Sep 2015 02:56:07 +0300
parents
children 2a0ef5efb8e2
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Makefile	Sat Sep 26 02:56:07 2015 +0300
     1.3 @@ -0,0 +1,34 @@
     1.4 +src = $(wildcard src/*.c) $(wildcard src/glut/*.c)
     1.5 +ccsrc = $(wildcard src/*.cc)
     1.6 +
     1.7 +obj = $(src:.c=.o) $(ccsrc:.cc=.o)
     1.8 +dep = $(obj:.o=.d)
     1.9 +bin = test
    1.10 +
    1.11 +incdir = -Isrc
    1.12 +def = -DNO_FREETYPE
    1.13 +
    1.14 +CFLAGS = -pedantic -Wall -g $(def) $(incdir)
    1.15 +CXXFLAGS = $(CFLAGS)
    1.16 +LDFLAGS = -lGL -lGLU -lglut -lGLEW -lm -ldl
    1.17 +
    1.18 +include libs/Makefile
    1.19 +
    1.20 +$(bin): $(obj)
    1.21 +	$(CXX) -o $@ $(obj) $(LDFLAGS)
    1.22 +
    1.23 +-include $(dep)
    1.24 +
    1.25 +%.d: %.c
    1.26 +	@$(CPP) $(CFLAGS) -MM -MT $(@:.d=.o) $< >$@
    1.27 +
    1.28 +%.d: %.cc
    1.29 +	@$(CPP) $(CXXFLAGS) -MM -MT $(@:.d=.o) $< >$@
    1.30 +
    1.31 +.PHONY: clean
    1.32 +clean:
    1.33 +	rm -f $(obj) $(bin)
    1.34 +
    1.35 +.PHONY: cleandep
    1.36 +cleandep:
    1.37 +	rm -f $(dep)