From 837452d284ec687ba4dd7cdf8493bf4bdde6d426 Mon Sep 17 00:00:00 2001 From: Eric Smith Date: Sat, 8 Mar 2003 07:23:49 +0000 Subject: [PATCH] added conditionals for debug builds and static linking. --- Makefile | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 8f969d6..af23a3c 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # t2p: build a PDF file out of one or more TIFF Class F Group 4 files # Makefile -# $Id: Makefile,v 1.18 2003/03/07 02:16:08 eric Exp $ +# $Id: Makefile,v 1.19 2003/03/07 23:23:49 eric Exp $ # Copyright 2001, 2002, 2003 Eric Smith # # This program is free software; you can redistribute it and/or modify @@ -19,13 +19,25 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA -CFLAGS = -Wall -g -# Panda is not all that common, so we'll statically link it in order to -# make the t2p binary more portable. +DEBUG=1 +# STATIC=1 + + +CFLAGS = -Wall +LDFLAGS = +LDLIBS = -ltiff -ljpeg -lz -lm + +ifdef DEBUG +CFLAGS := $(CFLAGS) -g +LDFLAGS := $(LDFLAGS) -g +LDLIBS := $(LDLIBS) -lefence -lpthread +endif + +ifdef STATIC +LDLIBS := -Wl,-static $(LDLIBS) +endif -LDFLAGS = -g -LDLIBS = -ltiff -lm YACC = bison YFLAGS = -d -v @@ -36,7 +48,7 @@ YFLAGS = -d -v # let me know why so I can improve this Makefile. # ----------------------------------------------------------------------------- -VERSION = 0.10 +VERSION = 0.11 PACKAGE = t2p @@ -64,8 +76,13 @@ all: $(TARGETS) t2p: t2p.o scanner.o semantics.o parser.tab.o bitblt.o \ - pdf_g4.o \ - pdf.o pdf_util.o pdf_prim.o pdf_bookmark.o pdf_name_tree.o + pdf_g4.o \ + pdf.o pdf_util.o pdf_prim.o pdf_bookmark.o pdf_name_tree.o + $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@ +ifndef DEBUG + strip $@ +endif + bitblt_tables.h: bitblt_table_gen ./bitblt_table_gen >bitblt_tables.h