Skip to content

Commit

Permalink
add support for custom static libpcre
Browse files Browse the repository at this point in the history
When building, the Makefile now checks if ../pcre exists and uses it for
the libpcre include and library files.  It assumes that such a libpcre
should be linked statically with libbitconvert.  This option is useful on
systems where a binary distributable that uses libbitconvert should contain
both libbitconvert and libpcre, such as on Windows and Mac OS X.
  • Loading branch information
ossguy committed May 25, 2009
1 parent c2bf2fd commit 5e85f7d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Expand Up @@ -17,8 +17,11 @@

# remove gcc-specific options in CFLAGS to use a different CC
CC = gcc
CFLAGS = -ansi -pedantic -Wall -Wextra -Werror
LDFLAGS = -lpcre

# if ../pcre exists, assume it contains a static libpcre and use it
CFLAGS = -ansi -pedantic -Wall -Wextra -Werror \
$(shell test -d ../pcre && echo -I../pcre -DPCRE_STATIC=1)
LDFLAGS = $(shell test -d ../pcre && echo -L../pcre) -lpcre

.PHONY: all clean

Expand Down

0 comments on commit 5e85f7d

Please sign in to comment.