adding web generator

git-svn-id: file:///raid/svn-personal/irc-archiver/trunk@9 f310dea9-ad02-7e44-859a-30a050007fc7
This commit is contained in:
Nishi 2024-08-30 03:51:01 +00:00
parent ee3ab054db
commit d45099dae9
5 changed files with 30 additions and 5 deletions

View File

@ -5,7 +5,7 @@ include $(PWD)/Platform/$(PLATFORM).mk
.PHONY: all clean
.SUFFIXES: .c .o
OBJS = main.o util.o db.o bot.o ircfw.o
OBJS = main.o util.o db.o bot.o ircfw.o ../Web/web.a
all: ircarc$(EXEC)
@ -13,7 +13,7 @@ ircarc$(EXEC): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
.c.o:
$(CC) $(CFLAGS) -c -o $@ $<
$(CC) $(CFLAGS) -I $(PWD)/Web -c -o $@ $<
clean:
rm -f *.o *.exe ircarc

View File

@ -5,15 +5,19 @@ PLATFORM = generic
FLAGS = PWD=$(PWD) PLATFORM=$(PLATFORM)
.PHONY: all format clean ./Bot
.PHONY: all format clean ./Bot ./Web
all: ./Bot
./Bot::
./Bot:: ./Web
$(MAKE) -C $@ $(FLAGS)
./Web::
$(MAKE) -C $@ $(FLAGS)
format:
clang-format --verbose -i `find . -name "*.c" -or -name "*.h"`
clean:
$(MAKE) -C $@ $(FLAGS) clean
$(MAKE) -C ./Bot $(FLAGS) clean
$(MAKE) -C ./Web $(FLAGS) clean

View File

@ -1,6 +1,7 @@
# $Id$
CC = cc
AR = ar
CFLAGS = -std=c99
LDFLAGS =
LIBS = -lsqlite3

19
Web/Makefile Normal file
View File

@ -0,0 +1,19 @@
# $Id$
include $(PWD)/Platform/$(PLATFORM).mk
.PHONY: all clean
.SUFFIXES: .c .o
OBJS = db.o
all: web.a
web.a: $(OBJS)
$(AR) rcs $@ $(OBJS)
.c.o:
$(CC) $(CFLAGS) -c -o $@ $<
clean:
rm -f *.a *.o

1
Web/db.c Normal file
View File

@ -0,0 +1 @@
/* $Id$ */