This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
clang++ -std=c++11 -stdlib=libc++ tu1.cpp tu2.cpp main.cpp -o test | |
./test | |
if [ $? -eq 0 ] | |
then | |
echo "Success" | |
exit 0 | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CXX = xcrun clang++ | |
ARCH = i386 | |
CXXFLAGS = -O0 -mdynamic-no-pic | |
all: | |
${CXX} -arch ${ARCH} ${CXXFLAGS} -Wl,-read_only_relocs,suppress -dynamiclib test.cpp -o test.dylib | |
${CXX} -arch ${ARCH} ${CXXFLAGS} -Wl,-no_pie test.dylib main.cpp -o test | |
check: | |
DYLD_PRINT_WEAK_BINDINGS=YES ./test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# curl -O http://kent.dl.sourceforge.net/project/boost/boost/1.61.0/boost_1_61_0.tar.gz | |
# tar xvf boost_1_61_0.tar.gz | |
CXX = xcrun clang++ | |
ARCH = i386 | |
BOOST_DIR = boost_1_61_0 | |
CXXFLAGS = -O0 -mdynamic-no-pic -I${BOOST_DIR}/include | |
BOOST_SOURCES = ${BOOST_DIR}/libs/regex/src/c_regex_traits.cpp ${BOOST_DIR}/libs/regex/src/cpp_regex_traits.cpp ${BOOST_DIR}/libs/regex/src/cregex.cpp ${BOOST_DIR}/libs/regex/src/fileiter.cpp ${BOOST_DIR}/libs/regex/src/icu.cpp ${BOOST_DIR}/libs/regex/src/instances.cpp ${BOOST_DIR}/libs/regex/src/posix_api.cpp ${BOOST_DIR}/libs/regex/src/regex_debug.cpp ${BOOST_DIR}/libs/regex/src/regex_raw_buffer.cpp ${BOOST_DIR}/libs/regex/src/regex_traits_defaults.cpp ${BOOST_DIR}/libs/regex/src/regex.cpp ${BOOST_DIR}/libs/regex/src/static_mutex.cpp | |
all: |