-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile.linux64
68 lines (51 loc) · 2.37 KB
/
Makefile.linux64
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
#========================================================================
#
# pdftoxml Makefile
#
# author: Sophie Andrieu, Herve Dejean
# Xerox Research Centre Europe
# (c) cpry XRCE 2007
#
#========================================================================
#XPDF = ../xpdf-3.02-64
XPDF = ../xpdf-3.03
DIRPNG= ./image/png
DIRZLIB= ./image/zlib
CC=gcc
#CFLAGS=-Wall -I$(XPDF) -I/usr/include/glib-2.0 -I/usr/lib6Yp4-I/usr/lib64/glib-2.0/include
CFLAGS=-Wall -I$(XPDF) -I/usr/include/libxml2 -I/usr/lib64/include
CXX=g++
CXXFLAGS=$(CFLAGS)
CXXFLAGSGOO=-I$(XPDF)/goo
CXXFLAGSFOFI=-I$(XPDF)/fofi
LIBPROG=ar
DEL = rm
# Directories
DIRXPDF=$(XPDF)/xpdf
DIRGOO=$(XPDF)/goo
DIRPNG=./image/png
DIRZLIB=./image/zlib
DIRFOFI=$(XPDF)/fofi
DIRSRC=src
DIREXE=exe
# Executable name
PDFTOXMLEXE=pdftoxml.exe
# Main target
all: pdftoxmlEXE
compile.src:
$(CXX) $(CXXFLAGS) $(CXXFLAGSGOO) $(CXXFLAGSFOFI) -I$(DIRXPDF) -o $(DIRSRC)/ConstantsUtils.o -c $(DIRSRC)/ConstantsUtils.cc
$(CXX) $(CXXFLAGS) $(CXXFLAGSGOO) $(CXXFLAGSFOFI) -I$(DIRXPDF) -o $(DIRSRC)/ConstantsXML.o -c $(DIRSRC)/ConstantsXML.cc
$(CXX) $(CXXFLAGS) $(CXXFLAGSGOO) $(CXXFLAGSFOFI) -I$(DIRXPDF) -Ilibxml2 -o $(DIRSRC)/Parameters.o -c $(DIRSRC)/Parameters.cc
$(CXX) $(CXXFLAGS) $(CXXFLAGSGOO) $(CXXFLAGSFOFI) -I$(DIRXPDF) -I/usr/include/libxml2 -o $(DIRSRC)/AnnotsXrce.o -c $(DIRSRC)/AnnotsXrce.cc
$(CXX) $(CXXFLAGS) $(CXXFLAGSGOO) $(CXXFLAGSFOFI) -I$(DIRXPDF) -I/usr/include/libxml2 -o $(DIRSRC)/PDFDocXrce.o -c $(DIRSRC)/PDFDocXrce.cc
$(CXX) $(CXXFLAGS) $(CXXFLAGSGOO) $(CXXFLAGSFOFI) -I$(DIRXPDF) -I/usr/include/libxml2 -o $(DIRSRC)/XmlOutputDev.o -c $(DIRSRC)/XmlOutputDev.cc
$(CXX) $(CXXFLAGS) $(CXXFLAGSGOO) $(CXXFLAGSFOFI) -I$(DIRSRC) -I$(DIRXPDF) -I$(DIRPNG) -I$(DIRZLIB) -I/usr/include/libxml2 -o $(DIRSRC)/pdftoxml.o -c $(DIRSRC)/pdftoxml.cc
$(LIBPROG) -rc $(DIRSRC)/libsrc.a $(DIRSRC)/*.o
# Target to create the executable for pdftoxml (locate in exe directory)
pdftoxmlEXE: compile.src
$(CXX) $(CXXFLAGS) $(CXXFLAGSGOO) $(CXXFLAGSFOFI) -I$(DIRXPDF) -I$(DIRSRC) -I$(DIRPNG) -I$(DIRZLIB) -I/usr/include/libxml2 -o $(DIREXE)/$(PDFTOXMLEXE) $(DIRSRC)/pdftoxml.cc $(DIRSRC)/libsrc.a $(DIRXPDF)/libxpdf.a $(DIRGOO)/libGoo.a $(DIRFOFI)/libfofi.a $(DIRPNG)/libpng.a -lm -lxml2
# Clean target to delete all .o files, .a files library and .exe files
clean:
$(DEL) $(DIRSRC)/libsrc.a
$(DEL) $(DIRSRC)/*.o
$(DEL) $(DIREXE)/*.exe