From 36766170908d49f618ff4279a0a843145321153f Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 23 Mar 2010 15:09:30 +0000 Subject: [PATCH] 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 --- make/mingw32/Makefile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) 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) \ -- 2.40.0