You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hexview/Makefile

31 lines
550 B

SRC=$(wildcard src/*.cpp)
INCLUDE =include
_HX_FEAT?= -DFIXED_ROW_SIZE=24
CXXFLAGS?= -pipe -O3 -march=native
CXXFLAGS+= -flto -felide-constructors -fgraphite
CXXFLAGS+= -Wall -pedantic --std=gnu++20 $(addprefix -I,$(INCLUDE))
LDFLAGS?= -O3 -flto
LDFLAGS+= -lfmt
PROJ = hexview
OBJ = $(addprefix obj/,$(SRC:.cpp=.o))
.PHONY: all
all: dirs $(PROJ)
dirs:
@mkdir -p obj/src
obj/%.o: %.cpp
$(CXX) -c $< $(_HX_FEAT) $(CXXFLAGS) -o $@ $(LDFLAGS)
$(PROJ): $(OBJ)
$(CXX) $^ $(CXXFLAGS) -o $@ $(LDFLAGS)
strip $@
clean:
rm -f $(PROJ)
rm -rf obj