2024-12-10 22:35:12 +01:00
|
|
|
|
#
|
|
|
|
|
# Makefile for PDFio examples.
|
|
|
|
|
#
|
|
|
|
|
# Copyright © 2024 by Michael R Sweet.
|
|
|
|
|
#
|
|
|
|
|
# Licensed under Apache License v2.0. See the file "LICENSE" for more
|
|
|
|
|
# information.
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
# POSIX makefile
|
|
|
|
|
.POSIX:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Common options
|
2024-12-21 17:31:54 +01:00
|
|
|
|
#CFLAGS = -g $(CPPFLAGS)
|
|
|
|
|
CFLAGS = -g -fsanitize=address $(CPPFLAGS)
|
2024-12-10 22:35:12 +01:00
|
|
|
|
CPPFLAGS = -I..
|
|
|
|
|
LIBS = -L.. -lpdfio -lz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Targets
|
|
|
|
|
TARGETS = \
|
|
|
|
|
code128 \
|
2024-12-19 22:43:21 +01:00
|
|
|
|
image2pdf \
|
|
|
|
|
md2pdf \
|
|
|
|
|
pdfioinfo
|
2024-12-10 22:35:12 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Make everything
|
|
|
|
|
all: $(TARGETS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Clean everything
|
|
|
|
|
clean:
|
|
|
|
|
rm -f $(TARGETS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# code128
|
|
|
|
|
code128: code128.c
|
|
|
|
|
$(CC) $(CFLAGS) -o $@ code128.c $(LIBS)
|
|
|
|
|
|
|
|
|
|
|
2024-12-19 22:43:21 +01:00
|
|
|
|
# image2pdf
|
|
|
|
|
image2pdf: image2pdf.c
|
|
|
|
|
$(CC) $(CFLAGS) -o $@ image2pdf.c $(LIBS)
|
|
|
|
|
|
|
|
|
|
|
2024-12-10 22:35:12 +01:00
|
|
|
|
# md2pdf
|
|
|
|
|
md2pdf: md2pdf.c mmd.c mmd.h
|
|
|
|
|
$(CC) $(CFLAGS) -o $@ md2pdf.c mmd.c $(LIBS)
|
|
|
|
|
|
|
|
|
|
|
2024-12-19 22:43:21 +01:00
|
|
|
|
# pdfioinfo
|
|
|
|
|
pdfioinfo: pdfioinfo.c
|
|
|
|
|
$(CC) $(CFLAGS) -o $@ pdfioinfo.c $(LIBS)
|
|
|
|
|
|
|
|
|
|
|
2024-12-10 22:35:12 +01:00
|
|
|
|
# Common dependencies...
|
|
|
|
|
$(TARGETS): Makefile ../pdfio.h ../pdfio-content.h
|