diff --git a/make/mingw32/Makefile b/make/mingw32/Makefile index b3ead5b..a62bc3b 100644 --- a/make/mingw32/Makefile +++ b/make/mingw32/Makefile @@ -16,10 +16,13 @@ SHARED = yes ifeq (yes,$(DEBUG)) DEBUGFLAGS=-g -DDEBUG endif -CXX = g++.exe -CC = gcc.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)) @@ -29,7 +32,7 @@ else LIBS = libebml.a endif INCS = -I../.. -CXXFLAGS += $(DEBUGFLAGS) $(INCS) +CXXFLAGS += $(DEBUGFLAGS) $(INCS) .PHONY: all all-before all-after clean clean-custom @@ -47,8 +50,8 @@ distclean dist-clean: clean rm -f .depend libebml.a: $(OBJ) - ar r $@ $(OBJ) - ranlib $@ + $(AR) r $@ $(OBJ) + $(RANLIB) $@ libebml.dll: $(OBJ) $(CXX) -shared -Wl,--export-all -Wl,--out-implib=$@.a -o $@ $(OBJ)