-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (24 loc) · 1.1 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
CC = g++
CFLAGS = -c -Wall -Werror -Wextra -std=gnu++17
EXE = piano
SFML_INCLUDE_PATH = -I /opt/homebrew/Cellar/sfml/2.5.1_2/include
SFML_LIB_PATH = -L /opt/homebrew/Cellar/sfml/2.5.1_2/lib
SFML_LINK = -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio
${EXE}: main.o Note.o Piano.o PianoKey.o PianoRunner.o BlackPianoKey.o WhitePianoKey.o
${CC} *.o -o ${EXE} ${SFML_LIB_PATH} ${SFML_LINK}
main.o: piano.cpp
${CC} ${CFLAGS} piano.cpp -o main.o ${SFML_INCLUDE_PATH}
Note.o: impl/Note.cpp
${CC} ${CFLAGS} impl/Note.cpp -o Note.o ${SFML_INCLUDE_PATH}
Piano.o: impl/Piano.cpp
${CC} ${CFLAGS} impl/Piano.cpp -o Piano.o ${SFML_INCLUDE_PATH}
PianoKey.o: impl/PianoKey.cpp
${CC} ${CFLAGS} impl/PianoKey.cpp -o PianoKey.o ${SFML_INCLUDE_PATH}
PianoRunner.o: impl/PianoRunner.cpp
${CC} ${CFLAGS} impl/PianoRunner.cpp -o PianoRunner.o ${SFML_INCLUDE_PATH}
BlackPianoKey.o: impl/BlackPianoKey.cpp
${CC} ${CFLAGS} impl/BlackPianoKey.cpp -o BlackPianoKey.o ${SFML_INCLUDE_PATH}
WhitePianoKey.o: impl/WhitePianoKey.cpp
${CC} ${CFLAGS} impl/WhitePianoKey.cpp -o WhitePianoKey.o ${SFML_INCLUDE_PATH}
clean:
rm *.o ${EXE}