dwarf-assembly/src/Makefile
Théophile Bastian 310a348bce Can generate PC holes in eh_elfs
Before, the space between FDEs was abstracted away, thought as dead
space that produced an error when queried. This is not the case, though:
empty FDEs indicate undefined DWARF
2018-07-04 18:14:30 +02:00

42 lines
887 B
Makefile

CXX=g++
CXXLOCS?=-L. -I.
CXXFL?=
CXXFLAGS=$(CXXLOCS) -Wall -Wextra -std=c++14 -O2 -g $(CXXFL)
CXXLIBS=-lelf -ldwarf -ldwarfpp -lsrk31c++ -lc++fileno
TARGET=dwarf-assembly
OBJS=\
DwarfReader.o \
SimpleDwarf.o \
CodeGenerator.o \
PcListReader.o \
SimpleDwarfFilter.o \
PcHoleFiller.o \
EmptyFdeDeleter.o \
ConseqEquivFilter.o \
SwitchStatement.o \
NativeSwitchCompiler.o \
FactoredSwitchCompiler.o \
settings.o \
main.o
###############################################################################
all: $(TARGET)
$(TARGET): gen_context_struct.hpp $(OBJS)
$(CXX) -o $@ $(CXXFLAGS) $^ $(CXXLIBS)
gen_context_struct.hpp: ../shared/context_struct.h
echo "static const char* CONTEXT_STRUCT_STR =" > $@
sed 's/"/\\"/g' $< | sed 's/^\(.*\)$$/"\1\\n"/g' >> $@
echo ";" >> $@
%.o: %.cpp
$(CXX) -o $@ $(CXXFLAGS) -c $<
.PHONY: clean
clean:
rm -f $(TARGET) *.o gen_*.hpp