-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (32 loc) · 1.8 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
CC = g++
CFLAGS = -g -Wall -std=c++17
TARGET = assembler.pls
TARGET_LC3 = lc3.pls
all: $(TARGET) $(TARGET_LC3)
assembler: $(TARGET)
lc3: $(TARGET_LC3)
$(TARGET): Assembler/Source.o Assembler/Assembler.o Assembler/ConsoleLogger.o Assembler/Utilities.o
$(CC) $(CFLAGS) -o $(TARGET) Assembler/Source.o Assembler/Assembler.o Assembler/ConsoleLogger.o Assembler/Utilities.o
Assembler/Source.o: Assembler/Source.cpp Assembler/Assembler.h Assembler/ConsoleLogger.h Assembler/Utilities.h
$(CC) $(CFLAGS) -o Assembler/Source.o -c Assembler/Source.cpp
Assembler/Assembler.o: Assembler/Assembler.cpp Assembler/Assembler.h Assembler/ConsoleLogger.h Assembler/Utilities.h
$(CC) $(CFLAGS) -o Assembler/Assembler.o -c Assembler/Assembler.cpp
Assembler/ConsoleLogger.o: Assembler/ConsoleLogger.h Assembler/ConsoleLogger.cpp Assembler/Logger.h
$(CC) $(CFLAGS) -o Assembler/ConsoleLogger.o -c Assembler/ConsoleLogger.cpp
Assembler/Utilities.o: Assembler/Utilities.cpp Assembler/Utilities.h
$(CC) $(CFLAGS) -o Assembler/Utilities.o -c Assembler/Utilities.cpp
$(TARGET_LC3): LC3/Source.o LC3/Utilities.o LC3/Register.o LC3/ExternalUtilities.o
$(CC) $(CFLAGS) -o $(TARGET_LC3) LC3/Source.o LC3/Utilities.o LC3/Register.o LC3/ExternalUtilities.o
LC3/Source.o: LC3/Source.cpp LC3/Utilities.h LC3/Register.h LC3/ExternalUtilities.h
$(CC) $(CFLAGS) -o LC3/Source.o -c LC3/Source.cpp
LC3/Utilities.o: LC3/Utilities.cpp LC3/Utilities.h
$(CC) $(CFLAGS) -o LC3/Utilities.o -c LC3/Utilities.cpp
LC3/Register.o: LC3/Register.cpp LC3/Register.h LC3/ExternalUtilities.h
$(CC) $(CFLAGS) -o LC3/Register.o -c LC3/Register.cpp
LC3/ExternalUtilities.o: LC3/ExternalUtilities.cpp LC3/ExternalUtilities.h
$(CC) $(CFLAGS) -o LC3/ExternalUtilities.o -c LC3/ExternalUtilities.cpp
clean:
-rm Assembler/*.o
-rm LC3/*.o
-rm $(TARGET)
-rm $(TARGET_LC3)