SketchyBar/makefile

43 lines
1.4 KiB
Makefile
Raw Normal View History

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 -DNDEBUG -O2 -fvisibility=hidden -mmacosx-version-min=10.13
2020-03-29 10:22:38 +00:00
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
.PHONY: all clean install man
2020-03-29 10:22:38 +00:00
all: clean $(BINS)
install: clean $(BINS)
2021-08-14 20:42:59 +00:00
ln ./bin/sketchybar /usr/local/bin/sketchybar
mkdir ~/.config/sketchybar
cp sketchybarrc ~/.config/sketchybar/sketchybarrc
cp -r plugins ~/.config/sketchybar
chmod +x ~/.config/sketchybar/sketchybarrc
chmod +x ~/.config/sketchybar/plugins/*
echo "Install complete..."
2021-09-01 11:22:39 +00:00
uninstall: clean
rm /usr/local/bin/sketchybar
debug: BUILD_FLAGS=-std=c99 -Wall -DDEBUG -fsanitize=address -fsanitize=undefined -g -O0 -fvisibility=hidden -mmacosx-version-min=10.13
debug: clean $(BINS)
update: clean $(BINS)
rm /usr/local/bin/sketchybar
ln ./bin/sketchybar /usr/local/bin/sketchybar
echo "Update complete... ~/.config/ folder not touched and might need update too...."
2021-08-14 20:42:59 +00:00
2020-03-29 10:22:38 +00:00
stats: BUILD_FLAGS=-std=c99 -Wall -DSTATS -DNDEBUG -O2 -fvisibility=hidden -mmacosx-version-min=10.13
stats: clean $(BINS)
2021-08-13 21:24:41 +00:00
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 $@