summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-06-15 15:17:47 +0200
committerTor Andersson <tor@ghostscript.com>2010-06-15 15:17:47 +0200
commit7d5d5d8c77f6047113d762017fd829bd668f5b5e (patch)
tree84bf1d75254cbd96ff349a6ab1fa6b0a620bf9ba /Makefile
parent1746eaca2a013e39b29c4036caec88c3a0ba92d5 (diff)
downloadmupdf-7d5d5d8c77f6047113d762017fd829bd668f5b5e.tar.xz
Rearrange in Makerules and Makethird to remove cyclical dependencies.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 17 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 3f82484e..b0937aab 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
# GNU Makefile for MuPDF
#
-# make build=release prefix=/usr/local install
+# make build=release prefix=/usr/local verbose=true install
#
default: all
@@ -21,27 +21,31 @@ ifneq "$(pregen)" ""
GENDIR := $(pregen)
endif
-# Compiler flags and configuration options are kept in a separate file.
-# This file includes some tests based on variables set by Makethird.
+# Compiler flags and configuration options are kept in Makerules.
+# Thirdparty libs will be built by Makethird if the thirdparty
+# directory exists.
--include Makerules
-
-# Include makefile for third party libraries.
-# They will only be built if the thirdparty directory exists.
-# This changes some variables initially set in Makerules.
+LIBS := -lfreetype -ljbig2dec -lopenjpeg -ljpeg -lz -lm
+-include Makerules
-include Makethird
+CFLAGS += $(THIRD_INCS) $(SYS_FREETYPE_INC)
+LDFLAGS += $(SYS_FREETYPE_LIB)
+
#
# Build commands
#
-CFLAGS += $(THIRD_INCS)
+SILENT := @
+ifneq "$(verbose)" ""
+SILENT :=
+endif
-GENFILE_CMD = @ echo GENFILE $@ && $(firstword $^) $@ $(wordlist 2, 999, $^)
-CC_CMD = @ echo CC $@ && $(CC) -o $@ -c $< $(CFLAGS)
-LD_CMD = @ echo LD $@ && $(LD) -o $@ $^ $(LDFLAGS) $(LIBS)
-AR_CMD = @ echo AR $@ && $(AR) cru $@ $^
+GENFILE_CMD = $(SILENT) echo GENFILE $@ && $(firstword $^) $@ $(wordlist 2, 999, $^)
+CC_CMD = $(SILENT) echo CC $@ && $(CC) -o $@ -c $< $(CFLAGS)
+LD_CMD = $(SILENT) echo LD $@ && $(LD) -o $@ $^ $(LDFLAGS) $(LIBS)
+AR_CMD = $(SILENT) echo AR $@ && $(AR) cru $@ $^
#
# Directories