1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-28 09:31:56 +00:00
powerlevel10k/Makefile
Roman Perepelitsa 140a6ade4e Squashed 'gitstatus/' changes from 62177e89..44504a24
44504a24 make: remove -Wall
8795883c Specify cmake generator in build file (#441)
3e08476b docs: the project is on life support
12e6a689 Add support to build e2k arch. (#432)
a952c3f6 bump version to v1.5.5

git-subtree-dir: gitstatus
git-subtree-split: 44504a24b1b999a4f56ff74c75b8215bdcadee1f
2024-10-03 11:16:46 +02:00

57 lines
1.7 KiB
Makefile

APPNAME ?= gitstatusd
OBJDIR ?= obj
CXX ?= g++
ZSH := $(shell command -v zsh 2> /dev/null)
VERSION ?= $(shell . ./build.info && printf "%s" "$$gitstatus_version")
# Note: -fsized-deallocation is not used to avoid binary compatibility issues on macOS.
#
# Sized delete is implemented as __ZdlPvm in /usr/lib/libc++.1.dylib but this symbol is
# missing in macOS prior to 10.13.
CXXFLAGS += -std=c++14 -funsigned-char -O3 -DNDEBUG -DGITSTATUS_VERSION=$(VERSION) # -Wall -g -fsanitize=thread
LDFLAGS += -pthread # -fsanitize=thread
LDLIBS += -lgit2 # -lprofiler -lunwind
SRCS := $(shell find src -name "*.cc")
OBJS := $(patsubst src/%.cc, $(OBJDIR)/%.o, $(SRCS))
all: $(APPNAME)
$(APPNAME): usrbin/$(APPNAME)
usrbin/$(APPNAME): $(OBJS)
$(CXX) $(OBJS) $(LDFLAGS) $(LDLIBS) -o $@
$(OBJDIR):
mkdir -p -- $(OBJDIR)
$(OBJDIR)/%.o: src/%.cc Makefile build.info | $(OBJDIR)
$(CXX) $(CXXFLAGS) -MM -MT $@ src/$*.cc >$(OBJDIR)/$*.dep
$(CXX) $(CXXFLAGS) -Wall -c -o $@ src/$*.cc
clean:
rm -rf -- $(OBJDIR)
zwc:
$(or $(ZSH),:) -fc 'for f in *.zsh install; do zcompile -R -- $$f.zwc $$f || exit; done'
minify:
rm -rf -- .clang-format .git .gitattributes .gitignore .vscode deps docs src usrbin/.gitkeep LICENSE Makefile README.md build mbuild
pkg: zwc
GITSTATUS_DAEMON= GITSTATUS_CACHE_DIR=$(shell pwd)/usrbin ./install -f
-include $(OBJS:.o=.dep)
.PHONY: help
help:
@echo "Usage: make [TARGET]"
@echo "Available targets:"
@echo " all Build $(APPNAME) (default target)"
@echo " clean Remove generated files and directories"
@echo " zwc Compile Zsh files"
@echo " minify Remove unnecessary files and folders"
@echo " pkg Create a package"