vrmodel

diff Makefile @ 2:be91b72ce3f9

foobar
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 30 Aug 2014 21:46:37 +0300
parents 76e75cbcb758
children a32b151fb3c6
line diff
     1.1 --- a/Makefile	Fri Aug 29 23:07:59 2014 +0300
     1.2 +++ b/Makefile	Sat Aug 30 21:46:37 2014 +0300
     1.3 @@ -3,7 +3,10 @@
     1.4  dep = $(obj:.o=.d)
     1.5  bin = vrmodel
     1.6  
     1.7 -CFLAGS = -pedantic -Wall -g `pkg-config --cflags sdl2`
     1.8 +inc = -Iinclude
     1.9 +
    1.10 +CFLAGS = -pedantic -Wall -g $(inc) `pkg-config --cflags sdl2`
    1.11 +CXXFLAGS = $(CFLAGS)
    1.12  LDFLAGS = $(libgl) `pkg-config --libs sdl2`
    1.13  
    1.14  ifeq ($(shell uname -s), Darwin)
    1.15 @@ -13,12 +16,15 @@
    1.16  endif
    1.17  
    1.18  $(bin): $(obj)
    1.19 -	$(CC) -o $@ $(obj) $(LDFLAGS)
    1.20 +	$(CXX) -o $@ $(obj) $(LDFLAGS)
    1.21  
    1.22  -include $(dep)
    1.23  
    1.24 +%.d: %.c
    1.25 +	@$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.26 +
    1.27  %.d: %.cc
    1.28 -	@$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.29 +	@$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.30  
    1.31  .PHONY: clean
    1.32  clean: