# Project: exvm # Makefile created by a bob :=) # Explanations for the stuff used on the following lines: # $@ - Full name of the target - the object-file on the left of the ':' # $< - The first dependency of the object-file which is the # corresponding C++-file if you generate these dependendy-lines # with "g++ -MM *.cpp". # # The variables CXX and RM and many more are already predefined in the # make program. BIN = exvm CXXFLAGS = -O2 -Wall OBJ = main.o op_load.o op_store.o vmcore.o op_control.o op_move.o \ op_arithmetic.o op_logic.o $(BIN): $(OBJ) Makefile $(CXX) $(CXXFLAGS) $(OBJ) -o $(BIN) main.o: main.cpp vmcore.hpp vm.hpp machine.hpp $(CXX) $(CXXFLAGS) -o $@ -c $< op_arithmetic.o: op_arithmetic.cpp vmcore.hpp vm.hpp machine.hpp \ vminline.hpp $(CXX) $(CXXFLAGS) -o $@ -c $< op_control.o: op_control.cpp vmcore.hpp vm.hpp machine.hpp vminline.hpp $(CXX) $(CXXFLAGS) -o $@ -c $< op_load.o: op_load.cpp vmcore.hpp vm.hpp machine.hpp vminline.hpp $(CXX) $(CXXFLAGS) -o $@ -c $< op_logic.o: op_logic.cpp vmcore.hpp vm.hpp machine.hpp vminline.hpp $(CXX) $(CXXFLAGS) -o $@ -c $< op_move.o: op_move.cpp vmcore.hpp vm.hpp machine.hpp vminline.hpp $(CXX) $(CXXFLAGS) -o $@ -c $< op_store.o: op_store.cpp vmcore.hpp vm.hpp machine.hpp vminline.hpp $(CXX) $(CXXFLAGS) -o $@ -c $< vmcore.o: vmcore.cpp vmcore.hpp vm.hpp machine.hpp vminline.hpp $(CXX) $(CXXFLAGS) -o $@ -c $< clean: $(RM) $(TARGET) *.o *~ core