-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (29 loc) · 855 Bytes
/
Copy pathMakefile
File metadata and controls
38 lines (29 loc) · 855 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
27
28
29
30
31
32
33
34
35
36
37
38
#/**
#* @file Makefile
#* @author Sam Emison + Cole Belew
#* @date 2024-11-06
#* @brief Makfile for Library Assignment
#* .
#* Cleans everything up and creates an executable
#*/
# Modified from last assignment
CC = g++ # The compiler
TARGET = test # Makes "test" the executable
CFLAGS = -c -Wall -Wextra -g # Compile with all errors and warnings
#Object Files
OBJS = main.o Library.o
all: $(TARGET)
# Links object files to create an executable
$(TARGET): $(OBJS)
$(CC) $(OBJS) -o $(TARGET)
#Compiles main.o from source
main.o: main.cpp Library.h Book.h
$(CC) $(CFLAGS) main.cpp -o main.o
#Compiles Library.o from source
Library.o: Library.cpp Library.h Book.h
$(CC) $(CFLAGS) Library.cpp -o Library.o
#Compiles Book.o from source
Book.o: Book.cpp Book.h
$(CC) $(CFLAGS) Book.cpp -o Book.o
clean: #Cleans everything up
rm -f *.o *~ $(TARGET)