dsp-asm/Makefile
Zack Buhman 107eb18cd4 parser: allow immediate values that end with colon
This is funky syntax, but it doesn't hurt the accuracy of a parser.

Some people might prefer this to stylize references to labels.
2023-08-24 03:31:35 +00:00

43 lines
706 B
Makefile

STATIC = -static -static-libgcc -static-libstdc++
CXXFLAGS = -Og -g -Wall -Wextra -Werror -Wfatal-errors -Wno-c99-designator -std=c++20
LDFLAGS =
TARGET =
CXX = $(TARGET)g++
SRC = main.cpp
SRC += lexer.cpp
SRC += ast_printer.cpp
SRC += ast_resolver.cpp
SRC += ast_emitter.cpp
SRC += parser.cpp
SRC += stmt_string.cpp
OBJ = $(patsubst %.cpp,%.o,$(SRC))
DEP = $(patsubst %.cpp,%.d,$(SRC))
MAIN = scu-dsp-asm
all: $(MAIN)
-include $(DEP)
%.o: %.cpp
$(CXX) $(CXXFLAGS) -MMD -MF $(basename $<).d -c $< -o $@
$(MAIN): $(OBJ)
$(CXX) $(STATIC) $(LDFLAGS) $^ -o $@
clean:
rm -f *.o *.d *.gch $(MAIN)
.SUFFIXES:
.INTERMEDIATE:
.SECONDARY:
.PHONY: all clean
%: RCS/%,v
%: RCS/%
%: %,v
%: s.%
%: SCCS/s.%