2018-04-23 16:12:19 +02:00
|
|
|
CXX=g++
|
|
|
|
CXXLOCS?=-L. -I.
|
|
|
|
CXXFLAGS=$(CXXLOCS) -Wall -Wextra -std=c++14 -O2 -g
|
|
|
|
CXXLIBS=-lelf -ldwarf -ldwarfpp -lsrk31c++ -lc++fileno
|
|
|
|
|
|
|
|
TARGET=dwarf-assembly
|
2018-04-23 18:58:05 +02:00
|
|
|
OBJS=DwarfReader.o SimpleDwarf.o CodeGenerator.o main.o
|
2018-04-23 16:12:19 +02:00
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
all: $(TARGET)
|
|
|
|
|
|
|
|
$(TARGET): $(OBJS)
|
|
|
|
$(CXX) -o $@ $(CXXFLAGS) $^ $(CXXLIBS)
|
|
|
|
|
|
|
|
%.o: %.cpp
|
|
|
|
$(CXX) -o $@ $(CXXFLAGS) -c $<
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -f $(TARGET) *.o
|