-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (22 loc) · 948 Bytes
/
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
nothing:
@echo Chose something
# compile program
all: myassembler
# myassembler is made by linking object files together
myassembler: Parser.o Code.o Assembler.o SymbolTable.o
g++ Parser.o Code.o Assembler.o SymbolTable.o main.cpp -o myassembler
# Parser.o object file recompile if Parser.cpp or Parser.h change
Parser.o: Parser.cpp Parser.h
g++ -c Parser.cpp -o Parser.o
# Code.o object file recompile if Code.cpp or Code.h change
Code.o: Code.cpp Code.h
g++ -c Code.cpp -o Code.o
# Assembler.o object file recompile if Assembler.cpp or Assembler.h change
Assembler.o: Assembler.cpp Assembler.h
g++ -c Assembler.cpp -o Assembler.o
# SymbolTable.o object file recompile if SymbolTablede.cpp or SymbolTable.h change
SymbolTable.o: SymbolTable.cpp SymbolTable.h
g++ -c SymbolTable.cpp -o SymbolTable.o
# clean removes all object files and the compiled executable
clean:
rm -f *.o myassembler