added conditionals for debug builds and static linking.

Sat, 08 Mar 2003 07:23:49 +0000

author
eric
date
Sat, 08 Mar 2003 07:23:49 +0000
changeset 86
7de78f7789ef
parent 85
dcfd1d4b5c24
child 87
870a093b587c

added conditionals for debug builds and static linking.

Makefile file | annotate | diff | revisions
     1.1 diff -r dcfd1d4b5c24 -r 7de78f7789ef Makefile
     1.2 --- a/Makefile	Sat Mar 08 06:52:09 2003 +0000
     1.3 +++ b/Makefile	Sat Mar 08 07:23:49 2003 +0000
     1.4 @@ -1,6 +1,6 @@
     1.5  # t2p: build a PDF file out of one or more TIFF Class F Group 4 files
     1.6  # Makefile
     1.7 -# $Id: Makefile,v 1.18 2003/03/07 02:16:08 eric Exp $
     1.8 +# $Id: Makefile,v 1.19 2003/03/07 23:23:49 eric Exp $
     1.9  # Copyright 2001, 2002, 2003 Eric Smith <eric@brouhaha.com>
    1.10  #
    1.11  # This program is free software; you can redistribute it and/or modify
    1.12 @@ -19,13 +19,25 @@
    1.13  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111  USA
    1.14  
    1.15  
    1.16 -CFLAGS = -Wall -g
    1.17 +
    1.18 +DEBUG=1
    1.19 +# STATIC=1
    1.20 +
    1.21 +
    1.22 +CFLAGS = -Wall
    1.23 +LDFLAGS =
    1.24 +LDLIBS = -ltiff -ljpeg -lz -lm
    1.25  
    1.26 -# Panda is not all that common, so we'll statically link it in order to
    1.27 -# make the t2p binary more portable.
    1.28 +ifdef DEBUG
    1.29 +CFLAGS := $(CFLAGS) -g
    1.30 +LDFLAGS := $(LDFLAGS) -g
    1.31 +LDLIBS := $(LDLIBS) -lefence -lpthread
    1.32 +endif
    1.33  
    1.34 -LDFLAGS = -g
    1.35 -LDLIBS = -ltiff -lm
    1.36 +ifdef STATIC
    1.37 +LDLIBS := -Wl,-static $(LDLIBS)
    1.38 +endif
    1.39 +
    1.40  
    1.41  YACC = bison
    1.42  YFLAGS = -d -v
    1.43 @@ -36,7 +48,7 @@
    1.44  # let me know why so I can improve this Makefile.
    1.45  # -----------------------------------------------------------------------------
    1.46  
    1.47 -VERSION = 0.10
    1.48 +VERSION = 0.11
    1.49  
    1.50  PACKAGE = t2p
    1.51  
    1.52 @@ -64,8 +76,13 @@
    1.53  
    1.54  
    1.55  t2p: t2p.o scanner.o semantics.o parser.tab.o bitblt.o \
    1.56 -	pdf_g4.o \
    1.57 -	pdf.o pdf_util.o pdf_prim.o pdf_bookmark.o pdf_name_tree.o
    1.58 +		pdf_g4.o \
    1.59 +		pdf.o pdf_util.o pdf_prim.o pdf_bookmark.o pdf_name_tree.o
    1.60 +	$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
    1.61 +ifndef DEBUG
    1.62 +	strip $@
    1.63 +endif
    1.64 +
    1.65  
    1.66  bitblt_tables.h: bitblt_table_gen
    1.67  	./bitblt_table_gen >bitblt_tables.h