Last active
February 5, 2018 01:25
-
-
Save captainGeech42/230af8dde9eb98d4ab3cfa4e9da48130 to your computer and use it in GitHub Desktop.
CS161 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++ | |
C_FLAGS = -g -Wall | |
ifndef num | |
$(error num is not set. Please re-run make with the argument `num=#`, where # is the assignment #) | |
endif | |
ifndef header | |
all: | |
$(CC) $(C_FLAGS) -o assignment$(num) assignment$(num).cpp | |
else | |
all: | |
$(CC) $(C_FLAGS) -o assignment$(num) assignment$(num).cpp assignment$(num)_func.cpp | |
endif | |
clean: assignment$(num) | |
$(RM) assignment$(num) | |
run: assignment$(num) | |
./assignment$(num) | |
debug: assignment$(num) | |
gdb assignment$(num) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment