diff options
author | auriamg <auria.mg@gmail.com> | 2018-04-18 01:36:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-18 01:36:26 +0300 |
commit | 9112011e71e96a393037152b2ef1df79c5fa9aeb (patch) | |
tree | b1142f0b7d34ea2ce5a8e1a40b499c5f1c141aa5 | |
parent | 7cf93807a1c786853337e5234ad50db8ea4bf40b (diff) | |
parent | 9ba6a91c31e4ee27813b759060d0a483f6c5877a (diff) |
Merge pull request #33 from pamarcos/travis_ci
Add 'isRpath' definition and Travis CI
-rw-r--r-- | .travis.yml | 11 | ||||
-rw-r--r-- | Makefile | 23 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | makefile | 22 | ||||
-rw-r--r-- | src/DylibBundler.cpp | 5 |
5 files changed, 41 insertions, 22 deletions
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ae1c770 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +language: cpp +os: osx +compiler: clang +osx_image: xcode9.3 + +script: + - make -j $(sysctl -n hw.ncpu) + +after_success: + - wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh + - bash upload.sh dylibbundler diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..07e6d39 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +DESTDIR= +PREFIX=/usr/local +CXXFLAGS = -O2 + +all: dylibbundler + +dylibbundler: + $(CXX) $(CXXFLAGS) -c -I./src ./src/Settings.cpp -o ./Settings.o + $(CXX) $(CXXFLAGS) -c -I./src ./src/DylibBundler.cpp -o ./DylibBundler.o + $(CXX) $(CXXFLAGS) -c -I./src ./src/Dependency.cpp -o ./Dependency.o + $(CXX) $(CXXFLAGS) -c -I./src ./src/main.cpp -o ./main.o + $(CXX) $(CXXFLAGS) -c -I./src ./src/Utils.cpp -o ./Utils.o + $(CXX) $(CXXFLAGS) -o ./dylibbundler ./Settings.o ./DylibBundler.o ./Dependency.o ./main.o ./Utils.o + +clean: + rm -f *.o + rm -f ./dylibbundler + +install: dylibbundler + cp ./dylibbundler $(DESTDIR)$(PREFIX)/bin/dylibbundler + chmod 775 $(DESTDIR)$(PREFIX)/bin/dylibbundler + +.PHONY: all clean install @@ -1,3 +1,5 @@ +[![Build Status](https://travis-ci.org/auriamg/macdylibbundler.svg?branch=master)](https://travis-ci.org/auriamg/macdylibbundler) + mac dylib bundler ================ diff --git a/makefile b/makefile deleted file mode 100644 index 9cec9f5..0000000 --- a/makefile +++ /dev/null @@ -1,22 +0,0 @@ -DESTDIR= -PREFIX=/usr/local - -all: dylibbundler - -dylibbundler: - $(CXX) -c -I./src ./src/Settings.cpp -o ./Settings.o - $(CXX) -c -I./src ./src/DylibBundler.cpp -o ./DylibBundler.o - $(CXX) -c -I./src ./src/Dependency.cpp -o ./Dependency.o - $(CXX) -c -I./src ./src/main.cpp -o ./main.o - $(CXX) -c -I./src ./src/Utils.cpp -o ./Utils.o - $(CXX) -o ./dylibbundler ./Settings.o ./DylibBundler.o ./Dependency.o ./main.o ./Utils.o - -clean: - rm -f *.o - rm -f ./dylibbundler - -install: dylibbundler - cp ./dylibbundler $(DESTDIR)$(PREFIX)/bin/dylibbundler - chmod 775 $(DESTDIR)$(PREFIX)/bin/dylibbundler - -.PHONY: all clean install diff --git a/src/DylibBundler.cpp b/src/DylibBundler.cpp index 62de7b9..2f6b0be 100644 --- a/src/DylibBundler.cpp +++ b/src/DylibBundler.cpp @@ -47,6 +47,11 @@ void changeLibPathsOnFile(std::string file_to_fix) } } +bool isRpath(const std::string& path) +{ + return path.find("@rpath") == 0; +} + void collectRpaths(const std::string& filename) { if (!fileExists(filename)) |