Skip to content

Commit 944a8f7

Browse files
committed
hello
1 parent 5614d6f commit 944a8f7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

hello/index.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,23 @@ Recall from lecture that we can automate the process of executing `clang`, letti
9494

9595
Create a new file called `Makefile` (no dot! no extension) and enter into it the following lines:
9696

97+
**Windows/Ubuntu/Old Mac version**
98+
9799
# Makefile for CS50-type assignments
98100

99101
%: %.c
100102
clang -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wshadow -o $@ $< -lcs50 -lcrypt -lm
101103

104+
**Mac M1 version**
105+
106+
# Makefile for CS50-type assignments
107+
108+
INCLUDE_PATH=${HOMEBREW_PREFIX}/opt/libcs50/include
109+
LIBRARY_PATH=${HOMEBREW_PREFIX}/opt/libcs50/lib
110+
111+
%: %.c
112+
clang -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wshadow -I${INCLUDE_PATH} -o $@ $< -L${LIBRARY_PATH} -lcs50 -lcrypt -lm
113+
102114
Make sure that right before "clang" in that last line is a TAB character and not 4 spaces. Save the file.
103115

104116
Now execute the below to compile your program one last time.

0 commit comments

Comments
 (0)