aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-10-15 19:58:36 +0200
committerTeddy Wing2018-10-15 19:58:36 +0200
commitc089d8cc157fc4298b0e2bca0f8665f7ffe5a8c7 (patch)
treeed6ce9dd2c428f7f7a0ce04430846ffe10c4421c
parenta7887d2c3282d6444ebb73b3f7a365c7d244a326 (diff)
downloaddome_key_event_source_simulator-c089d8cc157fc4298b0e2bca0f8665f7ffe5a8c7.tar.bz2
Makefile: Move `xcodebuild` steps into Make
I needed to remove the `-isysroot` compiler flag in order to get the static library to build in my Rust project without the ld: framework not found ColorSync for architecture x86_64 linker error (which is apparently caused by the fact that I'm building against a 10.13 SDK on a machine running 10.12, since ColorSync exists only on 10.13). Not sure if there's a way to have Xcode not use the `-isysroot` flag and let us continue to build using `xcodebuild`. Just copy-pasted the build output including exported environment variables. I removed machine-specific things like absolute paths to my home directory and the hash after the DerivedData directory. Not very clean, but it seems to work.
-rw-r--r--Makefile110
1 files changed, 108 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index b12c5de..8e234dd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,117 @@
SOURCES := dome_key_event_source_simulator/*
+OBJECT_DEBUG := ~/Library/Developer/Xcode/DerivedData/dome_key_event_source_simulator-*/Build/Intermediates.noindex/dome_key_event_source_simulator.build/Debug/dome_key_event_source_simulator.build/Objects-normal/x86_64/dome_key_event_source_simulator.o
LIB_DEBUG := ~/Library/Developer/Xcode/DerivedData/dome_key_event_source_simulator-*/Build/Products/Debug/libdome_key_event_source_simulator.a
.PHONY: build
build: $(LIB_DEBUG)
-$(LIB_DEBUG): $(SOURCES)
- xcodebuild -scheme dome_key_event_source_simulator -configuration Debug
+$(OBJECT_DEBUG): $(SOURCES)
+ LANG=en_US.US-ASCII \
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang \
+ -x objective-c \
+ -arch x86_64 \
+ -fmessage-length=104 \
+ -fdiagnostics-show-note-include-stack \
+ -fmacro-backtrace-limit=0 \
+ -fcolor-diagnostics \
+ -std=gnu11 \
+ -fmodules \
+ -fmodules-cache-path=${HOME}/Library/Developer/Xcode/DerivedData/ModuleCache \
+ -fmodules-prune-interval=86400 \
+ -fmodules-prune-after=345600 \
+ -fbuild-session-file=${HOME}/Library/Developer/Xcode/DerivedData/ModuleCache/Session.modulevalidation \
+ -fmodules-validate-once-per-build-session \
+ -Wnon-modular-include-in-framework-module \
+ -Werror=non-modular-include-in-framework-module \
+ -Wno-trigraphs \
+ -fpascal-strings \
+ -O0 \
+ -fno-common \
+ -Wno-missing-field-initializers \
+ -Wno-missing-prototypes \
+ -Werror=return-type \
+ -Wdocumentation \
+ -Wunreachable-code \
+ -Wno-implicit-atomic-properties \
+ -Werror=deprecated-objc-isa-usage \
+ -Werror=objc-root-class \
+ -Wno-arc-repeated-use-of-weak \
+ -Wduplicate-method-match \
+ -Wno-missing-braces \
+ -Wparentheses \
+ -Wswitch \
+ -Wunused-function \
+ -Wno-unused-label \
+ -Wno-unused-parameter \
+ -Wunused-variable \
+ -Wunused-value \
+ -Wempty-body \
+ -Wuninitialized \
+ -Wconditional-uninitialized \
+ -Wno-unknown-pragmas \
+ -Wno-shadow \
+ -Wno-four-char-constants \
+ -Wno-conversion \
+ -Wconstant-conversion \
+ -Wint-conversion \
+ -Wbool-conversion \
+ -Wenum-conversion \
+ -Wno-float-conversion \
+ -Wnon-literal-null-conversion \
+ -Wobjc-literal-conversion \
+ -Wshorten-64-to-32 \
+ -Wpointer-sign \
+ -Wno-newline-eof \
+ -Wno-selector \
+ -Wno-strict-selector-match \
+ -Wundeclared-selector \
+ -Wno-deprecated-implementations \
+ -DDEBUG=1 \
+ -DOBJC_OLD_DISPATCH_PROTOTYPES=0 \
+ -fasm-blocks \
+ -fstrict-aliasing \
+ -Wprotocol \
+ -Wdeprecated-declarations \
+ -mmacosx-version-min=10.6 \
+ -g \
+ -Wno-sign-conversion \
+ -Winfinite-recursion \
+ -Wcomma \
+ -Wblock-capture-autoreleasing \
+ -Wstrict-prototypes \
+ -Wunguarded-availability \
+ -index-store-path \
+ ${HOME}/Library/Developer/Xcode/DerivedData/dome_key_event_source_simulator-*/Index/DataStore \
+ -iquote \
+ ${HOME}/Library/Developer/Xcode/DerivedData/dome_key_event_source_simulator-*/Build/Intermediates.noindex/dome_key_event_source_simulator.build/Debug/dome_key_event_source_simulator.build/dome_key_event_source_simulator-generated-files.hmap \
+ -I${HOME}/Library/Developer/Xcode/DerivedData/dome_key_event_source_simulator-*/Build/Intermediates.noindex/dome_key_event_source_simulator.build/Debug/dome_key_event_source_simulator.build/dome_key_event_source_simulator-own-target-headers.hmap \
+ -I${HOME}/Library/Developer/Xcode/DerivedData/dome_key_event_source_simulator-*/Build/Intermediates.noindex/dome_key_event_source_simulator.build/Debug/dome_key_event_source_simulator.build/dome_key_event_source_simulator-all-target-headers.hmap \
+ -iquote \
+ ${HOME}/Library/Developer/Xcode/DerivedData/dome_key_event_source_simulator-*/Build/Intermediates.noindex/dome_key_event_source_simulator.build/Debug/dome_key_event_source_simulator.build/dome_key_event_source_simulator-project-headers.hmap \
+ -I${HOME}/Library/Developer/Xcode/DerivedData/dome_key_event_source_simulator-*/Build/Products/Debug/include \
+ -I${HOME}/Library/Developer/Xcode/DerivedData/dome_key_event_source_simulator-*/Build/Intermediates.noindex/dome_key_event_source_simulator.build/Debug/dome_key_event_source_simulator.build/DerivedSources/x86_64 \
+ -I${HOME}/Library/Developer/Xcode/DerivedData/dome_key_event_source_simulator-*/Build/Intermediates.noindex/dome_key_event_source_simulator.build/Debug/dome_key_event_source_simulator.build/DerivedSources \
+ -F${HOME}/Library/Developer/Xcode/DerivedData/dome_key_event_source_simulator-*/Build/Products/Debug \
+ -MMD \
+ -MT \
+ dependencies \
+ -MF \
+ ${HOME}/Library/Developer/Xcode/DerivedData/dome_key_event_source_simulator-*/Build/Intermediates.noindex/dome_key_event_source_simulator.build/Debug/dome_key_event_source_simulator.build/Objects-normal/x86_64/dome_key_event_source_simulator.d \
+ --serialize-diagnostics \
+ ${HOME}/Library/Developer/Xcode/DerivedData/dome_key_event_source_simulator-*/Build/Intermediates.noindex/dome_key_event_source_simulator.build/Debug/dome_key_event_source_simulator.build/Objects-normal/x86_64/dome_key_event_source_simulator.dia \
+ -c \
+ ${HOME}/Documents/Development/dome_key_event_source_simulator/dome_key_event_source_simulator/dome_key_event_source_simulator.m \
+ -o $@
+
+$(LIB_DEBUG): $(OBJECT_DEBUG)
+ MACOSX_DEPLOYMENT_TARGET=10.6 \
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool \
+ -static \
+ -arch_only x86_64 \
+ -L${HOME}/Library/Developer/Xcode/DerivedData/dome_key_event_source_simulator-*/Build/Products/Debug \
+ -filelist \
+ ${HOME}/Library/Developer/Xcode/DerivedData/dome_key_event_source_simulator-*/Build/Intermediates.noindex/dome_key_event_source_simulator.build/Debug/dome_key_event_source_simulator.build/Objects-normal/x86_64/dome_key_event_source_simulator.LinkFileList \
+ -o $@
.PHONY: clean
clean: