From eeffd37e160057c2953b1484a5d916ace6dec005 Mon Sep 17 00:00:00 2001 From: "me@ow.nekobit.net" Date: Wed, 19 Jan 2022 01:45:03 +0000 Subject: [PATCH] Mastodont FossilOrigin-Name: 5c85e9e9ad0154fc7a1e59c80ecc184b131e3ed6807d0cb46dcd3d4ff898dffb --- .gitmodules | 3 +++ Makefile | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..3bf64dd --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "mastodont"] + path = mastodont + url = https://git.nekobit.net/mastodont-c.git/ diff --git a/Makefile b/Makefile index 2cc207e..96cb5c3 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ CC ?= cc +GIT ?= git CFLAGS = -Wall LDFLAGS = -lcurl SRC = $(wildcard src/*.c) @@ -9,7 +10,12 @@ PAGES_CMP = $(patsubst %.html,%.chtml,$(PAGES)) DIST = dist/ TARGET = ratfe.cgi -all: $(TARGET) +# Mastodont +MASTODONT = mastodont/ +MASTODONT_REPO = https://git.nekobit.net/repos/mastodont-c.git + +all: mastodont $(TARGET) +mastodont: $(MASTODONT) $(TARGET): filec $(PAGES_CMP) $(OBJ) $(CC) -o $(DIST)$(TARGET) $(LDFLAGS) $(OBJ) @@ -23,6 +29,10 @@ filec: src/file-to-c/main.o $(PAGES_DIR)/index.chtml: $(PAGES_DIR)/index.html ./file-to-c $< data_index_html > $@ +$(MASTODONT): + $(GIT) submodule foreach git pull + make -C $(MASTODONT) + %.o: %.c $(CC) $(CFLAGS) -c $< -o $@