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

4 years ago
SRC=$(wildcard src/*.cpp)
INCLUDE =include
4 years ago
_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
4 years ago
4 years ago
PROJ = hexview
4 years ago
4 years ago
OBJ = $(addprefix obj/,$(SRC:.cpp=.o))
.PHONY: all
all: dirs $(PROJ)
dirs:
@mkdir -p obj/src
4 years ago
4 years ago
obj/%.o: %.cpp
4 years ago
$(CXX) -c $< $(_HX_FEAT) $(CXXFLAGS) -o $@ $(LDFLAGS)
4 years ago
$(PROJ): $(OBJ)
$(CXX) $^ $(CXXFLAGS) -o $@ $(LDFLAGS)
strip $@
clean:
rm -f $(PROJ)
rm -rf obj