From 96cf9e9799a5ab7d477ae7adafeefc246f07308d Mon Sep 17 00:00:00 2001 From: SCG82 Date: Mon, 16 Dec 2019 11:19:51 -0800 Subject: [PATCH] refine Makefile --- Makefile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 51200c1..51bc2fb 100644 --- a/Makefile +++ b/Makefile @@ -2,18 +2,19 @@ DESTDIR= PREFIX=/usr/local CXX=clang++ LD=$(shell xcrun -f clang++) -CXXFLAGS=-O2 -std=c++17 -mmacosx-version-min=10.13 -LDFLAGS=-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=-stdlib=libc++ -std=c++17 -Wl,-dead_strip -Wl,-headerpad_max_install_names -arch x86_64 -mmacosx-version-min=10.13 +LDLIBS= 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 - $(LD) ${LDFLAGS} -o ./dylibbundler ./Settings.o ./DylibBundler.o ./Dependency.o ./main.o ./Utils.o + $(CXX) $(CXXFLAGS) -I./src ./src/Settings.cpp -o ./Settings.o + $(CXX) $(CXXFLAGS) -I./src ./src/DylibBundler.cpp -o ./DylibBundler.o + $(CXX) $(CXXFLAGS) -I./src ./src/Dependency.cpp -o ./Dependency.o + $(CXX) $(CXXFLAGS) -I./src ./src/main.cpp -o ./main.o + $(CXX) $(CXXFLAGS) -I./src ./src/Utils.cpp -o ./Utils.o + $(LD) ${LDFLAGS} ${LDLIBS} -o ./dylibbundler ./Settings.o ./DylibBundler.o ./Dependency.o ./main.o ./Utils.o clean: rm -f *.o