refine Makefile

This commit is contained in:
SCG82 2019-12-16 11:19:51 -08:00
parent a5f8204d76
commit 96cf9e9799
1 changed files with 9 additions and 8 deletions

View File

@ -2,18 +2,19 @@ DESTDIR=
PREFIX=/usr/local PREFIX=/usr/local
CXX=clang++ CXX=clang++
LD=$(shell xcrun -f clang++) LD=$(shell xcrun -f clang++)
CXXFLAGS=-O2 -std=c++17 -mmacosx-version-min=10.13 CXXFLAGS=-c -pipe -stdlib=libc++ -O2 -std=c++17 -arch x86_64 -mmacosx-version-min=10.13
LDFLAGS=-std=c++17 -mmacosx-version-min=10.13 LDFLAGS=-stdlib=libc++ -std=c++17 -Wl,-dead_strip -Wl,-headerpad_max_install_names -arch x86_64 -mmacosx-version-min=10.13
LDLIBS=
all: dylibbundler all: dylibbundler
dylibbundler: dylibbundler:
$(CXX) $(CXXFLAGS) -c -I./src ./src/Settings.cpp -o ./Settings.o $(CXX) $(CXXFLAGS) -I./src ./src/Settings.cpp -o ./Settings.o
$(CXX) $(CXXFLAGS) -c -I./src ./src/DylibBundler.cpp -o ./DylibBundler.o $(CXX) $(CXXFLAGS) -I./src ./src/DylibBundler.cpp -o ./DylibBundler.o
$(CXX) $(CXXFLAGS) -c -I./src ./src/Dependency.cpp -o ./Dependency.o $(CXX) $(CXXFLAGS) -I./src ./src/Dependency.cpp -o ./Dependency.o
$(CXX) $(CXXFLAGS) -c -I./src ./src/main.cpp -o ./main.o $(CXX) $(CXXFLAGS) -I./src ./src/main.cpp -o ./main.o
$(CXX) $(CXXFLAGS) -c -I./src ./src/Utils.cpp -o ./Utils.o $(CXX) $(CXXFLAGS) -I./src ./src/Utils.cpp -o ./Utils.o
$(LD) ${LDFLAGS} -o ./dylibbundler ./Settings.o ./DylibBundler.o ./Dependency.o ./main.o ./Utils.o $(LD) ${LDFLAGS} ${LDLIBS} -o ./dylibbundler ./Settings.o ./DylibBundler.o ./Dependency.o ./main.o ./Utils.o
clean: clean:
rm -f *.o rm -f *.o