goat3d

diff goatview/Makefile @ 80:c5e997e8fd62

lalala
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 08 May 2014 23:00:30 +0300
parents 53ea5b25426e
children 70b7c41a4f17
line diff
     1.1 --- a/goatview/Makefile	Thu May 08 19:30:49 2014 +0300
     1.2 +++ b/goatview/Makefile	Thu May 08 23:00:30 2014 +0300
     1.3 @@ -1,15 +1,17 @@
     1.4  PREFIX = /usr/local
     1.5  
     1.6  src = $(wildcard src/*.cc)
     1.7 +csrc = $(wildcard src/*.c)
     1.8  mochdr = src/goatview.h
     1.9  mocsrc = $(patsubst src/%.h,src/moc_%.cc,$(mochdr))
    1.10 -obj = $(sort $(src:.cc=.o) $(mocsrc:.cc=.o))
    1.11 +obj = $(sort $(csrc:.c=.o) $(src:.cc=.o) $(mocsrc:.cc=.o))
    1.12  dep = $(obj:.o=.d)
    1.13  bin = goatview
    1.14  
    1.15  goat_root = ..
    1.16  
    1.17 -CXXFLAGS = -std=c++11 -pedantic -Wall -g $(pic) -I$(goat_root)/src $(qtinc)
    1.18 +CFLAGS = -pedantic -Wall -g $(pic) -I$(goat_root)/src $(qtinc)
    1.19 +CXXFLAGS = -std=c++11 $(CFLAGS)
    1.20  LDFLAGS = $(libgoat) $(libgl) $(qtlib) -lvmath
    1.21  MOC = moc
    1.22  
    1.23 @@ -34,6 +36,9 @@
    1.24  
    1.25  -include $(dep)
    1.26  
    1.27 +%.d: %.c
    1.28 +	@$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.29 +
    1.30  %.d: %.cc
    1.31  	@$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.32