Created
March 18, 2018 08:11
-
-
Save japodhidev/081e5b3712b8e11c1e1280db578a5a62 to your computer and use it in GitHub Desktop.
Simplistic view of a basic 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++ | |
CPPFLAGS= -Wall -g -std=c++11 | |
LINK_TARGET = test.exe | |
RES_OBJS = res.o | |
REB_OBJS = test.o | |
REBUILDABLES = $(LINK_TARGET) $(REB_OBJS) | |
VPATH = src | |
main: | |
$(CC) $(CPPFLAGS) -c test.cpp | |
$(CC) $(CPPFLAGS) -o $(LINK_TARGET) $(REB_OBJS) $(VPATH)/$(RES_OBJS) | |
# Verbose mode | |
verbose: | |
$(CC) $(CFLAGS) -v -o $(LINK_TARGET) $(VPATH)/$(RES_OBJS) test.cpp | |
clean: | |
rm -f $(REBUILDABLES) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment