RM := rm -rf
GCC = g++ -g -Wall

OBJS += \
decoder.o \
executer.o \
fetcher.o \
instruction.o \
main.o \
memory.o 

all: simulator

simulator: $(OBJS) 
	$(GCC) -o simulator $(OBJS) 
	@echo 'Finished building target: $@'

%.o: %.cpp %.h
	$(GCC) -c $<

clean:
	-$(RM) $(OBJS) simulator
	-@echo ' '
