eqemu

view Makefile @ 11:2b559dc24c7b

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