From 7b63bd6f17c137da464f1438bb7ed60dfb06ebc2 Mon Sep 17 00:00:00 2001 From: dm1sh Date: Sat, 17 Apr 2021 00:02:10 +0500 Subject: [PATCH] Separated source files into src directory --- Makefile | 9 +++++---- command.c => src/command.c | 0 command.h => src/command.h | 0 main.c => src/main.c | 0 run.c => src/run.c | 0 run.h => src/run.h | 0 stack.c => src/stack.c | 0 stack.h => src/stack.h | 0 utils.c => src/utils.c | 0 utils.h => src/utils.h | 0 10 files changed, 5 insertions(+), 4 deletions(-) rename command.c => src/command.c (100%) rename command.h => src/command.h (100%) rename main.c => src/main.c (100%) rename run.c => src/run.c (100%) rename run.h => src/run.h (100%) rename stack.c => src/stack.c (100%) rename stack.h => src/stack.h (100%) rename utils.c => src/utils.c (100%) rename utils.h => src/utils.h (100%) 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