2024-12-10 16:35:12 -05:00
|
|
|
|
#
|
|
|
|
|
# Makefile for PDFio examples.
|
|
|
|
|
#
|
2025-01-10 14:54:11 -05:00
|
|
|
|
# Copyright © 2024-2025 by Michael R Sweet.
|
2024-12-10 16:35:12 -05:00
|
|
|
|
#
|
|
|
|
|
# Licensed under Apache License v2.0. See the file "LICENSE" for more
|
|
|
|
|
# information.
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
# POSIX makefile
|
|
|
|
|
.POSIX:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Common options
|
2024-12-26 15:12:56 -05:00
|
|
|
|
CFLAGS = -g $(CPPFLAGS)
|
|
|
|
|
#CFLAGS = -g -fsanitize=address $(CPPFLAGS)
|
|
|
|
|
CPPFLAGS = -I.. -I/usr/local/include
|
2025-01-10 20:18:06 +01:00
|
|
|
|
LIBS = -L.. -L/usr/local/lib -lpdfio -lz -lm
|
2024-12-10 16:35:12 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Targets
|
|
|
|
|
TARGETS = \
|
|
|
|
|
code128 \
|
2024-12-19 16:43:21 -05:00
|
|
|
|
image2pdf \
|
|
|
|
|
md2pdf \
|
2024-12-22 19:00:17 -05:00
|
|
|
|
pdf2text \
|
2024-12-19 16:43:21 -05:00
|
|
|
|
pdfioinfo
|
2024-12-10 16:35:12 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Make everything
|
|
|
|
|
all: $(TARGETS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Clean everything
|
|
|
|
|
clean:
|
|
|
|
|
rm -f $(TARGETS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# code128
|
|
|
|
|
code128: code128.c
|
|
|
|
|
$(CC) $(CFLAGS) -o $@ code128.c $(LIBS)
|
|
|
|
|
|
|
|
|
|
|
2024-12-19 16:43:21 -05:00
|
|
|
|
# image2pdf
|
|
|
|
|
image2pdf: image2pdf.c
|
|
|
|
|
$(CC) $(CFLAGS) -o $@ image2pdf.c $(LIBS)
|
|
|
|
|
|
|
|
|
|
|
2024-12-10 16:35:12 -05:00
|
|
|
|
# md2pdf
|
|
|
|
|
md2pdf: md2pdf.c mmd.c mmd.h
|
|
|
|
|
$(CC) $(CFLAGS) -o $@ md2pdf.c mmd.c $(LIBS)
|
|
|
|
|
|
|
|
|
|
|
2024-12-22 19:00:17 -05:00
|
|
|
|
# pdfio text extraction (demo, doesn't handle a lot of things yet)
|
|
|
|
|
pdf2text: pdf2text.c
|
|
|
|
|
$(CC) $(CFLAGS) -o $@ pdf2text.c $(LIBS)
|
|
|
|
|
|
|
|
|
|
|
2024-12-19 16:43:21 -05:00
|
|
|
|
# pdfioinfo
|
|
|
|
|
pdfioinfo: pdfioinfo.c
|
|
|
|
|
$(CC) $(CFLAGS) -o $@ pdfioinfo.c $(LIBS)
|
|
|
|
|
|
|
|
|
|
|
2024-12-10 16:35:12 -05:00
|
|
|
|
# Common dependencies...
|
|
|
|
|
$(TARGETS): Makefile ../pdfio.h ../pdfio-content.h
|