2023-10-13 11:23:34 +00:00
|
|
|
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"
|
|
|
|
|
2023-10-13 11:24:32 +00:00
|
|
|
SOURCES := rcpp.cc Flag.cc Flag.h
|
2023-10-13 11:23:34 +00:00
|
|
|
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) $<
|