Created
July 5, 2014 23:46
-
-
Save xivSolutions/a15ad3db384f2b1bcbff to your computer and use it in GitHub Desktop.
Makefile for Harvard cs50 course excercises
This file contains hidden or 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
# Hacked-together make file for use with Harvard cs50 on-line course excercises | |
# Type terminal commands as follows: make EXE=yourFileName (don't add extensions) | |
# the compiler: gcc for C program, define as g++ for C+ use clang for Harvard stuff | |
CC = clang | |
# compiler flags: | |
# -g adds debugging information to the executable file | |
# -Wall turns on most, but not all, compiler warnings | |
CFLAGS = -g -Wall | |
# link THIS for the cs50 functions (add others as needed): | |
LFLAGS = -lcs50 | |
# the build target executable: | |
TARGET = $(EXE) | |
all: $(TARGET) | |
$(TARGET): $(TARGET).c ; $(CC) $(CFLAGS) -o $(TARGET) $(TARGET).c $(LFLAGS) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment