2022-06-21 07:50:19 +02:00
|
|
|
#
|
|
|
|
# Makefile for sortbin utility.
|
|
|
|
#
|
|
|
|
|
|
|
|
CXX = g++
|
2022-06-26 20:51:35 +02:00
|
|
|
CXXFLAGS = -Wall -O2 -pthread
|
2022-06-21 07:50:19 +02:00
|
|
|
# -fsanitize=address -fsanitize=undefined
|
|
|
|
|
2022-06-25 13:57:12 +02:00
|
|
|
SRCDIR = src
|
|
|
|
BUILDDIR = build
|
|
|
|
|
|
|
|
TOOLS = sortbin recgen
|
|
|
|
BINFILES = $(patsubst %,$(BUILDDIR)/%,$(TOOLS))
|
|
|
|
|
2022-06-24 15:16:22 +02:00
|
|
|
.PHONY: all
|
2022-06-25 13:57:12 +02:00
|
|
|
all: $(BINFILES)
|
2022-06-24 15:16:22 +02:00
|
|
|
|
2022-06-25 13:57:12 +02:00
|
|
|
$(BUILDDIR)/sortbin: $(SRCDIR)/sortbin.cpp
|
|
|
|
$(BUILDDIR)/recgen: $(SRCDIR)/recgen.cpp
|
|
|
|
|
|
|
|
$(BUILDDIR)/%: $(SRCDIR)/%.cpp
|
|
|
|
@mkdir -p $(BUILDDIR)
|
|
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $< $(LDLIBS) -o $@
|
2022-06-21 07:50:19 +02:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2022-06-25 13:57:12 +02:00
|
|
|
$(RM) $(BINFILES)
|
|
|
|
|