SHARE
TWEET

Untitled

a guest May 19th, 2017 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 1470 libzstd.a:
  2. 1471         -rm -rf zstd-$(ZSTD_VER)
  3. 1472         curl -O -L ${ZSTD_DOWNLOAD_BASE}/v$(ZSTD_VER).tar.gz
  4. 1473         mv v$(ZSTD_VER).tar.gz zstd-$(ZSTD_VER).tar.gz
  5. 1474         ZSTD_SHA256_ACTUAL=`$(SHA256_CMD) zstd-$(ZSTD_VER).tar.gz | cut -d ' ' -f 1`; \
  6. 1475         if [ "$(ZSTD_SHA256)" != "$$ZSTD_SHA256_ACTUAL" ]; then \
  7. 1476                 echo zstd-$(ZSTD_VER).tar.gz checksum mismatch, expected=\"$(ZSTD_SHA256)\" actual=\"$$ZSTD_SHA256_ACTUAL\"; \
  8. 1477                 exit 1; \
  9. 1478         fi
  10. 1479         tar xvzf zstd-$(ZSTD_VER).tar.gz
  11. 1480         cd zstd-$(ZSTD_VER)/lib && make CFLAGS='-fPIC -O2 ${EXTRA_CFLAGS}' all
  12. 1481         cp zstd-$(ZSTD_VER)/lib/libzstd.a .
  13. 1482
  14. 1483 # A version of each $(LIBOBJECTS) compiled with -fPIC and a fixed set of static compression libraries
  15. 1484 java_static_libobjects = $(patsubst %,jls/%,$(LIBOBJECTS))
  16. 1485 CLEAN_FILES += jls
  17. 1486
  18. 1487 JAVA_STATIC_FLAGS = -DZLIB -DBZIP2 -DSNAPPY -DLZ4 -DZSTD
  19. 1488 JAVA_STATIC_INCLUDES = -I./zlib-$(ZLIB_VER) -I./bzip2-$(BZIP2_VER) -I./snappy-$(SNAPPY_VER) -I./lz4-$(LZ4_VER)/lib -I./zstd-$(ZSTD_VER)/lib
  20. 1489
  21. 1490 $(java_static_libobjects): jls/%.o: %.cc libz.a libbz2.a libsnappy.a liblz4.a libzstd.a
  22. 1491         $(AM_V_CC)mkdir -p $(@D) && $(CXX) $(CXXFLAGS) $(JAVA_STATIC_FLAGS) $(JAVA_STATIC_INCLUDES) -fPIC -c $< -o $@ $(COVERAGEFLAGS)
  23. 1492
  24. 1493 rocksdbjavastatic: $(java_static_libobjects)
  25. 1494         cd java;$(MAKE) javalib;
  26. 1495         rm -f ./java/target/$(ROCKSDBJNILIB)
  27. 1496         $(CXX) $(CXXFLAGS) -I./java/. $(JAVA_INCLUDE) -shared -fPIC \
  28. 1497           -o ./java/target/$(ROCKSDBJNILIB) $(JNI_NATIVE_SOURCES) \
  29. 1498           $(java_static_libobjects) $(COVERAGEFLAGS) \
  30. 1499           libz.a libbz2.a libsnappy.a liblz4.a $(JAVA_STATIC_LDFLAGS)
  31. 1500         cd java/target;strip -S -x $(ROCKSDBJNILIB)
  32. 1501         cd java;jar -cf target/$(ROCKSDB_JAR) HISTORY*.md
  33. 1502         cd java/target;jar -uf $(ROCKSDB_JAR) $(ROCKSDBJNILIB)
  34. 1503         cd java/target/classes;jar -uf ../$(ROCKSDB_JAR) org/rocksdb/*.class org/rocksdb/util/*.class
  35. 1504         cd java/target/apidocs;jar -cf ../$(ROCKSDB_JAVADOCS_JAR) *
  36. 1505         cd java/src/main/java;jar -cf ../../../target/$(ROCKSDB_SOURCES_JAR) org
RAW Paste Data
Top