0,0 → 1,84 |
# Configuration for the Makefile |
|
OS ?= $(shell uname) |
OS := $(OS:MINGW%=MINGW) |
|
CFLAGS += -Wall |
|
ifeq "$(build)" "debug" |
CFLAGS += -pipe -g |
else ifeq "$(build)" "profile" |
CFLAGS += -pipe -O2 -DNDEBUG -pg |
LDFLAGS += -pg |
else ifeq "$(build)" "release" |
CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer |
else ifeq "$(build)" "native" |
CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer -march=native -mfpmath=sse |
else |
$(error unknown build setting: '$(build)') |
endif |
|
ifeq "$(OS)" "Linux" |
SYS_FREETYPE_INC := `pkg-config --cflags freetype2` |
X11_LIBS := -lX11 -lXext |
endif |
|
ifeq "$(OS)" "FreeBSD" |
SYS_FREETYPE_INC := `pkg-config --cflags freetype2` |
LDFLAGS += -L/usr/local/lib |
X11_LIBS := -lX11 -lXext |
endif |
|
# Mac OS X build depends on some thirdparty libs |
ifeq "$(OS)" "Darwin" |
SYS_FREETYPE_INC := -I/usr/X11R6/include/freetype2 |
CFLAGS += -I/usr/X11R6/include |
LDFLAGS += -L/usr/X11R6/lib |
X11_LIBS := -lX11 -lXext |
ifeq "$(arch)" "amd64" |
CFLAGS += -m64 |
LDFLAGS += -m64 |
else |
CFLAGS += -m32 |
LDFLAGS += -m32 |
endif |
endif |
|
# The following section is an example of how to simply do cross-compilation |
# using these Makefiles. It builds for a beagleboard running ARM linux, |
# compiling on windows with the CodeSourcery G++ compilers. |
# Invoke this as: |
# make OS=beagle-cross build=release |
# This does rely on the generated directory being populated with the cmap |
# files etc first. Either: |
# 1) do 'make generate' first (this relies on you having an appropriate host |
# base C compiler set up - such as you would have on unix or in windows |
# cygwin) |
# 2) do a non cross compile build (e.g. windows in MSVC) first. |
# 3) download the generated files from mupdf.com. |
ifeq "$(OS)" "beagle-cross" |
CC = arm-none-linux-gnueabi-gcc |
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" |
CC = arm-none-linux-gnueabi-gcc |
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" |
CC = arm-none-linux-gnueabi-gcc |
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 |