eqemu

view Makefile @ 10:819c7ebb1bec

added libimago to avoid the external dependency
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 18 Jul 2014 05:07:40 +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