From: Moritz Bunkus Date: Tue, 23 Mar 2010 15:09:30 +0000 (+0000) Subject: Make the ranlib and ar executables configurable. Support for setting the cross-compil... X-Git-Tag: release-0.9.0~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=36766170908d49f618ff4279a0a843145321153f;p=libmatroska Make the ranlib and ar executables configurable. Support for setting the cross-compilation tool names easily. git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libmatroska@54 a6f86f6d-0131-4f8e-9e7b-e335508773d5 --- diff --git a/make/mingw32/Makefile b/make/mingw32/Makefile index edc0724..923ce42 100644 --- a/make/mingw32/Makefile +++ b/make/mingw32/Makefile @@ -21,10 +21,13 @@ EBML_DLL = yes ifeq (yes,$(DEBUG)) DEBUGFLAGS=-g -DDEBUG endif -CXX = g++.exe -LD = g++.exe -WINDRES = windres.exe -RES = +CROSS = +CXX = $(CROSS)g++ +CC = $(CROSS)gcc +WINDRES = $(CROSS)windres +RANLIB = $(CROSS)ranlib +AR = $(CROSS)ar +RES = SRC = $(wildcard ../../src/*.cpp) OBJ = $(patsubst %.cpp,%.o,$(SRC)) ifeq (yes,$(SHARED)) @@ -39,7 +42,7 @@ CXXFLAGS += -DEBML_DLL endif INCS = -I../.. -I$(EBML_DIR) LDFLAGS = -L. -L$(EBML_DIR)/make/mingw32 -CXXFLAGS += $(DEBUGFLAGS) $(INCS) +CXXFLAGS += $(DEBUGFLAGS) $(INCS) TESTS = test6 test8 test9 .PHONY: all all-before all-after clean clean-custom @@ -61,8 +64,8 @@ distclean dist-clean: clean rm -f .depend libmatroska.a: $(OBJ) - ar r $@ $(OBJ) - ranlib $@ + $(AR) r $@ $(OBJ) + $(RANLIB) $@ libmatroska.dll: $(OBJ) $(CXX) -shared -Wl,--export-all -Wl,--out-implib=$@.a -o $@ $(OBJ) \