File: Makefile.Debian

package info (click to toggle)
pdftk 2.02-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 10,872 kB
  • ctags: 19,111
  • sloc: java: 121,754; cpp: 6,336; makefile: 68; sh: 8
file content (76 lines) | stat: -rwxr-xr-x 2,873 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# -*- Mode: Makefile -*-
# Makefile.Debian
# Copyright (c) 2004-2012 Steward and Lee, LLC
# This is part of pdftk.
#
# Visit: www.pdftk.com for pdftk information and articles
# Permalink: http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
#
# Please email Sid Steward with questions or bug reports.
# Include "pdftk" in the subject line to ensure successful delivery:
# sid.steward at pdflabs dot com

# Brief Instructions
#
#   Compile:             make -f Makefile.Debian
#   Install (as root):   make -f Makefile.Debian install
#   Uninstall:           make -f Makefile.Debian uninstall
#   Clean:               make -f Makefile.Debian clean
# 	 								

# tools
# need direct path to libgcj for gcjh (starting in gcj 4.1.2 per Aurélien GÉRÔME)
TOOLPATH=
export VERSUFF=
export CPP= $(TOOLPATH)cpp$(VERSUFF)
export CXX= $(TOOLPATH)g++$(VERSUFF)
export GCJ= $(TOOLPATH)gcj$(VERSUFF)
export GCJH= $(TOOLPATH)gcjh$(VERSUFF)
export GJAR= $(TOOLPATH)gjar$(VERSUFF)
export LIBGCJ= /usr/share/java/libgcj$(VERSUFF).jar
export AR= ar
export RM= rm
export ARFLAGS= rs
export RMFLAGS= -vf

# pdftk compiler flags; 0x2f is a forward slash; 0x5c is a backslash
# if you want pdftk to ask before overwriting a file, set
# ASK_ABOUT_WARNINGS to true; otherwise: false; override this default
# with the dont_ask or do_ask command-line options
#
# drop CXXFLAG -O3 due to template inlining causing:
# "error: mixing C++ and Java catches in a single translation unit" per Andrew Haley;
# fix added for gcc-4.3; this problem might be fixed in 4.4
#
# GCJFLAG -O3 causes pdftk to segfault (during a cat operation) when compiled on sarge using gcc 3.4.4
# per Johann Felix Soden:
# In gcc 4.3 "-O3" gives an error. This is fixed in PR C++/39380 which is at least in debian's gcc 4.4.1-4
#
# GCJFLAG -fsource=1.3 identifies the version of the java source
#
# when building/using a shared itext library:
#   CXXFLAGS: -fpic (or-fPIC)
#   GCJFLAGS: -Wl,-Bsymbolic -fpic (or -fPIC) -Wl,-rpath,/usr/lib/gcj
# stock pdftk links statically against its own, modified itext library
#
# -findirect-dispatch
# introduced in gcj 4:
# "Using that option causes GCJ to generate native code for classes and methods that follow the precise same binary compatibility rules as described in the Java Language Specification."
# http://lwn.net/Articles/130796/
# omitted because it caused linking errors using gcc 4.4; it also seems to make a larger binary
#
# -Wl,--as-needed
# see: http://www.gentoo.org/proj/en/qa/asneeded.xml
# only effects libraries following option on the command line
#
#  
export CPPFLAGS+= -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers
export CXXFLAGS+= -Wall -Wextra -Weffc++ -O2
export GCJFLAGS+= -fsource=1.3 -O2
export GCJHFLAGS+= -force
export LDLIBS= -lgcj

include Makefile.Base

# required packages (xubuntu 12.04)
# gcj-jdk, g++