commit 6d62c6c1a2707c496e2b4aefb303a9e6afa85add Author: LDA Date: Wed Jun 12 13:31:30 2024 +0200 [INIT] Ready, set, go! diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..716491b --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ +# Makefile for building Parsee +# ================================ +# TODO: Consider making something akin to a configure script that checks +# for dependencies, or maybe even use *autoconf* (the devil!) + + +# =========================== Parsee Flags ============================= +NAME=Parsee +VERSION=0.0.0 + +# =========================== Compilation Flags ============================ +CYTO_INC=/usr/local/include/ # Where Cytoplasm's include path is + # located. +CYTO_LIB=/usr/local/lib # Where's Cytoplasm's library is + # located. + +SOURCE=src +OBJECT=build +INCLUDES=include +CC=cc +CFLAGS=-I$(INCLUDES) -I$(CYTO_INC) -DNAME="\"$(NAME)\"" -DVERSION="\"$(VERSION)\"" -g -ggdb +LDFLAGS=-L $(CYTO_LIB) -lCytoplasm -Wl,--export-dynamic +BINARY=parsee +# ============================ Compilation ================================= +SRC_FILES:=$(shell find $(SOURCE) -name '*.c') +OBJ_FILES:=${subst $(SOURCE)/,$(OBJECT)/,$(patsubst %.c, %.o, $(SRC_FILES))} + +binary: $(OBJ_FILES) + $(CC) $(LDFLAGS) $(OBJ_FILES) -o $(BINARY) + +clean: + rm -rf $(OBJECT) $(BINARY) + +$(OBJECT)/%.o: $(SOURCE)/%.c + @mkdir -p $(shell dirname "$@") + $(CC) -c $(CFLAGS) $< -o $@ diff --git a/build/Main.o b/build/Main.o new file mode 100644 index 0000000..37f9d65 Binary files /dev/null and b/build/Main.o differ diff --git a/src/Main.c b/src/Main.c new file mode 100644 index 0000000..5c4a6ae --- /dev/null +++ b/src/Main.c @@ -0,0 +1,9 @@ +#include + +int +Main(void) +{ + Log(LOG_INFO, "%s - v%s", NAME, VERSION); + /* TODO: The rest of Parsee. */ + return 0; +}