2018-03-28 15:33:36 +02:00
|
|
|
LIB_DIR=lib
|
|
|
|
TARGET=$(LIB_DIR)/libdwarfinterpret.so
|
2018-04-03 12:23:50 +02:00
|
|
|
SRC=src/DwarfInterpret.cpp src/MemoryMap.cpp
|
2018-03-28 15:33:36 +02:00
|
|
|
|
|
|
|
INCLUDE_DIR=include
|
|
|
|
|
|
|
|
CXX=g++
|
2018-04-03 13:52:40 +02:00
|
|
|
CXXFLAGS=-Wall -Wextra -O1 -g --std=c++14
|
2018-03-28 15:33:36 +02:00
|
|
|
CXXLIBS=-ldwarfpp -ldwarf -lelf -lc++fileno
|
|
|
|
CXXINCLUDE=-I$(INCLUDE_DIR)
|
|
|
|
|
|
|
|
|
|
|
|
OBJS = $(SRC:.cpp=.o)
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
all: $(TARGET)
|
|
|
|
|
|
|
|
$(TARGET): $(OBJS)
|
|
|
|
mkdir -p "$$(dirname "$@")"
|
|
|
|
$(CXX) $(CXXFLAGS) $(CXXLIBS) $(CXXINCLUDE) $^ -shared -o "$@"
|
|
|
|
|
|
|
|
%.o: %.cpp
|
|
|
|
$(CXX) $(CXXFLAGS) $(CXXINCLUDE) -fPIC -c "$<" -o "$@"
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(OBJS) $(TARGET)
|
2018-03-30 14:25:58 +02:00
|
|
|
|
|
|
|
docs:
|
|
|
|
doxygen Doxyfile
|
|
|
|
|
|
|
|
.PHONY: docs
|