zstd/zstd-lib-no-rebuild.patch

95 lines
3.6 KiB
Diff
Raw Normal View History

diff -Naur zstd-1.1.0.orig/contrib/pzstd/Makefile zstd-1.1.0.new/contrib/pzstd/Makefile
--- zstd-1.1.0.orig/contrib/pzstd/Makefile 2016-09-27 22:15:03.000000000 +0000
+++ zstd-1.1.0.new/contrib/pzstd/Makefile 2016-10-06 11:01:38.436955726 +0000
@@ -37,9 +37,8 @@
all: pzstd
-libzstd.a: $(ZSTD_FILES)
+$(ZSTDDIR)/libzstd.a: $(ZSTD_FILES)
$(MAKE) -C $(ZSTDDIR) libzstd
- @cp $(ZSTDDIR)/libzstd.a .
Pzstd.o: Pzstd.h Pzstd.cpp ErrorHolder.h utils/*.h
$(CXX) $(FLAGS) -c Pzstd.cpp -o $@
@@ -53,12 +52,11 @@
main.o: main.cpp *.h utils/*.h
$(CXX) $(FLAGS) -c main.cpp -o $@
-pzstd: Pzstd.o SkippableFrame.o Options.o main.o libzstd.a
+pzstd: Pzstd.o SkippableFrame.o Options.o main.o $(ZSTDDIR)/libzstd.a
$(CXX) $(FLAGS) $^ -o $@$(EXT) -lpthread
-libzstd32.a: $(ZSTD_FILES)
+$(ZSTDDIR)/libzstd32.a: $(ZSTD_FILES)
$(MAKE) -C $(ZSTDDIR) libzstd MOREFLAGS="-m32"
- @cp $(ZSTDDIR)/libzstd.a libzstd32.a
Pzstd32.o: Pzstd.h Pzstd.cpp ErrorHolder.h utils/*.h
$(CXX) -m32 $(FLAGS) -c Pzstd.cpp -o $@
@@ -94,7 +92,7 @@
cd googletest/build && cmake -G "MSYS Makefiles" .. && $(MAKE)
test:
- $(MAKE) libzstd.a
+ $(MAKE) $(ZSTDDIR)/libzstd.a
$(MAKE) pzstd MOREFLAGS="-Wall -Wextra -pedantic -Werror"
$(MAKE) -C utils/test clean
$(MAKE) -C utils/test test MOREFLAGS="-Wall -Wextra -pedantic -Werror"
@@ -102,7 +100,7 @@
$(MAKE) -C test test MOREFLAGS="-Wall -Wextra -pedantic -Werror"
test32:
- $(MAKE) libzstd.a MOREFLAGS="-m32"
+ $(MAKE) $(ZSTDDIR)/libzstd.a MOREFLAGS="-m32"
$(MAKE) pzstd MOREFLAGS="-m32 -Wall -Wextra -pedantic -Werror"
$(MAKE) -C utils/test clean
$(MAKE) -C utils/test test MOREFLAGS="-m32 -Wall -Wextra -pedantic -Werror"
@@ -114,5 +112,5 @@
$(MAKE) -C $(ZSTDDIR) clean
$(MAKE) -C utils/test clean
$(MAKE) -C test clean
- @$(RM) -rf libzstd.a *.o pzstd$(EXT) pzstd32$(EXT)
+ @$(RM) -rf $(ZSTDDIR)/libzstd.a *.o pzstd$(EXT) pzstd32$(EXT)
@echo Cleaning completed
diff -Naur zstd-1.1.0.orig/contrib/pzstd/test/Makefile zstd-1.1.0.new/contrib/pzstd/test/Makefile
--- zstd-1.1.0.orig/contrib/pzstd/test/Makefile 2016-09-27 22:15:03.000000000 +0000
+++ zstd-1.1.0.new/contrib/pzstd/test/Makefile 2016-10-06 12:46:21.768547487 +0000
@@ -30,10 +30,10 @@
FLAGS = $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS)
datagen.o: $(PROGDIR)/datagen.*
- $(CC) $(CPPFLAGS) -O3 $(MOREFLAGS) $(LDFLAGS) -Wno-long-long -Wno-variadic-macros $(PROGDIR)/datagen.c -c -o $@
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(MOREFLAGS) $(LDFLAGS) -Wno-long-long -Wno-variadic-macros $(PROGDIR)/datagen.c -c -o $@
%: %.cpp *.h datagen.o
- $(CXX) $(FLAGS) $@.cpp datagen.o $(PZSTDDIR)/Pzstd.o $(PZSTDDIR)/SkippableFrame.o $(PZSTDDIR)/Options.o $(PZSTDDIR)/libzstd.a -o $@$(EXT) $(GTEST_FLAGS) -lgtest -lgtest_main -lpthread
+ $(CXX) $(FLAGS) $@.cpp datagen.o $(PZSTDDIR)/Pzstd.o $(PZSTDDIR)/SkippableFrame.o $(PZSTDDIR)/Options.o $(ZSTDDIR)/libzstd.a -o $@$(EXT) $(GTEST_FLAGS) -lgtest -lgtest_main -lpthread
.PHONY: test clean
diff -Naur zstd-1.1.0.orig/lib/Makefile zstd-1.1.0.new/lib/Makefile
--- zstd-1.1.0.orig/lib/Makefile 2016-09-27 22:15:03.000000000 +0000
+++ zstd-1.1.0.new/lib/Makefile 2016-10-06 10:56:25.612493000 +0000
2016-10-03 14:17:14 +00:00
@@ -57,9 +57,9 @@
.PHONY: default all clean install uninstall
-default: clean libzstd
+default: libzstd
-all: clean libzstd
+all: libzstd
libzstd: $(ZSTD_FILES)
@echo compiling static library
@@ -89,7 +89,7 @@
-e 's|@VERSION@|$(VERSION)|' \
$< >$@
-install: libzstd libzstd.pc
+install: libzstd.pc
@install -d -m 755 $(DESTDIR)$(LIBDIR)/pkgconfig/ $(DESTDIR)$(INCLUDEDIR)/
@install -m 755 libzstd.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_VER)
@cp -a libzstd.$(SHARED_EXT_MAJOR) $(DESTDIR)$(LIBDIR)