Skip to content

Commit

Permalink
Fix up targets.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Dec 4, 2023
1 parent c6f17cc commit 43000ff
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 55 deletions.
4 changes: 2 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ OBJS = \
testpdfio.o \
testttf.o
TARGETS = \
$(DSONAME) \
libpdfio.a \
$(LIBPDFIO) \
$(LIBPDFIO_STATIC) \
pdfiototext \
testpdfio \
testttf
Expand Down
68 changes: 19 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,71 +28,45 @@ PDFio requires the following to build the software:

- A C99 compiler such as Clang, GCC, or MS Visual C
- A POSIX-compliant `make` program
- ZLIB (<https://www.zlib.net>) 1.0 or higher
- ZLIB (<https://www.zlib.net>) 1.1 or higher

IDE files for Xcode (macOS/iOS) and Visual Studio (Windows) are also provided.


Documentation
-------------

See the man page (`pdfio.3`), frequently ask questions (`FAQ.md`), and full HTML
documentation (`pdfio.html`) for information on using PDFio.
See the man page (`pdfio.3`) and full HTML documentation (`pdfio.html`) for
information on using PDFio.


Installing pdfio
Installing PDFio
----------------

PDFio comes with a portable makefile that will work on any POSIX-compliant
system with ZLIB installed. To make it, run:
PDFio uses a configure script on Unix systems to generate a makefile:

make all
./configure

To test it, run:
If you want a shared library, run:

make test
./configure --enable-shared

To install it, run:
The default installation location is "/usr/local". Pass the `--prefix` option
to make to install it to another location:

make install
./configure --prefix=/some/other/directory

If you want a shared library, run:
Once configured, run the following to make the library:

make all

make all-shared
make install-shared
To test it, run:

The default installation location is "/usr/local". Pass the `prefix` variable
to make to install it to another location:
make test

make install prefix=/some/other/directory

The makefile installs the pdfio header to "${prefix}/include", the library to
"${prefix}/lib", the `pkg-config` file to "${prefix}/lib/pkgconfig", the man
page to "${prefix}/share/man/man3", and the documentation to
"${prefix}/share/doc/pdfio".

The makefile supports the following variables that can be specified in the make
command or as environment variables:

- `AR`: the library archiver (default "ar")
- `ARFLAGS`: options for the library archiver (default "cr")
- `CC`: the C compiler (default "cc")
- `CFLAGS`: options for the C compiler (default "")
- `CODESIGN_IDENTITY`: the identity to use when code signing the shared library
on macOS (default "Developer ID")
- `COMMONFLAGS`: options for the C compiler and linker (typically architecture
and optimization options, default is "-Os -g")
- `CPPFLAGS`: options for the C preprocessor (default "")
- `DESTDIR` and `DSTROOT`: specifies a root directory when installing
(default is "", specify only one)
- `DSOFLAGS`: options for the C compiler when linking the shared library
(default "")
- `LDFLAGS`: options for the C compiler when linking the test programs
(default "")
- `LIBS`: library options when linking the test programs (default "-lz")
- `RANLIB`: program that generates a table-of-contents in a library
(default "ranlib")
- `prefix`: specifies the installation directory (default "/usr/local")
To install it, run:

sudo make install


Visual Studio Project
Expand All @@ -111,10 +85,6 @@ generates a static library that will be installed under "/usr/local" with:

sudo xcodebuild install

You can reproduce this with the makefile using:

sudo make macos install


Legal Stuff
-----------
Expand Down
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,7 @@ Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-static do not install static library
--disable-shared do not install shared library
--enable-shared install shared library
--enable-debug turn on debugging, default=no
--enable-maintainer turn on maintainer mode, default=no
--enable-sanitizer build with AddressSanitizer, default=no
Expand Down Expand Up @@ -4111,7 +4111,7 @@ then :
fi
if test x$enable_shared != xno
if test x$enable_shared = xyes
then :
if test "$host_os_name" = darwin
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ AS_IF([$PKCONFIG --exists zlib], [

dnl Library target...
AC_ARG_ENABLE([static], AS_HELP_STRING([--disable-static], [do not install static library]))
AC_ARG_ENABLE([shared], AS_HELP_STRING([--disable-shared], [do not install shared library]))
AC_ARG_ENABLE([shared], AS_HELP_STRING([--enable-shared], [install shared library]))

AS_IF([test x$enable_shared != xno], [
AS_IF([test x$enable_shared = xyes], [
AS_IF([test "$host_os_name" = darwin], [
LIBPDFIO="libpdfio.1.dylib"
], [
Expand Down

0 comments on commit 43000ff

Please sign in to comment.