-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
43 lines (32 loc) · 1.35 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
CC = g++
LIBS = -std=c++11 -Wall
BIN = bin
INCLUDE = include
OBJ = obj
SRC = src
PROCESSED = processed
TMP = tmp
all: linker.o error_checker.o symbol.o assembler.o pre-processor.o macro-processor.o instructions.o main
error_checker.o: $(SRC)/error_checker.cpp $(INCLUDE)/error_checker.hpp
$(CC) $(LIBS) -c $(SRC)/error_checker.cpp -I $(INCLUDE) -o $(OBJ)/error_checker.o
symbol.o: $(SRC)/symbol.cpp $(INCLUDE)/symbol.hpp
$(CC) $(LIBS) -c $(SRC)/symbol.cpp -I $(INCLUDE) -o $(OBJ)/symbol.o
assembler.o: $(SRC)/assembler.cpp $(INCLUDE)/assembler.hpp
$(CC) $(LIBS) -c $(SRC)/assembler.cpp -I $(INCLUDE) -o $(OBJ)/assembler.o
macro-processor.o: $(SRC)/macro-processor.cpp $(INCLUDE)/macro-processor.hpp
$(CC) $(LIBS) -c $(SRC)/macro-processor.cpp -I $(INCLUDE) -o $(OBJ)/macro-processor.o
pre-processor.o: $(SRC)/pre-processor.cpp $(INCLUDE)/pre-processor.hpp
$(CC) $(LIBS) -c $(SRC)/pre-processor.cpp -I $(INCLUDE) -o $(OBJ)/pre-processor.o
instructions.o: $(SRC)/instructions.cpp $(INCLUDE)/instructions.hpp
$(CC) $(LIBS) -c $(SRC)/instructions.cpp -I $(INCLUDE) -o $(OBJ)/instructions.o
linker.o: $(SRC)/linker.cpp $(INCLUDE)/linker.hpp
$(CC) $(LIBS) -c $(SRC)/linker.cpp -I $(INCLUDE) -o $(OBJ)/linker.o
main:
$(CC) $(LIBS) main.cpp $(OBJ)/*.o -I $(INCLUDE) -o $(BIN)/main
run:
./$(BIN)/main
clean:
rm $(OBJ)/*.o
rm $(BIN)/*
rm $(PROCESSED)/*
rm $(TMP)/*