Makefile: Use pcre-config to get include/lib paths etc

This commit is contained in:
Ville Skyttä 2011-10-28 21:20:19 +02:00 committed by Daniel Marjamäki
parent 979f3b051c
commit b69ad0fefc
2 changed files with 6 additions and 6 deletions

View File

@ -10,11 +10,11 @@ ifndef CXXFLAGS
endif
ifeq ($(HAVE_RULES),yes)
CXXFLAGS += -DHAVE_RULES
CXXFLAGS += -DHAVE_RULES $(shell pcre-config --cflags)
ifdef LIBS
LIBS += -lpcre
LIBS += $(shell pcre-config --libs)
else
LIBS=-lpcre
LIBS=$(shell pcre-config --libs)
endif
endif

View File

@ -239,11 +239,11 @@ int main(int argc, char **argv)
}
fout << "ifeq ($(HAVE_RULES),yes)\n"
<< " CXXFLAGS += -DHAVE_RULES\n"
<< " CXXFLAGS += -DHAVE_RULES $(shell pcre-config --cflags)\n"
<< " ifdef LIBS\n"
<< " LIBS += -lpcre\n"
<< " LIBS += $(shell pcre-config --libs)\n"
<< " else\n"
<< " LIBS=-lpcre\n"
<< " LIBS=$(shell pcre-config --libs)\n"
<< " endif\n"
<< "endif\n\n";