eqemu
diff 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 diff
1.1 --- a/Makefile Fri Jul 18 04:47:27 2014 +0300 1.2 +++ b/Makefile Fri Jul 18 05:07:40 2014 +0300 1.3 @@ -1,13 +1,16 @@ 1.4 src = $(wildcard src/*.cc) 1.5 obj = $(src:.cc=.o) 1.6 dep = $(obj:.o=.d) 1.7 -bin = eqdummy 1.8 +bin = eqemu 1.9 1.10 -CFLAGS = -pedantic -Wall -g 1.11 +libimago_path = libs/libimago 1.12 +libimago = $(libimago_path)/libimago.a 1.13 + 1.14 +CFLAGS = -pedantic -Wall -g -I$(libimago_path)/src 1.15 CXXFLAGS = $(CFLAGS) 1.16 -LDFLAGS = -lGL -lGLU -lGLEW -lX11 -lm -lpthread -limago 1.17 +LDFLAGS = -lGL -lGLU -lGLEW -lX11 -lm -lpthread -L$(libimago_path) -limago -lpng -ljpeg -lz 1.18 1.19 -$(bin): $(obj) 1.20 +$(bin): $(obj) $(libimago) 1.21 $(CXX) -o $@ $(obj) $(LDFLAGS) 1.22 1.23 -include $(dep) 1.24 @@ -15,6 +18,15 @@ 1.25 %.d: %.cc 1.26 @$(CPP) $< $(CXXFLAGS) -MM -MT $(@:.d=.o) >$@ 1.27 1.28 +.PHONY: $(libimago) 1.29 +$(libimago): 1.30 + cd $(libimago_path) && ./configure --disable-debug --enable-opt 1.31 + $(MAKE) -C $(libimago_path) 1.32 + 1.33 .PHONY: clean 1.34 clean: 1.35 rm -f $(obj) $(bin) 1.36 + 1.37 +.PHONY: clean-libs 1.38 +clean-libs: 1.39 + $(MAKE) -C $(libimago_path) clean