Created
September 30, 2019 15:26
-
-
Save jarulsamy/78efec7cb17e2001635cd6f7602311b7 to your computer and use it in GitHub Desktop.
Sample Makefile for C++
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
# the compiler: gcc for C program, define as g++ for C++ | |
CC = g++ | |
CFLAGS = -g -Wall | |
# the build target executable: | |
TARGET = `NAME_OF_MAIN_FILE` | |
all: $(TARGET) | |
$(TARGET): $(TARGET).cpp | |
$(CC) $(CFLAGS) -o $(TARGET).out $(TARGET).cpp | |
clean: | |
$(RM) $(TARGET).out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment