Fix project structure and add make file
This commit is contained in:
parent
f014088199
commit
2d9d56be76
20
makefile
Normal file
20
makefile
Normal file
|
|
@ -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)
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include "lexer.h"
|
#include "../include/lexer.h"
|
||||||
|
|
||||||
char c;
|
char c;
|
||||||
FILE* input_file;
|
FILE* input_file;
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "lexer.h"
|
#include "../include/lexer.h"
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
if (argc > 1) {
|
if (argc > 1) {
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "parser.h"
|
#include "../include/parser.h"
|
||||||
|
|
||||||
Parser::Parser(std::string input_file) {
|
Parser::Parser(std::string input_file) {
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user