Mastodont

FossilOrigin-Name: 5c85e9e9ad0154fc7a1e59c80ecc184b131e3ed6807d0cb46dcd3d4ff898dffb
This commit is contained in:
me@ow.nekobit.net 2022-01-19 01:45:03 +00:00
parent 90eed3f08f
commit eeffd37e16
2 changed files with 14 additions and 1 deletions

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "mastodont"]
path = mastodont
url = https://git.nekobit.net/mastodont-c.git/

View file

@ -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 $@