mirror of
https://github.com/Ponce/slackbuilds
synced 2024-12-01 01:00:03 +01:00
3975534ad2
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
54 lines
2.7 KiB
Diff
54 lines
2.7 KiB
Diff
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -32,13 +32,6 @@
|
|
# CCICU=$(shell $(PKG_CONFIG) icu-uc --cflags) -DRE2_USE_ICU
|
|
# LDICU=$(shell $(PKG_CONFIG) icu-uc --libs)
|
|
|
|
-# Build against GoogleTest and Benchmark for... testing and benchmarking.
|
|
-# Capture only the `-L` flags for now; we will pass the `-l` flags later.
|
|
-CCGTEST=$(shell $(PKG_CONFIG) gtest gtest_main --cflags)
|
|
-LDGTEST=$(shell $(PKG_CONFIG) gtest gtest_main --libs-only-L)
|
|
-CCBENCHMARK=$(shell $(PKG_CONFIG) benchmark --cflags)
|
|
-LDBENCHMARK=$(shell $(PKG_CONFIG) benchmark --libs-only-L)
|
|
-
|
|
# To build against PCRE for testing and benchmarking,
|
|
# uncomment the next two lines:
|
|
# CCPCRE=-I/usr/local/include -DUSEPCRE
|
|
@@ -49,8 +42,8 @@
|
|
CXXFLAGS?=-O3 -g
|
|
LDFLAGS?=
|
|
# required
|
|
-RE2_CXXFLAGS?=-pthread -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -I. $(CCABSL) $(CCICU) $(CCGTEST) $(CCBENCHMARK) $(CCPCRE)
|
|
-RE2_LDFLAGS?=-pthread $(LDABSL) $(LDICU) $(LDGTEST) $(LDBENCHMARK) $(LDPCRE)
|
|
+RE2_CXXFLAGS?=-pthread -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -I. $(CCABSL) $(CCICU) $(CCPCRE)
|
|
+RE2_LDFLAGS?=-pthread $(LDABSL) $(LDICU) $(LDPCRE)
|
|
AR?=ar
|
|
ARFLAGS?=rsc
|
|
NM?=nm
|
|
@@ -242,22 +235,22 @@
|
|
.PRECIOUS: obj/dbg/test/%
|
|
obj/dbg/test/%: obj/dbg/libre2.a obj/dbg/re2/testing/%.o $(DTESTOFILES)
|
|
@mkdir -p obj/dbg/test
|
|
- $(CXX) -o $@ obj/dbg/re2/testing/$*.o $(DTESTOFILES) obj/dbg/libre2.a $(RE2_LDFLAGS) $(LDFLAGS) -lgtest -lgtest_main
|
|
+ $(CXX) -o $@ obj/dbg/re2/testing/$*.o $(DTESTOFILES) obj/dbg/libre2.a $(RE2_LDFLAGS) $(LDFLAGS)
|
|
|
|
.PRECIOUS: obj/test/%
|
|
obj/test/%: obj/libre2.a obj/re2/testing/%.o $(TESTOFILES)
|
|
@mkdir -p obj/test
|
|
- $(CXX) -o $@ obj/re2/testing/$*.o $(TESTOFILES) obj/libre2.a $(RE2_LDFLAGS) $(LDFLAGS) -lgtest -lgtest_main
|
|
+ $(CXX) -o $@ obj/re2/testing/$*.o $(TESTOFILES) obj/libre2.a $(RE2_LDFLAGS) $(LDFLAGS)
|
|
|
|
# Test the shared lib, falling back to the static lib for private symbols
|
|
.PRECIOUS: obj/so/test/%
|
|
obj/so/test/%: obj/so/libre2.$(SOEXT) obj/libre2.a obj/re2/testing/%.o $(TESTOFILES)
|
|
@mkdir -p obj/so/test
|
|
- $(CXX) -o $@ obj/re2/testing/$*.o $(TESTOFILES) -Lobj/so -lre2 obj/libre2.a $(RE2_LDFLAGS) $(LDFLAGS) -lgtest -lgtest_main
|
|
+ $(CXX) -o $@ obj/re2/testing/$*.o $(TESTOFILES) -Lobj/so -lre2 obj/libre2.a $(RE2_LDFLAGS) $(LDFLAGS)
|
|
|
|
obj/test/regexp_benchmark: obj/libre2.a obj/re2/testing/regexp_benchmark.o $(TESTOFILES)
|
|
@mkdir -p obj/test
|
|
- $(CXX) -o $@ obj/re2/testing/regexp_benchmark.o $(TESTOFILES) obj/libre2.a $(RE2_LDFLAGS) $(LDFLAGS) -lgtest -lbenchmark -lbenchmark_main
|
|
+ $(CXX) -o $@ obj/re2/testing/regexp_benchmark.o $(TESTOFILES) obj/libre2.a $(RE2_LDFLAGS) $(LDFLAGS)
|
|
|
|
obj/test/re2_fuzzer: obj/libre2.a obj/re2/fuzzing/re2_fuzzer.o
|
|
@mkdir -p obj/test
|