forked from Evensgn/MIPS-simulator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
32 lines (23 loc) · 665 Bytes
/
makefile
File metadata and controls
32 lines (23 loc) · 665 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
CC = g++
CFLAGS = -Wall -std=c++11 -O2
################!! MODIFY HERE !!####################
_OBJ = main.o
_DEPS = include_define.hpp utility.hpp global_class.hpp evensgn_string.hpp mips_simulator.hpp mips_text_parser.hpp mips_entry_processor.hpp mips_pipeline.hpp
#####################################################
ODIR = obj
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
IDIR = .
DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS))
$(ODIR)/%.o: %.c* $(DEPS)
$(shell mkdir -p bin)
$(shell mkdir -p obj)
$(CC) -c -o $@ $< $(CFLAGS)
mips: $(OBJ)
$(CC) -o bin/mips $^ $(CFLAGS)
.PHONY: clean all rebuild
clean:
rm -f $(ODIR)/*
rm -f bin/*
all:
mips
rebuild: clean all