From 38c41fa3f02ca6d865ecfbdb00e84773fa87a5bb Mon Sep 17 00:00:00 2001 From: overflowerror Date: Thu, 22 Feb 2024 18:34:01 +0100 Subject: [PATCH] feat: Begin of LSP --- lsp/.gitignore | 59 ++++++++++++++++++++++++++++++++++++++++++++++ lsp/Makefile | 32 +++++++++++++++++++++++++ lsp/gen/.gitignore | 0 lsp/obj/.gitignore | 0 lsp/src/main.c | 7 ++++++ 5 files changed, 98 insertions(+) create mode 100644 lsp/.gitignore create mode 100644 lsp/Makefile create mode 100644 lsp/gen/.gitignore create mode 100644 lsp/obj/.gitignore create mode 100644 lsp/src/main.c diff --git a/lsp/.gitignore b/lsp/.gitignore new file mode 100644 index 0000000..2d4dc79 --- /dev/null +++ b/lsp/.gitignore @@ -0,0 +1,59 @@ +# Prerequisites +*.d + +# Object files +*.o +*.ko +*.obj +*.elf + +# Linker output +*.ilk +*.map +*.exp + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.a +*.la +*.lo + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +#*.out +*.app +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb +*.pdb + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf + +obj/ast.o +gen/** +build/** +macrofuck-lsp + +*.swp diff --git a/lsp/Makefile b/lsp/Makefile new file mode 100644 index 0000000..28135d1 --- /dev/null +++ b/lsp/Makefile @@ -0,0 +1,32 @@ +CC = gcc +CFLAGS = -std=c11 -D_POSIX_C_SOURCE=200809L -Wall -Wpedantic -g -I./src -I./gen +LD = gcc +LDFLAGS = +YACC = bison +YFLAGS = -d +LEX = lex +LEXFLAGS = + + +OBJS = obj/main.o +DEPS = $(OBJS:%.o=%.d) + +-include $(DEPS) + +all: macrofuck-lsp + +obj/%.o: src/%.c + $(CC) $(CFLAGS) -c -o $@ $< + +macrofuck-lsp: $(OBJS) + $(LD) $(LDFLAGS) -o $@ $^ + +FORCE: ; + +clean: + @echo "Cleaning up" + @rm -f obj/*.o + @rm -f obj/*.d + @rm -f gen/*.c + @rm -f gen/*.h + @rm macrofuck-lsp diff --git a/lsp/gen/.gitignore b/lsp/gen/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/lsp/obj/.gitignore b/lsp/obj/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/lsp/src/main.c b/lsp/src/main.c new file mode 100644 index 0000000..c9317a1 --- /dev/null +++ b/lsp/src/main.c @@ -0,0 +1,7 @@ +#include + +int main(void) { + printf("Hello, World!\n"); + + return 0; +}