minor implement lexer

This commit is contained in:
2025-11-15 08:01:34 +09:00
parent 171006117e
commit 682cbdc216
10 changed files with 407 additions and 20 deletions

View File

@@ -0,0 +1,23 @@
CC := gcc
CFLAGS := -Wall -Wextra -Werror -g -I./include
BUILD_DIR := build
SRC := $(wildcard src/*.c)
OBJ := $(patsubst src/%.c,${BUILD_DIR}/%.o,$(SRC))
TARGET := cval.out
.PHONY: all clean
all: $(TARGET)
$(TARGET): $(OBJ)
$(CC) $(CFLAGS) -o $(BUILD_DIR)/$(TARGET) $(OBJ)
$(BUILD_DIR)/%.o: src/%.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJ) $(BUILD_DIR)/$(TARGET)