-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (37 loc) · 1.32 KB
/
Makefile
File metadata and controls
52 lines (37 loc) · 1.32 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# usage: if this file is named "Makefile", then the commands are:
# "make" will build the specified executable (PROG)
# "make clean" will delete all of the .o and .exe files
#
# if this file is named something else, then use the -f option for make:
# "make -f makefilename clean"
# set the variables below depending on compiler and options
CC = g++
LD = g++
# add -g to the CFLAGS for debugging (or -ggdb if you use gdb).
# -pedantic-errors attempts to enforce Standard
# -Wall asks for certain warnings of possible errors
# -c is required to specify compile-only (no linking)
CFLAGS = -std=c++11 -pedantic-errors -Wall -c
#no load flags defined, but -l would be used to include a special library
LFLAGS =
OBJS = p3_main.o Room.o Person.o Meeting.o Utility.o
PROG = proj3exe
default: $(PROG)
debug: CFLAGS += -g -gdwarf-3 -fno-elide-constructors
debug: $(PROG)
$(PROG): $(OBJS)
$(LD) $(LFLAGS) $(OBJS) -o $(PROG)
p3_main.o: p3_main.cpp Room.h Meeting.h Person.h Utility.h
$(CC) $(CFLAGS) p3_main.cpp
Room.o: Room.cpp Room.h Meeting.h Utility.h
$(CC) $(CFLAGS) Room.cpp
Meeting.o: Meeting.cpp Meeting.h Person.h Utility.h
$(CC) $(CFLAGS) Meeting.cpp
Person.o: Person.cpp Person.h Utility.h
$(CC) $(CFLAGS) Person.cpp
Utility.o: Utility.cpp Utility.h
$(CC) $(CFLAGS) Utility.cpp
clean:
rm -f *.o
real_clean:
rm -rf *.o $(PROG)