CXX = g++ CXXFLAGS = -std=c++17 -g -I$(SYSTEMC_HOME)/include -I./include LDFLAGS = -L$(SYSTEMC_HOME)/lib-linux64 -lsystemc SRCDIR = src INCDIR = include OBJDIR = obj OUTDIR = out SOURCES = $(wildcard $(SRCDIR)/*.cpp) OBJECTS = $(SOURCES:$(SRCDIR)/%.cpp=$(OBJDIR)/%.o) EXECUTABLE = $(OUTDIR)/noc_simulation all: directories $(EXECUTABLE) directories: mkdir -p $(OBJDIR) $(OUTDIR) $(EXECUTABLE): $(OBJECTS) main.cpp $(CXX) $(CXXFLAGS) $(OBJECTS) main.cpp -o $@ $(LDFLAGS) $(OBJDIR)/%.o: $(SRCDIR)/%.cpp $(CXX) $(CXXFLAGS) -c $< -o $@ clean: rm -rf $(OBJDIR) $(OUTDIR) .PHONY: all clean directories