summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2011-02-02 16:13:35 +0000
committerTor Andersson <tor@ghostscript.com>2011-02-02 16:13:35 +0000
commit8a4241e2fd1321a8d549a372dd163beff78a7047 (patch)
treeda647b9781890de12dbc002bdf38de90b4a583d0
parent333860c5c9c4539f36d3bd0716bc696a6ebddd0f (diff)
downloadmupdf-8a4241e2fd1321a8d549a372dd163beff78a7047.tar.xz
Use BINDIR, LIBDIR and INCDIR variables for installation directories instead of hard coding the use of /bin etc.
-rw-r--r--Makefile12
-rw-r--r--Makerules5
2 files changed, 13 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 178ae584..19ca9adf 100644
--- a/Makefile
+++ b/Makefile
@@ -377,8 +377,12 @@ clean:
nuke:
rm -rf build
+BINDIR ?= $(prefix)/bin
+LIBDIR ?= $(prefix)/lib
+INCDIR ?= $(prefix)/include
+
install: $(OBJDIR) $(GENDIR) $(MUPDF_LIB) $(APPS)
- install -d $(prefix)/bin $(prefix)/lib $(prefix)/include
- install $(APPS) $(prefix)/bin
- install $(MUPDF_LIB) $(prefix)/lib
- install $(MUPDF_HDR) $(prefix)/include
+ install -d $(BINDIR) $(LIBDIR) $(INCDIR)
+ install $(APPS) $(BINDIR)
+ install $(MUPDF_LIB) $(LIBDIR)
+ install $(MUPDF_HDR) $(INCDIR)
diff --git a/Makerules b/Makerules
index ef7c3732..01c45df0 100644
--- a/Makerules
+++ b/Makerules
@@ -11,6 +11,11 @@ ifeq "$(build)" "debug"
CFLAGS += -pipe -g
endif
+ifeq "$(build)" "profile"
+CFLAGS += -pipe -O2 -DNDEBUG -pg
+LDFLAGS += -pg
+endif
+
ifeq "$(build)" "release"
CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer
endif