kisscommunity

kisscommunity.bvnf.space site sources
git clone git://bvnf.space/home/kiss/kisscommunity.git
Log | Files | Refs | Submodules | README | LICENSE

Makefile (601B)


      1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
.POSIX:

CFLAGS = -Wall -Wextra -std=c99 -pedantic
LDFLAGS = -static -s

all: html db.sqlite

html: build-page smu/smu htmlclean
	find wiki -type d -exec sh -ec 'PATH="$$PWD/smu:$$PATH" ./build-page "$$0" >$$0/index.html' {} \;

htmlclean:
	-find wiki -type f -name \*.html -exec rm {} \;
	-find wiki -type d -exec rmdir {} \; 2>/dev/null

db.sqlite:
	tclsh8.6 update_db.tcl

build-page: build-page.c
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ build-page.c

smu/smu:
	cd smu; patch -p1 < ../0001-support-tagged-links.patch
	cd smu; $(MAKE)

clean:
	rm -f build-page

.PHONY: all clean html htmlclean db.sqlite