-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
62 lines (49 loc) · 2.66 KB
/
Makefile
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
#========================================================================
#
# pdftoxml Makefile
#
# author: Sophie Andrieu, Herve Dejean
# Xerox Research Centre Europe
# cpy XRCE 2007
#
#========================================================================
XPDF =xpdf_3.01
CC=gcc
CFLAGS=-Wall -I$(XPDF)
CXX=g++
CXXFLAGS=$(CFLAGS)
CXXFLAGSGOO=-I$(XPDF)\goo
CXXFLAGSFOFI=-I$(XPDF)\fofi
LIBPROG=ar
# Directories
DIRGOO=$(XPDF)\goo
DIRFOFI=$(XPDF)\fofi
DIRXPDF=$(XPDF)\xpdf
DIRSRC=src
DIREXE=exe
DIRLIBXML=libxml2-2.6.19+.win32
# Executable name
PDFTOXMLEXE=pdftoxml.exe
# Main target
all: pdftoxmlEXE
# Copy the file necessary for windows into aconf.h
copy:
copy $(XPDF)\aconf-win32.h $(XPDF)\aconf.h
# Target to compile files in src directory
compile.src: copy
$(CXX) $(CXXFLAGS) $(CXXFLAGSGOO) $(CXXFLAGSFOFI) -I$(DIRXPDF) -I$(DIRLIBXML)\lib -I$(DIRLIBXML)\include -Iiconv-1.9.1.win32\include -o $(DIRSRC)\ConstantsUtils.o -c $(DIRSRC)\ConstantsUtils.cc
$(CXX) $(CXXFLAGS) $(CXXFLAGSGOO) $(CXXFLAGSFOFI) -I$(DIRXPDF) -I$(DIRLIBXML)\lib -I$(DIRLIBXML)\include -Iiconv-1.9.1.win32\include -o $(DIRSRC)\ConstantsXML.o -c $(DIRSRC)\ConstantsXML.cc
$(CXX) $(CXXFLAGS) $(CXXFLAGSGOO) $(CXXFLAGSFOFI) -I$(DIRXPDF) -I$(DIRLIBXML)\lib -I$(DIRLIBXML)\include -Iiconv-1.9.1.win32\include -o $(DIRSRC)\Parameters.o -c $(DIRSRC)\Parameters.cc
$(CXX) $(CXXFLAGS) $(CXXFLAGSGOO) $(CXXFLAGSFOFI) -I$(DIRXPDF) -I$(DIRLIBXML)\lib -I$(DIRLIBXML)\include -Iiconv-1.9.1.win32\include -o $(DIRSRC)\AnnotsXrce.o -c $(DIRSRC)\AnnotsXrce.cc
$(CXX) $(CXXFLAGS) $(CXXFLAGSGOO) $(CXXFLAGSFOFI) -I$(DIRXPDF) -I$(DIRLIBXML)\lib -I$(DIRLIBXML)\include -Iiconv-1.9.1.win32\include -o $(DIRSRC)\PDFDocXrce.o -c $(DIRSRC)\PDFDocXrce.cc
$(CXX) $(CXXFLAGS) $(CXXFLAGSGOO) $(CXXFLAGSFOFI) -I$(DIRXPDF) -I$(DIRLIBXML)\lib -I$(DIRLIBXML)\include -Iiconv-1.9.1.win32\include -o $(DIRSRC)\XmlOutputdev.o -c $(DIRSRC)\XmlOutputdev.cc
$(CXX) $(CXXFLAGS) $(CXXFLAGSGOO) $(CXXFLAGSFOFI) -I$(DIRSRC) -I$(DIRXPDF) -I$(DIRLIBXML)\lib -I$(DIRLIBXML)\include -Iiconv-1.9.1.win32\include -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$(DIRLIBXML)\lib -I$(DIRLIBXML)\bin -I$(DIRLIBXML)\include -Iiconv-1.9.1.win32\include -o $(DIREXE)\$(PDFTOXMLEXE) $(DIRSRC)\pdftoxml.cc $(DIRSRC)\libsrc.a $(DIRXPDF)\libxpdf.a $(DIRGOO)\libGoo.a $(DIRFOFI)\libfofi.a $(DIRLIBXML)\bin\libxml2.dll
# Clean target to delete all .o files, .a files library and .exe files
clean:
del $(DIRSRC)\libsrc.a
del $(DIRSRC)\*.o
del $(DIREXE)\*.exe