commit ac47eecae739f172adfe92b99744c1f66a680c6f
Author: Yersa Nordman <finwo@pm.me>
Date: Wed, 15 May 2024 21:29:38 +0200
Project init
Diffstat:
12 files changed, 80 insertions(+), 0 deletions(-)
diff --git a/.editorconfig b/.editorconfig
@@ -0,0 +1,13 @@
+# 2d0e4a3f-ac19-430c-bf1b-46c68651ce21
+root = true
+
+[*]
+end_of_line = lf
+insert_final_newline = true
+charset = utf-8
+indent_size = 2
+indent_style = space
+trim_trailing_whitespace = true
+
+[Makefile*]
+indent_style = tab
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
@@ -0,0 +1,3 @@
+# f4d2ed80-57b6-46e6-b245-5049428a931d
+github: finwo
+liberapay: finwo
diff --git a/.gitignore b/.gitignore
@@ -0,0 +1,7 @@
+*.o
+/lib/
+.DS_Store
+._.DS_Store
+/libdtype.*
+/benchmark
+/test
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
@@ -0,0 +1,6 @@
+<!-- 46b43825-f791-485e-9445-415ee7bbbf2d -->
+# Contributor Code of Conduct
+
+This project adheres to No Code of Conduct. We are all adults. We accept anyone's contributions. Nothing else matters.
+
+For more information please visit the [No Code of Conduct](https://github.com/domgetter/NCoC) homepage.
diff --git a/Makefile b/Makefile
@@ -0,0 +1,37 @@
+SRC=$(wildcard src/*.c)
+
+INCLUDES?=
+INCLUDES+=-I src
+
+override CFLAGS?=-Wall -std=c99
+
+include lib/.dep/config.mk
+
+override CFLAGS+=$(INCLUDES)
+override CFLAGS+=-D_DEFAULT_SOURCE
+
+OBJ=$(SRC:.c=.o)
+
+BIN=\
+ benchmark \
+ test
+
+default: README.md $(BIN) libdtype.a libdtype.so
+
+libdtype.a: $(OBJ)
+ ar rcs $@ $^
+
+libdtype.so: $(OBJ)
+ $(CC) $(OBJ) --shared -o $@
+
+$(BIN): $(OBJ) $(BIN:=.o)
+ $(CC) $(CFLAGS) $(OBJ) $@.o -o $@
+
+.PHONY: clean
+clean:
+ rm -f $(OBJ)
+ rm -f $(BIN:=.o)
+ rm -f test
+
+README.md: ${SRC} src/dtype.h
+ stddoc < src/dtype.h > README.md
diff --git a/README.md b/README.md
diff --git a/benchmark.c b/benchmark.c
@@ -0,0 +1,3 @@
+int main() {
+ return 0;
+}
diff --git a/config.mk b/config.mk
@@ -0,0 +1 @@
+SRC+=__DIRNAME/src/dtype.c
diff --git a/package.ini b/package.ini
@@ -0,0 +1,7 @@
+[export]
+config.mk=config.mk
+include/finwo/dtype.h=src/dtype.h
+
+[package]
+deps=lib
+name=finwo/dtype
diff --git a/src/dtype.c b/src/dtype.c
diff --git a/src/dtype.h b/src/dtype.h
diff --git a/test.c b/test.c
@@ -0,0 +1,3 @@
+int main() {
+ return 0;
+}