summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile23
-rw-r--r--Makerules6
2 files changed, 27 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 84c03ede..55217c94 100644
--- a/Makefile
+++ b/Makefile
@@ -274,8 +274,27 @@ $(MUVIEW_X11_CURL) : $(MUVIEW_X11_CURL_OBJ)
endif
endif
-MUVIEW := $(MUVIEW_X11)
-MUVIEW_CURL := $(MUVIEW_X11_CURL)
+ifeq "$(HAVE_WIN32)" "yes"
+MUVIEW_WIN32 := $(OUT)/mupdf
+MUVIEW_WIN32_OBJ := $(addprefix $(OUT)/platform/win32/, win_main.o pdfapp.o)
+$(MUVIEW_WIN32_OBJ) : $(FITZ_HDR) $(PDF_HDR)
+$(MUVIEW_WIN32) : $(MUPDF_LIB) $(THIRD_LIBS)
+$(MUVIEW_WIN32) : $(MUVIEW_WIN32_OBJ)
+ $(LINK_CMD) $(WIN32_LIBS)
+
+ifeq "$(HAVE_CURL)" "yes"
+MUVIEW_WIN32_CURL := $(OUT)/mupdf-win32-curl
+MUVIEW_WIN32_CURL_OBJ := $(addprefix $(OUT)/platform/win32/curl/, win_main.o pdfapp.o curl_stream.o)
+$(MUVIEW_WIN32_CURL_OBJ) : $(FITZ_HDR) $(PDF_HDR)
+$(MUVIEW_WIN32_CURL) : $(MUPDF_LIB) $(THIRD_LIBS) $(CURL_LIB)
+$(MUVIEW_WIN32_CURL) : $(MUVIEW_WIN32_CURL_OBJ)
+ $(LINK_CMD) $(WIN32_LIBS) $(CURL_LIBS) $(SYS_CURL_DEPS)
+endif
+endif
+
+MUVIEW := $(MUVIEW_X11) $(MUVIEW_WIN32)
+MUVIEW_CURL := $(MUVIEW_X11_CURL) $(MUVIEW_WIN32_CURL)
+
INSTALL_APPS := $(MUDRAW) $(MUTOOL) $(MUVIEW) $(MUJSTEST) $(MUVIEW_CURL)
diff --git a/Makerules b/Makerules
index e858ffcb..47b6d1cf 100644
--- a/Makerules
+++ b/Makerules
@@ -164,6 +164,12 @@ LD = $(TIZEN_TOOLS)ld $(TIZEN_FLAGS)
CROSSCOMPILE=yes
endif
+ifeq "$(OS)" "MINGW"
+WIN32_LIBS=-lcomdlg32 -lgdi32
+HAVE_WIN32=yes
+LDFLAGS += -Wl,-subsystem,windows
+endif
+
# TODO: If crosscompiling, why not just call "make libs" instead of this exception?
ifeq "$(CROSSCOMPILE)" "yes"
HAVE_X11 ?= no