2020-03-29 10:22:38 +00:00
|
|
|
FRAMEWORK_PATH = -F/System/Library/PrivateFrameworks
|
|
|
|
FRAMEWORK = -framework Carbon -framework Cocoa -framework CoreServices -framework SkyLight -framework ScriptingBridge -framework IOKit
|
|
|
|
BUILD_FLAGS = -std=c99 -Wall -DDEBUG -g -O0 -fvisibility=hidden -mmacosx-version-min=10.13
|
|
|
|
BUILD_PATH = ./bin
|
|
|
|
DOC_PATH = ./doc
|
|
|
|
SMP_PATH = ./examples
|
2021-08-13 13:58:00 +00:00
|
|
|
SKETCHYBAR_SRC = ./src/manifest.m
|
|
|
|
BINS = $(BUILD_PATH)/sketchybar
|
2020-03-29 10:22:38 +00:00
|
|
|
|
2021-03-31 08:46:03 +00:00
|
|
|
.PHONY: all clean install man
|
2020-03-29 10:22:38 +00:00
|
|
|
|
|
|
|
all: clean $(BINS)
|
|
|
|
|
|
|
|
install: BUILD_FLAGS=-std=c99 -Wall -DNDEBUG -O2 -fvisibility=hidden -mmacosx-version-min=10.13
|
|
|
|
install: clean $(BINS)
|
|
|
|
|
|
|
|
stats: BUILD_FLAGS=-std=c99 -Wall -DSTATS -DNDEBUG -O2 -fvisibility=hidden -mmacosx-version-min=10.13
|
|
|
|
stats: clean $(BINS)
|
|
|
|
|
|
|
|
man:
|
2021-08-13 13:58:00 +00:00
|
|
|
asciidoctor -b manpage $(DOC_PATH)/sketchybar.asciidoc -o $(DOC_PATH)/sketchybar.1 && \
|
|
|
|
sed -i 's/1980-01-01/$(shell date "+%Y-%m-%d")/g' $(DOC_PATH)/sketchybar.1
|
2020-03-29 10:22:38 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf $(BUILD_PATH)
|
|
|
|
|
2021-08-13 13:58:00 +00:00
|
|
|
$(BUILD_PATH)/sketchybar: $(SKETCHYBAR_SRC)
|
2020-03-29 10:22:38 +00:00
|
|
|
mkdir -p $(BUILD_PATH)
|
|
|
|
clang $^ $(BUILD_FLAGS) $(FRAMEWORK_PATH) $(FRAMEWORK) -o $@
|