diff --git a/cobalt b/cobalt new file mode 100755 index 0000000..9a845a8 Binary files /dev/null and b/cobalt differ diff --git a/lexer.h b/include/lexer.h similarity index 100% rename from lexer.h rename to include/lexer.h diff --git a/parser.h b/include/parser.h similarity index 100% rename from parser.h rename to include/parser.h diff --git a/token.h b/include/token.h similarity index 100% rename from token.h rename to include/token.h diff --git a/makefile b/makefile new file mode 100644 index 0000000..48073c5 --- /dev/null +++ b/makefile @@ -0,0 +1,20 @@ + +#OBJS specifies which files to compile as part of the project +OBJS = $(wildcard src/*.cpp) + +#CC specifies which compiler we're using +CC = g++ + +#COMPILER_FLAGS specifies the additional compilation options we're using +# -w suppresses all warnings +COMPILER_FLAGS = -w + +#LINKER_FLAGS specifies the libraries we're linking against +LINKER_FLAGS = + +#OBJ_NAME specifies the name of our exectuable +OBJ_NAME = cobalt + +#This is the target that compiles our executable +all : $(OBJS) + $(CC) $(OBJS) $(COMPILER_FLAGS) $(LINKER_FLAGS) -o $(OBJ_NAME) diff --git a/lexer.cpp b/src/lexer.cpp similarity index 94% rename from lexer.cpp rename to src/lexer.cpp index 58146cc..e2718ef 100644 --- a/lexer.cpp +++ b/src/lexer.cpp @@ -1,7 +1,7 @@ #include #include #include -#include "lexer.h" +#include "../include/lexer.h" char c; FILE* input_file; diff --git a/main.cpp b/src/main.cpp similarity index 89% rename from main.cpp rename to src/main.cpp index 16cd12a..5a59783 100644 --- a/main.cpp +++ b/src/main.cpp @@ -2,7 +2,7 @@ #include #include -#include "lexer.h" +#include "../include/lexer.h" int main(int argc, char *argv[]) { if (argc > 1) { diff --git a/parser.cpp b/src/parser.cpp similarity index 72% rename from parser.cpp rename to src/parser.cpp index b2ee857..f60a633 100644 --- a/parser.cpp +++ b/src/parser.cpp @@ -1,7 +1,7 @@ #include #include -#include "parser.h" +#include "../include/parser.h" Parser::Parser(std::string input_file) { diff --git a/token.cpp b/src/token.cpp similarity index 100% rename from token.cpp rename to src/token.cpp