diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000..ec86adc --- /dev/null +++ b/src/Makefile @@ -0,0 +1,22 @@ +CXX=g++ +CXXLOCS?=-L. -I. +CXXFLAGS=$(CXXLOCS) -Wall -Wextra -std=c++14 -O2 -g +CXXLIBS=-lelf -ldwarf -ldwarfpp -lsrk31c++ -lc++fileno + +TARGET=dwarf-assembly +OBJS=DwarfReader.o SimpleDwarf.o + +############################################################################### + +all: $(TARGET) + +$(TARGET): $(OBJS) + $(CXX) -o $@ $(CXXFLAGS) $^ $(CXXLIBS) + +%.o: %.cpp + $(CXX) -o $@ $(CXXFLAGS) -c $< + + +.PHONY: clean +clean: + rm -f $(TARGET) *.o