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
This commit is contained in:
Moritz Bunkus 2010-03-23 15:09:30 +00:00
parent 44e91f4d61
commit 3676617090

View File

@ -21,9 +21,12 @@ EBML_DLL = yes
ifeq (yes,$(DEBUG)) ifeq (yes,$(DEBUG))
DEBUGFLAGS=-g -DDEBUG DEBUGFLAGS=-g -DDEBUG
endif endif
CXX = g++.exe CROSS =
LD = g++.exe CXX = $(CROSS)g++
WINDRES = windres.exe CC = $(CROSS)gcc
WINDRES = $(CROSS)windres
RANLIB = $(CROSS)ranlib
AR = $(CROSS)ar
RES = RES =
SRC = $(wildcard ../../src/*.cpp) SRC = $(wildcard ../../src/*.cpp)
OBJ = $(patsubst %.cpp,%.o,$(SRC)) OBJ = $(patsubst %.cpp,%.o,$(SRC))
@ -61,8 +64,8 @@ distclean dist-clean: clean
rm -f .depend rm -f .depend
libmatroska.a: $(OBJ) libmatroska.a: $(OBJ)
ar r $@ $(OBJ) $(AR) r $@ $(OBJ)
ranlib $@ $(RANLIB) $@
libmatroska.dll: $(OBJ) libmatroska.dll: $(OBJ)
$(CXX) -shared -Wl,--export-all -Wl,--out-implib=$@.a -o $@ $(OBJ) \ $(CXX) -shared -Wl,--export-all -Wl,--out-implib=$@.a -o $@ $(OBJ) \