Created
April 7, 2015 20:28
-
-
Save DirkyJerky/b49f51e66ace5cf6d25a to your computer and use it in GitHub Desktop.
Simple, dynamic, (windows), Makefile
This file contains 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
CC := g++ | |
SRCDIR := src | |
BINDIR := bin | |
SRCEXT := cpp | |
SOURCES := $(shell find $(SRCDIR) -type f -name *.$(SRCEXT)) | |
OBJECTS := $(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.$(SRCEXT)=.exe)) | |
CFLAGS := -g # -Wall | |
$(BINDIR)/%.exe: $(SRCDIR)/%.$(SRCEXT) | |
@mkdir -p $(BINDIR) | |
@echo " $(CC) $(CFLAGS) -o $@ $<"; $(CC) $(CFLAGS) -o $@ $< | |
clean: | |
@echo " Cleaning..."; | |
@echo " $(RM) -r $(BINDIR) $(TARGET)"; $(RM) -r $(BINDIR) $(TARGET) | |
.PHONY: clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment