summaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2011-04-07 02:14:22 +0200
committerTor Andersson <tor.andersson@artifex.com>2011-04-07 02:14:22 +0200
commit7e863ba7eff4fe138ccb0aa7f28744a00aa96c71 (patch)
tree88d72dec489fd8633b6583fb26aa8993bf261f78 /Makerules
parent71b44f14fd09fe3cb404f6f9225b3e4987328e15 (diff)
downloadmupdf-7e863ba7eff4fe138ccb0aa7f28744a00aa96c71.tar.xz
Simplify makefiles by use of $(wildcard) and chained rules.
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules37
1 files changed, 9 insertions, 28 deletions
diff --git a/Makerules b/Makerules
index bcb50be7..486f8adc 100644
--- a/Makerules
+++ b/Makerules
@@ -3,40 +3,30 @@
OS ?= $(shell uname)
OS := $(OS:MINGW%=MINGW)
-CC ?=
-CFLAGS ?=
-LDFLAGS ?=
-
-CFLAGS += -Ifitz -Ipdf -Ixps -Iscripts -Wall
+CFLAGS += -Wall
ifeq "$(build)" "debug"
CFLAGS += -pipe -g
-endif
-
-ifeq "$(build)" "profile"
+else ifeq "$(build)" "profile"
CFLAGS += -pipe -O2 -DNDEBUG -pg
LDFLAGS += -pg
-endif
-
-ifeq "$(build)" "release"
+else ifeq "$(build)" "release"
CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer
-endif
-
-ifeq "$(build)" "native"
+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`
-X11LIBS := -lX11 -lXext
-PDFVIEW_EXE = $(X11VIEW_EXE)
+X11_LIBS := -lX11 -lXext
endif
ifeq "$(OS)" "FreeBSD"
SYS_FREETYPE_INC := `pkg-config --cflags freetype2`
LDFLAGS += -L/usr/local/lib
-X11LIBS := -lX11 -lXext
-PDFVIEW_EXE = $(X11VIEW_EXE)
+X11_LIBS := -lX11 -lXext
endif
# Mac OS X build depends on some thirdparty libs
@@ -44,8 +34,7 @@ ifeq "$(OS)" "Darwin"
SYS_FREETYPE_INC := -I/usr/X11R6/include/freetype2
CFLAGS += -I/usr/X11R6/include
LDFLAGS += -L/usr/X11R6/lib
-X11LIBS := -lX11 -lXext
-PDFVIEW_EXE = $(X11VIEW_EXE)
+X11_LIBS := -lX11 -lXext
ifeq "$(arch)" "amd64"
CFLAGS += -m64
LDFLAGS += -m64
@@ -54,11 +43,3 @@ CFLAGS += -m32
LDFLAGS += -m32
endif
endif
-
-# MinGW build depends on thirdparty libs
-ifeq "$(OS)" "MINGW"
-WINDRES ?= windres
-W32LIBS := -lgdi32 -lcomdlg32 -luser32 -ladvapi32 -lshell32 -mwindows
-PDFVIEW_EXE = $(WINVIEW_EXE)
-endif
-