Created
February 12, 2017 11:31
-
-
Save oktomus/bbeef2cedb7d543b601fab2a0643ead4 to your computer and use it in GitHub Desktop.
Makefile : executable for each source file
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
CXX=g++ | |
FLAGS=-Wall | |
LFLAGS=-lglut -lGL -lGLU | |
SRC=. | |
EXEC=. | |
SRCS=$(wildcard $(SRC)/*.cpp) | |
EXECS=$(SRCS:$(SRC)/%.cpp=$(EXEC)/%.out) | |
all: $(EXECS) | |
%.out: %.cpp | |
$(CXX) $(FLAGS) -o $@ $< $(LFLAGS) | |
chmod u+x $@ | |
clean: | |
rm -f $(EXECS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment