File: Makefile

package info (click to toggle)
pdfio 1.6.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,108 kB
  • sloc: ansic: 23,012; sh: 3,774; makefile: 237
file content (71 lines) | stat: -rw-r--r-- 1,266 bytes parent folder | download
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
#
# Makefile for PDFio examples.
#
# Copyright © 2024-2025 by Michael R Sweet.
#
# Licensed under Apache License v2.0.  See the file "LICENSE" for more
# information.
#

# POSIX makefile
.POSIX:


# Common options
CFLAGS		=	-g $(CPPFLAGS)
#CFLAGS		=	-g -fsanitize=address $(CPPFLAGS)
CPPFLAGS	=	-I.. $(shell PKG_CONFIG_PATH="..:$(PKG_CONFIG_PATH)" pkg-config pdfio --cflags)
LIBS		=	-L.. $(shell PKG_CONFIG_PATH="..:$(PKG_CONFIG_PATH)" pkg-config pdfio --libs)


# Targets
TARGETS		=	\
			code128 \
			image2pdf \
			md2pdf \
			pdf2text \
			pdfioinfo \
			pdfiomerge


# Make everything
all:	$(TARGETS)


# Clean everything
clean:
	rm -f $(TARGETS)


# code128
code128:	code128.c
	$(CC) $(CFLAGS) -o $@ code128.c $(LIBS)


# image2pdf
image2pdf:	image2pdf.c
	$(CC) $(CFLAGS) -o $@ image2pdf.c $(LIBS)


# md2pdf
md2pdf:		md2pdf.c mmd.c mmd.h
	$(CC) $(CFLAGS) -o $@ md2pdf.c mmd.c $(LIBS)


# pdfio text extraction (demo, doesn't handle a lot of things yet)
pdf2text:	pdf2text.c
	$(CC) $(CFLAGS) -o $@ pdf2text.c $(LIBS)


# pdfioinfo
pdfioinfo:	pdfioinfo.c
	$(CC) $(CFLAGS) -o $@ pdfioinfo.c $(LIBS)


# pdfiomerge
pdfiomerge:	pdfiomerge.c
	$(CC) $(CFLAGS) -o $@ pdfiomerge.c $(LIBS)


# Common dependencies...
$(TARGETS):	Makefile ../pdfio.h ../pdfio-content.h