This commit is contained in:
2025-12-21 12:06:55 +11:00
parent 869f71466e
commit d2f295f46a
10 changed files with 1075 additions and 948 deletions

26
Makefile Normal file
View File

@@ -0,0 +1,26 @@
CXX = g++
CXXFLAGS = -std=c++17 -Wall -Isrc
LDFLAGS = -lgroundvm
BUILD_DIR = build
SRC_DIR = src
SRCS = $(SRC_DIR)/main.cpp $(SRC_DIR)/argparser.cpp $(SRC_DIR)/lexer.cpp $(SRC_DIR)/parser.cpp
OBJS = $(patsubst $(SRC_DIR)/%.cpp, $(BUILD_DIR)/%.o, $(SRCS))
TARGET = solstice
all: $(TARGET)
$(TARGET): $(OBJS)
$(CXX) $(OBJS) -o $(TARGET) $(LDFLAGS)
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.cpp | $(BUILD_DIR)
$(CXX) $(CXXFLAGS) -c $< -o $@
$(BUILD_DIR):
mkdir -p $(BUILD_DIR)
clean:
rm -rf $(BUILD_DIR) $(TARGET)
.PHONY: all clean