diff options
author | Tor Andersson <tor@ghostscript.com> | 2010-03-24 17:45:43 +0100 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2010-03-24 17:45:43 +0100 |
commit | 9d49bfd7fd1249d27fcacf667b8ab606c3cbcd3d (patch) | |
tree | 06439fe78e335c62fc4d73a1e62ade9ba58eaf76 | |
parent | 856f4b38e516117ba7708e8af7ea099d40aa4097 (diff) | |
download | mupdf-9d49bfd7fd1249d27fcacf667b8ab606c3cbcd3d.tar.xz |
Fix Makefile for MSYS build.
-rw-r--r-- | Makefile | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -7,7 +7,7 @@ HOSTDIR = build/host CFLAGS = -g -O2 -Wall --std=gnu99 -Ifitz -Imupdf LDFLAGS = CC = cc -LD = cc +LD = $(CC) MKDIR = mkdir -p RM = rm -f AR = ar @@ -15,6 +15,7 @@ AR = ar # Edit your section or add one for your platform: OS := $(shell uname) +OS := $(OS:MINGW%=MINGW) ifeq "$(OS)" "Linux" CFLAGS += `pkg-config --cflags freetype2` @@ -30,17 +31,19 @@ X11LIBS = -lX11 -lXext PDFVIEW_EXE = $(X11VIEW_EXE) endif -ifeq "$(OS)" "MINGW32_NT-6.1" +ifeq "$(OS)" "MINGW" +CC = gcc CFLAGS += -Ic:/msys/1.0/local/include LDFLAGS += -Lc:/msys/1.0/local/lib W32LIBS = -lgdi32 -lcomdlg32 -luser32 -ladvapi32 -lshell32 -mwindows PDFVIEW_EXE = $(WINVIEW_EXE) endif + # Edit these if you are cross compiling: HOSTCC ?= $(CC) -HOSTLD ?= $(LD) +HOSTLD ?= $(HOSTCC) HOSTCFLAGS ?= $(CFLAGS) HOSTLDFLAGS ?= $(LDFLAGS) @@ -274,9 +277,9 @@ WINVIEW_OBJ=$(WINVIEW_SRC:apps/%.c=$(OBJDIR)/%.o) $(WINVIEW_RES:apps/%.rc=$(OBJD WINVIEW_EXE=$(OBJDIR)/mupdf.exe $(OBJDIR)/%.o: apps/%.rc - rc /fo $@ $< + windres -i $< -o $@ --include-dir=apps -$(WINVIEW_EXE): $(WINVIEW_OBJ) $(MUPDF_LIB) $(FONT_LIB) $(CMAP_LIB) $(DRAW_LIB) $(FITZ_LIB) +$(WINVIEW_EXE): $(WINVIEW_OBJ) $(MUPDF_LIB) $(FONT_LIB) $(CMAP_LIB) $(FITZ_LIB) $(DRAW_LIB) $(LD_CMD) $(W32LIBS) # |