--- makefile 2024-09-30 00:05:50 +++ makefile.orig 2024-09-30 01:16:00 @@ -1,7 +1,7 @@ FRAMEWORK_PATH = -F/System/Library/PrivateFrameworks FRAMEWORK = -framework Carbon -framework Cocoa -framework CoreServices -framework CoreVideo -framework SkyLight CLI_FLAGS = -BUILD_FLAGS = -std=c11 -Wall -Wextra -g -O0 -fvisibility=hidden -mmacosx-version-min=11.0 -fno-objc-arc -arch x86_64 -arch arm64 -sectcreate __TEXT __info_plist $(INFO_PLIST) +CFLAGS += -std=c11 -Wall -Wextra -DNDEBUG -O3 -fvisibility=hidden -fno-objc-arc -arch x86_64 -arch arm64 -sectcreate __TEXT __info_plist $(INFO_PLIST) BUILD_PATH = ./bin DOC_PATH = ./doc SCRIPT_PATH = ./scripts @@ -24,12 +24,12 @@ tsan: BUILD_FLAGS=-std=c11 -Wall -Wextra -g -O0 -fvisibility=hidden -fsanitize=thread,undefined -mmacosx-version-min=11.0 -fno-objc-arc -arch x86_64 -arch arm64 -sectcreate __TEXT __info_plist $(INFO_PLIST) tsan: clean-build $(BINS) -install: BUILD_FLAGS=-std=c11 -Wall -Wextra -DNDEBUG -O3 -fvisibility=hidden -mmacosx-version-min=11.0 -fno-objc-arc -arch x86_64 -arch arm64 -sectcreate __TEXT __info_plist $(INFO_PLIST) install: clean-build $(BINS) + cp $(BINS) $(DESTDIR)/$(PREFIX)/$(BINS) $(OSAX_SRC): $(OSAX_PATH)/loader.m $(OSAX_PATH)/payload.m - xcrun clang $(OSAX_PATH)/payload.m -shared -fPIC -O3 -mmacosx-version-min=11.0 -arch x86_64 -arch arm64e -o $(OSAX_PATH)/payload $(FRAMEWORK_PATH) -framework SkyLight -framework Foundation -framework Carbon - xcrun clang $(OSAX_PATH)/loader.m -O3 -mmacosx-version-min=11.0 -arch x86_64 -arch arm64e -o $(OSAX_PATH)/loader -framework Cocoa + $(CC) $(OSAX_PATH)/payload.m -shared -fPIC -O3 -mmacosx-version-min=11.0 -arch x86_64 -arch arm64e -o $(OSAX_PATH)/payload $(FRAMEWORK_PATH) -framework SkyLight -framework Foundation -framework Carbon + $(CC) $(OSAX_PATH)/loader.m -O3 -mmacosx-version-min=11.0 -arch x86_64 -arch arm64e -o $(OSAX_PATH)/loader -framework Cocoa xxd -i -a $(OSAX_PATH)/payload $(OSAX_PATH)/payload_bin.c xxd -i -a $(OSAX_PATH)/loader $(OSAX_PATH)/loader_bin.c rm -f $(OSAX_PATH)/payload @@ -65,4 +65,4 @@ $(BUILD_PATH)/yabai: $(YABAI_SRC) mkdir -p $(BUILD_PATH) - xcrun clang $^ $(BUILD_FLAGS) $(CLI_FLAGS) $(FRAMEWORK_PATH) $(FRAMEWORK) -o $@ + $(CC) $^ $(CFLAGS) $(CLI_FLAGS) $(FRAMEWORK_PATH) $(FRAMEWORK) -o $@