CC := clang CXX := clang++ CXXFLAGS := -std=c++17 -g # CXXFLAGS += -Werror -Wall -Wextra -g -fsanitize=address LDFLAGS := SOURCE_DIR ?= "/mnt/Kyle/Documents/Fonts/Equity + Concourse Standard + Triplicate" TARGET_DIR ?= "$(HOME)/.local/share/fonts" SOURCES := rcpp.cc OBJS := $(patsubst %.cc,%.o,$(filter %.cc,$(SOURCES))) TARGET := rcpp .PHONY: all all: tags $(TARGET) .PHONY: run run: $(TARGET) ./$(TARGET) '.+\.ttf$$' $(SOURCE_DIR) $(TARGET_DIR) .PHONY: cmake cmake: build cd build && cmake --config Debug --build .. build: mkdir -p build .PHONY: clean: rm -f *.o $(TARGET) tags: $(SOURCES) ctags -o $@ $(SOURCES) $(TARGET): $(OBJS) $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $(OBJS) .PHONY: cclean cclean: rm -r build cmake-build-* print-%: ; @echo '$(subst ','\'',$*=$($*))' %.o:%.cc $(CXX) -c -o $@ $(CXXFLAGS) $<