Makefiles and various changes.
This commit is contained in:
19
src/Makefile
19
src/Makefile
@@ -1,3 +1,6 @@
|
||||
APPLE_DEVELOPMENT := $(shell cat ../ids/APPLE_DEVELOPMENT)
|
||||
APPLE_DEVELOPER_ID_APPLICATION := $(shell cat ../ids/APPLE_DEVELOPER_ID_APPLICATION)
|
||||
|
||||
FLAGS = -g
|
||||
CFLAGS = -g
|
||||
#-O
|
||||
@@ -23,12 +26,6 @@ FRAMEWORKS = -framework AppKit -framework ServiceManagement
|
||||
|
||||
default: $(EXEC).app
|
||||
|
||||
# HACK: Target is getting touched because timestamps of the generated
|
||||
# object file don't change unless there's an actual change in the
|
||||
# outputted object code. This results in this target running every
|
||||
# single time. I'm not sure whether that's the exact reason, but
|
||||
# I can't imagine why timestamps wouldn't change. When clang
|
||||
# generates same exact executable, timestamps do change.
|
||||
./arm64/%.o: %.swift
|
||||
swift -frontend -c \
|
||||
-target arm64-apple-macos$(MACOS_VERSION) $(FLAGS) \
|
||||
@@ -86,11 +83,11 @@ $(EXEC).app: $(EXEC)
|
||||
mkdir -p $@/Contents/Resources/ && \
|
||||
cp Info.plist $@/Contents/ && \
|
||||
cp resources/AppIcon.icns $@/Contents/Resources/ && \
|
||||
cp $(EXEC) $@/Contents/MacOS/
|
||||
# $(if $(DEBUG), codesign --entitlements Grapp.entitlements \
|
||||
# -s ${APPLE_DEVELOPMENT} -f --timestamp -o runtime $(EXEC).app, \
|
||||
# codesign -s ${APPLE_DEVELOPER_ID_APPLICATION} -f --timestamp \
|
||||
# -o runtime $(EXEC).app)
|
||||
cp $(EXEC) $@/Contents/MacOS/ && \
|
||||
$(if $(DEBUG), codesign --entitlements Grapp.entitlements \
|
||||
-s ${APPLE_DEVELOPMENT} -f --timestamp -o runtime $(EXEC).app, \
|
||||
codesign -s ${APPLE_DEVELOPER_ID_APPLICATION} -f --timestamp \
|
||||
-o runtime $(EXEC).app)
|
||||
|
||||
clean:
|
||||
rm -rf $(EXEC) $(EXEC).app arm64 x86_64
|
||||
|
||||
Reference in New Issue
Block a user