diff --git a/Makefile b/Makefile index 045e399..1927932 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ CFLAG=-Wall -ggdb3 BUILD_DIR=build +SRC_DIR=src all: build_dir stack_vm @@ -10,16 +11,16 @@ stack_vm: main.o run.o stack.o command.o $(CC) $(BUILD_DIR)/main.o $(BUILD_DIR)/run.o $(BUILD_DIR)/stack.o $(BUILD_DIR)/command.o -o $(BUILD_DIR)/$@ main.o: - $(CC) -c main.c $(CFLAG) -o $(BUILD_DIR)/$@ + $(CC) -c $(SRC_DIR)/main.c $(CFLAG) -o $(BUILD_DIR)/$@ run.o: - $(CC) -c run.c $(CFLAG) -o $(BUILD_DIR)/$@ + $(CC) -c $(SRC_DIR)/run.c $(CFLAG) -o $(BUILD_DIR)/$@ stack.o: - $(CC) -c stack.c $(CFLAG) -o $(BUILD_DIR)/$@ + $(CC) -c $(SRC_DIR)/stack.c $(CFLAG) -o $(BUILD_DIR)/$@ command.o: - $(CC) -c command.c $(CFLAG) -o $(BUILD_DIR)/$@ + $(CC) -c $(SRC_DIR)/command.c $(CFLAG) -o $(BUILD_DIR)/$@ clean: rm -rf $(BUILD_DIR) diff --git a/command.c b/src/command.c similarity index 100% rename from command.c rename to src/command.c diff --git a/command.h b/src/command.h similarity index 100% rename from command.h rename to src/command.h diff --git a/main.c b/src/main.c similarity index 100% rename from main.c rename to src/main.c diff --git a/run.c b/src/run.c similarity index 100% rename from run.c rename to src/run.c diff --git a/run.h b/src/run.h similarity index 100% rename from run.h rename to src/run.h diff --git a/stack.c b/src/stack.c similarity index 100% rename from stack.c rename to src/stack.c diff --git a/stack.h b/src/stack.h similarity index 100% rename from stack.h rename to src/stack.h diff --git a/utils.c b/src/utils.c similarity index 100% rename from utils.c rename to src/utils.c diff --git a/utils.h b/src/utils.h similarity index 100% rename from utils.h rename to src/utils.h