From dabfe3f7a3f165a77d1301a0826bdb7a1049317d Mon Sep 17 00:00:00 2001 From: Fabrice Date: Sun, 1 Mar 2026 17:50:59 +0100 Subject: init --- .gitignore | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ makefile | 41 +++++++++++++++++++++++++++++++++++++++++ src/voidc.cc | 3 +++ 3 files changed, 103 insertions(+) create mode 100644 .gitignore create mode 100644 makefile create mode 100644 src/voidc.cc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..931f0b9 --- /dev/null +++ b/.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 + +# debug information files +*.dwo + +# Custom +*.json +/voidc \ No newline at end of file diff --git a/makefile b/makefile new file mode 100644 index 0000000..2bdec21 --- /dev/null +++ b/makefile @@ -0,0 +1,41 @@ +.SILENT: +.DEFAULT_GOAL := all + +# ====== Configurations and Binaries ====== # +CXX := clang++ +RM := rm -f +PRINTF := printf + +# ====== Flags ====== # +CCXX_FLAGS := \ + -Wall -Wextra -Werror -pedantic \ + -MMD -MP + +CXX_FLAGS := -std=c++14 -nostdlib++ \ + $(CCXX_FLAGS) -fno-rtti -fno-exceptions + +LD_FLAGS := + +# ====== Sources ====== # +TOP_DIR := . +SRC_DIR := $(TOP_DIR)/src + +VOIDC_O := $(SRC_DIR)/voidc.o +VOIDC_D := $(SRC_DIR)voidc.d +VOIDC := $(TOP_DIR)/voidc + +# ====== Rules ====== # +.PHONY: all +all: $(VOIDC) + +$(VOIDC): $(VOIDC_O) + $(PRINTF) " CXXLD %s\n" $< + $(CXX) $< -o $@ $(LD_FLAGS) + +%.o: %.cc + $(PRINTF) " CXX %s\n" $< + $(CXX) $< -o $@ -c $(CXX_FLAGS) + +.PHONY: clean +clean: + $(RM) $(VOIDC_O) $(VOIDC_D) $(VOIDC) diff --git a/src/voidc.cc b/src/voidc.cc new file mode 100644 index 0000000..e9436dd --- /dev/null +++ b/src/voidc.cc @@ -0,0 +1,3 @@ +int main() { + +} -- cgit v1.2.3