Multi-architecture build with make ARCH=x86.

This commit is contained in:
2025-08-25 21:14:51 -07:00
parent b322939812
commit a342b3eb3b

View File

@@ -7,15 +7,18 @@ FRAMEWORKS = -framework Cocoa -framework IOKit -framework ServiceManagement
MACOS_VERSION = 13.0
EXEC = Caffeine
ifeq ($(ARCH),X86)
TARGET = x86_64-apple-macos$(MACOS_VERSION)
else
TARGET = arm64-apple-macos$(MACOS_VERSION)
# TARGET = x86_64-apple-macos$(MACOS_VERSION)
endif
default: $(EXEC) $(EXEC).app
$(EXEC): main.m AppDelegate.m AppDelegate.h\
AboutViewController.m AboutViewController.h\
$(EXEC): main.m AppDelegate.m AppDelegate.h \
AboutViewController.m AboutViewController.h \
MenulessWindow.m MenulessWindow.h Helpers.m Helpers.h
$(CC) $(FLAGS) -target $(TARGET) -sectcreate __TEXT __info_plist\
$(CC) $(FLAGS) -target $(TARGET) -sectcreate __TEXT __info_plist \
Info.plist $(filter-out %.h, $^) $(FRAMEWORKS) -o $@
$(EXEC).app: $(EXEC)