forked from cisc220/more-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (20 loc) · 673 Bytes
/
Copy pathMakefile
File metadata and controls
26 lines (20 loc) · 673 Bytes
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
#a simple make file
#this file tells GNU make how to create the executable "the_world"
#this line declares that all targets for make will require "the_world"
all: the_world
#this line dictates that "the_world" relies on the four listed object files
the_world: main.o monk.o teacher.o student.o
g++ main.o monk.o teacher.o student.o -o the_world
#this line gives a way of building main.o which relies on main.cpp
main.o: main.cpp
g++ -c main.cpp
#etc etc
monk.o: monk.cpp
g++ -c monk.cpp
teacher.o: teacher.cpp
g++ -c teacher.cpp
student.o: student.cpp
g++ -c student.cpp
#this gives a recipe for removing files ending in .o and the_world
clean:
rm *.o the_world