summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile15
-rw-r--r--Makerules13
2 files changed, 15 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 74e0b7af..be23c7b3 100644
--- a/Makefile
+++ b/Makefile
@@ -230,21 +230,24 @@ $(MUJSTEST_V8) : $(addprefix $(OUT)/platform/x11/, jstest_main.o pdfapp.o)
endif
ifeq "$(NOX11)" ""
-MUVIEW := $(OUT)/mupdf
-$(MUVIEW) : $(MUPDF_LIB) $(MUPDF_JS_NONE_LIB) $(THIRD_LIBS)
-$(MUVIEW) : $(addprefix $(OUT)/platform/x11/, x11_main.o x11_image.o pdfapp.o)
+MUVIEW_X11 := $(OUT)/mupdf-x11
+$(MUVIEW_X11) : $(MUPDF_LIB) $(MUPDF_JS_NONE_LIB) $(THIRD_LIBS)
+$(MUVIEW_X11) : $(addprefix $(OUT)/platform/x11/, x11_main.o x11_image.o pdfapp.o)
$(LINK_CMD) $(X11_LIBS)
endif
ifeq "$(V8_PRESENT)" "yes"
ifeq "$(NOX11)" ""
-MUVIEW_V8 := $(OUT)/mupdf-v8
-$(MUVIEW_V8) : $(MUPDF_LIB) $(MUPDF_JS_V8_LIB) $(THIRD_LIBS)
-$(MUVIEW_V8) : $(addprefix $(OUT)/platform/x11/, x11_main.o x11_image.o pdfapp.o)
+MUVIEW_X11_V8 := $(OUT)/mupdf-x11-v8
+$(MUVIEW_X11_V8) : $(MUPDF_LIB) $(MUPDF_JS_V8_LIB) $(THIRD_LIBS)
+$(MUVIEW_X11_V8) : $(addprefix $(OUT)/platform/x11/, x11_main.o x11_image.o pdfapp.o)
$(LINK_CMD) $(X11_LIBS) $(V8_LIBS)
endif
endif
+MUVIEW := $(MUVIEW_X11)
+MUVIEW_V8 := $(MUVIEW_X11_V8)
+
INSTALL_APPS := $(MUDRAW) $(MUTOOL) $(MUVIEW) $(MUJSTEST_V8) $(MUVIEW_V8)
# --- Format man pages ---
diff --git a/Makerules b/Makerules
index 879bf0e2..5abfd586 100644
--- a/Makerules
+++ b/Makerules
@@ -26,12 +26,13 @@ endif
# Windows (MINGW) build doesn't use system libraries.
ifeq "$(OS)" "MINGW"
-NOX11=yes
+NOX11 ?= yes
# Mac OS X doesn't have pkg-config so we hard code paths.
else ifeq "$(OS)" "Darwin"
SYS_OPENSSL_CFLAGS = -DHAVE_OPENSSL
SYS_OPENSSL_LIBS = -lcrypto
+
SYS_X11_CFLAGS = -I/usr/X11R6/include
SYS_X11_LIBS = -L/usr/X11R6/lib -lX11 -lXext
@@ -84,7 +85,6 @@ LD = arm-none-linux-gnueabi-gcc
AR = arm-none-linux-gnueabi-ar
CFLAGS += -O3 -mfpu=neon -mcpu=cortex-a8 -mfloat-abi=softfp -ftree-vectorize -ffast-math -fsingle-precision-constant
CROSSCOMPILE=yes
-NOX11=yes
endif
ifeq "$(OS)" "webos-pre-cross"
@@ -93,7 +93,6 @@ LD = arm-none-linux-gnueabi-gcc
AR = arm-none-linux-gnueabi-ar
CFLAGS += -O3 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize -ffast-math -fsingle-precision-constant
CROSSCOMPILE=yes
-NOX11=yes
endif
ifeq "$(OS)" "webos-pixi-cross"
@@ -102,7 +101,6 @@ LD = arm-none-linux-gnueabi-gcc
AR = arm-none-linux-gnueabi-ar
CFLAGS += -O3 -mcpu=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp -ffast-math -fsingle-precision-constant
CROSSCOMPILE=yes
-NOX11=yes
endif
ifeq "$(OS)" "w64_x86-cross-mingw32"
@@ -110,7 +108,6 @@ CC = i686-w64-mingw32-gcc
LD = i686-w64-mingw32-gcc
AR = i686-w64-mingw32-ar
CROSSCOMPILE=yes
-NOX11=yes
endif
ifeq "$(OS)" "w64_amd64-cross-mingw32"
@@ -118,7 +115,6 @@ CC = x86_64-w64-mingw32-gcc
LD = x86_64-w64-mingw32-gcc
AR = x86_64-w64-mingw32-ar
CROSSCOMPILE=yes
-NOX11=yes
endif
# Most variables when building for iOS are set up in ios/build_libs.sh,
@@ -130,5 +126,8 @@ CC = $(PLATFORM_DEVELOPER_BIN_DIR)/gcc
AR = $(PLATFORM_DEVELOPER_BIN_DIR)/ar
RANLIB_CMD = $(PLATFORM_DEVELOPER_BIN_DIR)/ranlib $@
CROSSCOMPILE=yes
-NOX11=yes
+endif
+
+ifeq "$(CROSSCOMPILE)" "yes"
+NOX11 ?= yes
endif