From 8cfb9cf1ac71b2d831bb982a634897567ea586ee Mon Sep 17 00:00:00 2001 From: Steven Dee Date: Thu, 10 Apr 2014 04:22:55 -0700 Subject: [PATCH] Ignore the strange earth-husk around cre2 --- Makefile | 15 ++++++++++----- outside/cre2/src/src/cre2.cpp | 16 ++++++++++++++++ 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index d68b97a353..7146d817fc 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,8 @@ LIB=$(PWD)/lib RM=rm -f CC=gcc +CXX=g++ +CXXFLAGS=$(CFLAGS) CLD=g++ -O2 -g -L/usr/local/lib -L/opt/local/lib YACC=bison -v -b$(GENERATED)/y LEX=lex @@ -527,6 +529,9 @@ BASE_OFILES=\ $(F_OFILES) \ $(J164_OFILES) +CRE2_OFILES=\ + outside/cre2/src/src/cre2.o + OUT_OFILES=\ outside/jhttp/http_parser.o @@ -547,20 +552,20 @@ V_OFILES=\ v/walk.o VERE_OFILES=\ - $(V_OFILES) \ $(BASE_OFILES) \ - $(OUT_OFILES) + $(CRE2_OFILES) \ + $(OUT_OFILES) \ + $(V_OFILES) LIBUV=outside/libuv/libuv.a -LIBCRE=outside/cre2/lib/libcre2.a all: $(BIN)/vere $(LIBUV): $(MAKE) -C outside/libuv libuv.a -$(LIBCRE): - cd outside/cre2/src && sh build.sh +$(CRE2_OFILES): outside/cre2/src/src/cre2.cpp outside/cre2/src/src/cre2.h + $(CXX) $(CXXFLAGS) -c $< -o $@ $(V_OFILES) f/loom.o f/trac.o: include/v/vere.h diff --git a/outside/cre2/src/src/cre2.cpp b/outside/cre2/src/src/cre2.cpp index 17819f6add..bb7f4b3c38 100644 --- a/outside/cre2/src/src/cre2.cpp +++ b/outside/cre2/src/src/cre2.cpp @@ -26,22 +26,38 @@ const char * cre2_version_string (void) { +#ifdef HAVE_CONFIG_H return cre2_VERSION_INTERFACE_STRING; +#else + return "0.0"; +#endif } int cre2_version_interface_current (void) { +#ifdef HAVE_CONFIG_H return cre2_VERSION_INTERFACE_CURRENT; +#else + return 0; +#endif } int cre2_version_interface_revision (void) { +#ifdef HAVE_CONFIG_H return cre2_VERSION_INTERFACE_REVISION; +#else + return 0; +#endif } int cre2_version_interface_age (void) { +#ifdef HAVE_CONFIG_H return cre2_VERSION_INTERFACE_AGE; +#else + return 0; +#endif }