Makefiles are now better at handling -j.

This commit is contained in:
2025-03-22 19:18:34 -07:00
parent e866f0e466
commit c463c71375
4 changed files with 40 additions and 30 deletions
+8 -6
View File
@@ -10,21 +10,23 @@ EXEC = cmdbar_updater
FRAMEWORKS = -framework AppKit
default: prereq $(EXEC)
prereq:
@mkdir -p arm64 x86_64
./arm64/$(EXEC): $(FILES)
$(CC) -target arm64-apple-macos$(MACOS_VERSION) $(FLAGS) $^ \
$(FRAMEWORKS) -o $@
./x86_64/$(EXEC): $(FILES)
$(CC) -target x86_64-apple-macos$(MACOS_VERSION) $(FLAGS) $^ \
@$(CC) -target x86_64-apple-macos$(MACOS_VERSION) $(FLAGS) $^ \
$(FRAMEWORKS) -o $@
$(EXEC): ./arm64/$(EXEC) ./x86_64/$(EXEC)
lipo -create -output $(EXEC) $^ && \
$(EXEC): prereq ./arm64/$(EXEC) ./x86_64/$(EXEC)
lipo -create -output $(EXEC) $(filter-out prereq, $^) && \
codesign -s ${APPLE_DEVELOPER_ID_APPLICATION} -f --timestamp \
-o runtime $(EXEC)
all: $(EXEC)
clean:
rm -rf arm64 x86_64 $(EXEC)
mkdir arm64 x86_64