dwarf-assembly/src/Makefile

43 lines
912 B
Makefile
Raw Normal View History

2018-04-23 16:12:19 +02:00
CXX=g++
CXXLOCS?=-L. -I.
CXXFL?=
CXXFLAGS=$(CXXLOCS) -Wall -Wextra -std=c++14 -O2 -g $(CXXFL)
CXXLIBS=-ldwarf -ldwarfpp -lsrk31c++ -lc++fileno -lelf
2018-04-23 16:12:19 +02:00
TARGET=dwarf-assembly
2018-05-11 13:09:35 +02:00
OBJS=\
DwarfReader.o \
SimpleDwarf.o \
CodeGenerator.o \
PcListReader.o \
2018-06-20 14:12:42 +02:00
SimpleDwarfFilter.o \
PcHoleFiller.o \
EmptyFdeDeleter.o \
ConseqEquivFilter.o \
2019-06-09 03:32:54 +02:00
OverriddenRowFilter.o \
2018-06-25 11:33:36 +02:00
SwitchStatement.o \
NativeSwitchCompiler.o \
FactoredSwitchCompiler.o \
2018-05-11 13:09:35 +02:00
settings.o \
main.o
2018-04-23 16:12:19 +02:00
###############################################################################
all: $(TARGET)
$(TARGET): gen_context_struct.hpp $(OBJS)
2018-04-23 16:12:19 +02:00
$(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 ";" >> $@
2018-04-23 16:12:19 +02:00
%.o: %.cpp
$(CXX) -o $@ $(CXXFLAGS) -c $<
.PHONY: clean
clean:
rm -f $(TARGET) *.o gen_*.hpp