mirror of
https://github.com/avinal/The-Hack-Assembler.git
synced 2026-01-10 07:08:32 +05:30
All tests working and compilation working
This commit is contained in:
23
Makefile
23
Makefile
@@ -1,24 +1,27 @@
|
|||||||
CXX = g++
|
CXX = g++
|
||||||
CXXFLAGS = -Wall -Wextra -pedantic-errors -std=c++17
|
STDVERSION = -std=c++17
|
||||||
|
WARNINGS = -pedantic -Wall -Wfatal-errors -Wextra -Wno-unused-parameter -Wno-unused-variable
|
||||||
|
|
||||||
OBJECTS = build/parser.o build/code.o build/symbol_table.o
|
|
||||||
|
|
||||||
TARGET = assembler
|
TARGET = assembler
|
||||||
|
OBJ_DIR = build
|
||||||
|
OBJECTS = build/symbol_table.o build/parser.o
|
||||||
|
TEST_OBJS = build/parser_test.o
|
||||||
all:$(TARGET)
|
all:$(TARGET)
|
||||||
|
|
||||||
$(TARGET): $(OBJECTS)
|
$(TARGET): $(OBJECTS)
|
||||||
$(CXX) $(CXXFLAGS) -o $(TARGET) src/Main.cpp $(OBJECTS)
|
$(CXX) $(WARNINGS) $(STDVERSION) -o $(TARGET) src/Main.cpp $(OBJECTS)
|
||||||
|
|
||||||
|
|
||||||
build/parser.o: src/parser.cpp include/parser.hpp
|
build/parser.o: src/parser.cpp include/parser.hpp
|
||||||
$(CXX) $(CXXFLAGS) -c src/parser.cpp -o build/parser.o
|
$(CXX) $(WARNINGS) $(STDVERSION) -c src/parser.cpp -o build/parser.o
|
||||||
|
|
||||||
build/code.o:src/code.cpp include/code.hpp
|
|
||||||
$(CXX) $(CXXFLAGS) -c src/code.cpp -o build/code.o
|
|
||||||
|
|
||||||
build/symbol_table.o:src/symbol_table.cpp include/symbol_table.hpp
|
build/symbol_table.o:src/symbol_table.cpp include/symbol_table.hpp
|
||||||
$(CXX) $(CXXFLAGS) -c src/symbol_table.cpp -o build/symbol_table.o
|
$(CXX) $(STDVERSION) -c src/symbol_table.cpp -o build/symbol_table.o
|
||||||
|
|
||||||
|
|
||||||
|
test:
|
||||||
|
$(CXX) $(STDVERSION) tests/*.cpp tests/catch/catch_main.cpp src/parser.cpp src/symbol_table.cpp -o test
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f build/*
|
rm -rf build/*.o $(TARGET) test
|
||||||
Reference in New Issue
Block a user