[gs-commits] mupdf/master - 0_6-223-g7853501 - Allow some makefile variables to be overridden on the command line to ease cross compilation.

Tor Andersson tor at ghostscript.com
Sat Jul 24 00:44:32 UTC 2010


commit 78535013dcafd4483021743070af2ddd5360e849
Author: Tor Andersson <tor at ghostscript.com>
Date:   Fri Jul 23 20:30:43 2010 +0000

    Allow some makefile variables to be overridden on the command line to ease cross compilation.
    
    Ignore-this: 87bb45d58d8b7a00b8afc19c899977be
    
    darcs-hash:20100723203043-f546f-7d0b02932a4c9646516306a49937860757b1bd09.gz

 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index bade059..5584897 100644
--- a/Makefile
+++ b/Makefile
@@ -46,14 +46,14 @@ ifneq "$(verbose)" ""
 GENFILE_CMD = $(firstword $^) $@ $(wordlist 2, 999, $^)
 CC_CMD = $(CC) -o $@ -c $< $(CFLAGS)
 LD_CMD = $(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
-AR_CMD = rm -f $@ && ar cru $@ $^
+AR_CMD = rm -f $@ && $(AR) cru $@ $^
 
 else
 
 GENFILE_CMD = @ echo GENFILE $@ && $(firstword $^) $@ $(wordlist 2, 999, $^)
 CC_CMD = @ echo CC $@ && $(CC) -o $@ -c $< $(CFLAGS)
 LD_CMD = @ echo LD $@ && $(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
-AR_CMD = @ echo AR $@ && rm -f $@ && ar cru $@ $^
+AR_CMD = @ echo AR $@ && rm -f $@ && $(AR) cru $@ $^
 
 endif
 
@@ -359,7 +359,7 @@ WINVIEW_OBJ=$(WINVIEW_SRC:apps/%.c=$(OBJDIR)/%.o) $(WINVIEW_RES:apps/%.rc=$(OBJD
 WINVIEW_EXE=$(OBJDIR)/mupdf.exe
 
 $(OBJDIR)/%.o: apps/%.rc
-	windres -i $< -o $@ --include-dir=apps
+	$(WINDRES) -i $< -o $@ --include-dir=apps
 
 $(WINVIEW_OBJ): $(MUPDF_HDR) $(PDFAPP_HDR)
 $(WINVIEW_EXE): $(WINVIEW_OBJ) $(MUPDF_LIB) $(THIRD_LIBS)
diff --git a/Makerules b/Makerules
index 5ad90c4..df40c9a 100644
--- a/Makerules
+++ b/Makerules
@@ -1,6 +1,6 @@
 # Configuration for the Makefile
 
-OS := $(shell uname)
+OS ?= $(shell uname)
 OS := $(OS:MINGW%=MINGW)
 
 CC ?= cc
@@ -49,7 +49,7 @@ endif
 
 # MinGW build depends on thirdparty libs
 ifeq "$(OS)" "MINGW"
-CC := gcc
+WINDRES ?= windres
 W32LIBS := -lgdi32 -lcomdlg32 -luser32 -ladvapi32 -lshell32 -mwindows
 PDFVIEW_EXE = $(WINVIEW_EXE)
 endif

--
git/hooks/post-receive


More information about the gs-commits mailing list