gameui

diff Makefile @ 5:5a84873185ff

rudimentary theme plugin system and other minor fixes
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 22 Mar 2014 01:50:01 +0200
parents f1014234dece
children
line diff
     1.1 --- a/Makefile	Fri Mar 21 21:45:37 2014 +0200
     1.2 +++ b/Makefile	Sat Mar 22 01:50:01 2014 +0200
     1.3 @@ -1,15 +1,25 @@
     1.4  src = test.cc $(wildcard src/*.cc)
     1.5  obj = $(src:.cc=.o)
     1.6 +dep = $(obj:.o=.d)
     1.7  
     1.8  bin = test
     1.9  
    1.10  CFLAGS = -pedantic -Wall -g -Iinclude -Isrc
    1.11  CXXFLAGS = $(CFLAGS)
    1.12 -LDFLAGS = -lGL -lGLU -lglut -lpthread
    1.13 +LDFLAGS = -lGL -lGLU -lglut -lpthread -ldl
    1.14  
    1.15  $(bin): $(obj)
    1.16  	$(CXX) -o $@ $(obj) $(LDFLAGS)
    1.17  
    1.18 +-include $(dep)
    1.19 +
    1.20 +
    1.21 +%.d: %.c
    1.22 +	@$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.23 +
    1.24 +%.d: %.cc
    1.25 +	@$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.26 +
    1.27  .PHONY: clean
    1.28  clean:
    1.29 -	rm -f $(obj) $(bin)
    1.30 +	rm -f $(obj) $(bin) $(dep)