From c9fd8157533ab6baabb0eb5ca4d3611212f148f6 Mon Sep 17 00:00:00 2001 From: hybrid Date: Tue, 2 Jun 2026 05:16:16 +0300 Subject: add: initial project files --- .gitignore | 3 +++ Makefile | 34 ++++++++++++++++++++++++++++++++++ README.md | 0 src/main.c | 6 ++++++ 4 files changed, 43 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 README.md create mode 100644 src/main.c diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a2bc8ff --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# ignore C files +**/*.o +bin/ \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f07c32b --- /dev/null +++ b/Makefile @@ -0,0 +1,34 @@ +CC ?= gcc +CFLAGS := -Wall -O2 -std=c99 +LDFLAGS := +LDLIBS := + +SRCDIR := src +BINDIR := bin +OBJDIR := obj +DIRS := $(SRCDIR) $(BINDIR) $(OBJDIR) + +SRC := $(shell find $(SRCDIR) -type f -printf "%f ") +DEPS := $(OBJ:.o=.d) +OBJ := $(SRC:%.c=$(OBJDIR)/%.o) + +TARGET := $(BINDIR)/cgit_auth + +# Rules +.PHONY: all clean + +all: $(TARGET) + +$(OBJDIR)/%.o: $(SRCDIR)/%.c | $(OBJDIR) + $(CC) $(CFLAGS) -o $@ -c $< + +$(DIRS): + @mkdir -p $@ + +-include $(DEPS) + +$(TARGET): $(OBJ) | $(BINDIR) + $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) $(LDLIBS) + +clean: + rm -rf $(BINDIR) $(OBJDIR) diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..a0318ef --- /dev/null +++ b/src/main.c @@ -0,0 +1,6 @@ +#include +#include + +int main(int argc, char **argv) { + return 0; +} -- cgit v1.3.1