1
- .PHONY : build clean help
1
+ # standard arguments used in all ghostscript commands
2
+ PDF_ARGS=-sDEVICE =pdfwrite\
3
+ -dPDFA=1\
4
+ -sPDFACompatibilityPolicy=1\
5
+ -sColorConversionStrategy=RGB\
6
+ -sProcessColorModel=DeviceRGB\
7
+ -dNOPAUSE\
8
+ -dQUIET\
9
+ -dBATCH
10
+
11
+ # these will be optimized for "screen"
12
+ PDFS =ref/Intel\ Chips\ timeline.pdf\
13
+ ref/Intel\ 8085.pdf\
14
+ ref/MOS\ 6510.pdf
15
+
16
+ # these need special treatment
17
+ SPECIAL_PDFS =ref/Hitachi\ HD64180\ Hardware\ Manual\ 4th\ Edition.pdf\
18
+ ref/MOS\ MCS6500.pdf
19
+
20
+ .PHONY : build clean help pdfs
2
21
3
22
build : src/cpu-bitness.pdf # # Build the PDF document (default).
4
23
@@ -8,22 +27,29 @@ src/cpu-bitness.pdf: src/cpu-bitness.tex src/.cache/Tectonic
8
27
src/.cache/Tectonic :
9
28
mkdir -p src/.cache/Tectonic
10
29
11
- ref : ref/Hitachi\ HD64180\ Hardware\ Manual\ 4th\ Edition.pdf ref/Intel\ Chips\ timeline.pdf ref/Intel\ 8085.pdf # # Create screen optimized PDFs of original reference material
30
+ ref : pdfs # # Create screen optimized PDFs of original reference material
31
+
32
+ pdfs : $(PDFS ) $(SPECIAL_PDFS )
12
33
13
34
ref/Hitachi\ HD64180\ Hardware\ Manual\ 4th\ Edition.pdf : ref/originals/HD64180Z\ Hardware\ Manual\ 4th\ Edition.pdf
14
- gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 - dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH - dFirstPage=2 -dLastPage=2 -sOutputFile=/tmp/HD64180-1.pdf " $<"
15
- gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 - dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH - dFirstPage=18 -dLastPage=18 -sOutputFile=/tmp/HD64180-2.pdf " $<"
16
- gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 - dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH - dFirstPage=51 -dLastPage=57 -sOutputFile=/tmp/HD64180-3.pdf " $<"
17
- gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 - dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -dFirstPage=173 -dLastPage=182 -sOutputFile=/tmp/HD64180-4.pdf " $<"
18
- gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 - dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -dFirstPage=220 -dLastPage=220 -sOutputFile=/tmp/HD64180-5.pdf " $<"
19
- gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=" $@ " /tmp/HD64180-? .pdf
35
+ gs $( PDF_ARGS ) - dPDFSETTINGS=/screen -dFirstPage=2 -dLastPage=2 -sOutputFile=/tmp/HD64180-1.pdf " $<"
36
+ gs $( PDF_ARGS ) - dPDFSETTINGS=/screen -dFirstPage=18 -dLastPage=18 -sOutputFile=/tmp/HD64180-2.pdf " $<"
37
+ gs $( PDF_ARGS ) - dPDFSETTINGS=/screen -dFirstPage=51 -dLastPage=57 -sOutputFile=/tmp/HD64180-3.pdf " $<"
38
+ gs $( PDF_ARGS ) - dPDFSETTINGS=/screen -dFirstPage=173 -dLastPage=182 -sOutputFile=/tmp/HD64180-4.pdf " $<"
39
+ gs $( PDF_ARGS ) - dPDFSETTINGS=/screen -dFirstPage=220 -dLastPage=220 -sOutputFile=/tmp/HD64180-5.pdf " $<"
40
+ gs $( PDF_ARGS ) -sOutputFile=" $@ " /tmp/HD64180-? .pdf
20
41
rm /tmp/HD64180-? .pdf
21
42
22
43
ref/Intel\ Chips\ timeline.pdf : ref/originals/Intel\ Chips\ timeline.pdf
23
- gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.6 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=" $@ " " $<"
24
-
25
44
ref/Intel\ 8085.pdf : ref/originals/Intel\ 8085.pdf
26
- gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=" $@ " " $<"
45
+ ref/MOS\ 6510.pdf : ref/originals/MOS\ 6510.pdf
46
+
47
+ # doesn't contain OCR information and illegible with "screen" optimization
48
+ ref/MOS\ MCS6500.pdf : ref/originals/MOS\ MCS6500.pdf
49
+ gs $(PDF_ARGS ) -dPDFSETTINGS=/ebook -sOutputFile=" $@ " " $<"
50
+
51
+ $(PDFS ) :
52
+ gs $(PDF_ARGS ) -dPDFSETTINGS=/screen -sOutputFile=" $@ " " $<"
27
53
28
54
clean : # # Removes the generated PDF and Tectonic cache.
29
55
rm -rf src/cpu-bitness.pdf .cache
0 commit comments