eqemu

annotate Makefile @ 11:2b559dc24c7b

done
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 18 Jul 2014 05:44:37 +0300
parents 9b5bb05ae53a
children
rev   line source
nuclear@0 1 src = $(wildcard src/*.cc)
nuclear@0 2 obj = $(src:.cc=.o)
nuclear@0 3 dep = $(obj:.o=.d)
nuclear@10 4 bin = eqemu
nuclear@0 5
nuclear@10 6 libimago_path = libs/libimago
nuclear@10 7 libimago = $(libimago_path)/libimago.a
nuclear@10 8
nuclear@10 9 CFLAGS = -pedantic -Wall -g -I$(libimago_path)/src
nuclear@0 10 CXXFLAGS = $(CFLAGS)
nuclear@10 11 LDFLAGS = -lGL -lGLU -lGLEW -lX11 -lm -lpthread -L$(libimago_path) -limago -lpng -ljpeg -lz
nuclear@0 12
nuclear@10 13 $(bin): $(obj) $(libimago)
nuclear@0 14 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@0 15
nuclear@0 16 -include $(dep)
nuclear@0 17
nuclear@0 18 %.d: %.cc
nuclear@0 19 @$(CPP) $< $(CXXFLAGS) -MM -MT $(@:.d=.o) >$@
nuclear@0 20
nuclear@10 21 .PHONY: $(libimago)
nuclear@10 22 $(libimago):
nuclear@10 23 cd $(libimago_path) && ./configure --disable-debug --enable-opt
nuclear@10 24 $(MAKE) -C $(libimago_path)
nuclear@10 25
nuclear@0 26 .PHONY: clean
nuclear@0 27 clean:
nuclear@0 28 rm -f $(obj) $(bin)
nuclear@10 29
nuclear@10 30 .PHONY: clean-libs
nuclear@10 31 clean-libs:
nuclear@10 32 $(MAKE) -C $(libimago_path) clean