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.
27 lines
465 B
27 lines
465 B
SRC=$(wildcard src/*.cpp)
|
|
INCLUDE =include
|
|
CXXFLAGS = -Wall -pedantic --std=gnu++20 $(addprefix -I,$(INCLUDE))
|
|
CXXFLAGS+= -flto -felide-constructors -fgraphite -O3
|
|
LDFLAGS = -lfmt -O3 -flto
|
|
|
|
PROJ = hexview
|
|
|
|
OBJ = $(addprefix obj/,$(SRC:.cpp=.o))
|
|
|
|
.PHONY: all
|
|
all: dirs $(PROJ)
|
|
|
|
dirs:
|
|
@mkdir -p obj/src
|
|
|
|
obj/%.o: %.cpp
|
|
$(CXX) -c $< $(CXXFLAGS) -o $@ $(LDFLAGS)
|
|
|
|
$(PROJ): $(OBJ)
|
|
$(CXX) $^ $(CXXFLAGS) -o $@ $(LDFLAGS)
|
|
strip $@
|
|
|
|
clean:
|
|
rm -f $(PROJ)
|
|
rm -rf obj
|