Created
May 28, 2019 09:21
-
-
Save LinArcX/820c8b67ffb8fbbbbf2f4f835f201f83 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TARGET = main | |
LIBS = `pkg-config --libs -cflags gtkmm-3.0` | |
CXX = g++ | |
CFLAGS = -g -Wall | |
ODIR = ./build | |
SDIR = ./src | |
OBJECTS = $(patsubst $(SDIR)/**/%.cpp, $(ODIR)/%.o, $(wildcard $(SDIR)/*.cpp)) | |
HEADERS = $(wildcard $(SDIR)/*.h) | |
.PHONY: default all clean | |
.PRECIOUS: $(TARGET) $(OBJECTS) | |
default: $(ODIR)/$(TARGET) | |
all: default | |
$(ODIR)/%.o: $(SDIR)/%.cpp $(HEADERS) | |
$(CXX) $(CFLAGS) -c $< -o $@ $(LIBS) | |
$(ODIR)/$(TARGET): $(OBJECTS) | |
$(CXX) $(OBJECTS) -Wall $(LIBS) -o $@ | |
clean: | |
-rm -f $(ODIR)/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment