aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2016-07-11 14:50:49 +0100
committerRichard van der Hoff <richard@matrix.org>2016-07-11 14:50:49 +0100
commitd30db7b5c0a36fcf944ed7babbd8fb11193a1fcd (patch)
treed559f0dd05f6fd2c38003310a26ce9d7d7f4ef26 /Makefile
parentf3b9c3bbbbdeab9ec5e5f0bf8af7f0694926e495 (diff)
Makefile rules to build the rst into html
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 2bfd2ab..1af9b6b 100644
--- a/Makefile
+++ b/Makefile
@@ -44,6 +44,10 @@ JS_PRE := $(wildcard javascript/*pre.js)
JS_POST := javascript/olm_outbound_group_session.js \
javascript/olm_inbound_group_session.js \
javascript/olm_post.js
+DOCS := tracing/README.html \
+ docs/olm.html \
+ README.html \
+ CHANGELOG.html
CPPFLAGS += -Iinclude -Ilib
# we rely on <stdint.h>, which was introduced in C99
@@ -143,7 +147,7 @@ $(JS_EXPORTED_FUNCTIONS): $(PUBLIC_HEADERS)
perl -MJSON -ne '$$f{"_$$1"}=1 if /(olm_[^( ]*)\(/; END { @f=sort keys %f; print encode_json \@f }' $^ > $@.tmp
mv $@.tmp $@
-all: test js lib debug
+all: test js lib debug doc
.PHONY: all
install-debug: debug
@@ -163,9 +167,12 @@ install: lib
.PHONY: install
clean:;
- rm -rf $(BUILD_DIR)
+ rm -rf $(BUILD_DIR) $(DOCS)
.PHONY: clean
+doc: $(DOCS)
+.PHONY: doc
+
### rules for building objects
$(BUILD_DIR)/release/%.o: %.c
mkdir -p $(dir $@)
@@ -219,6 +226,9 @@ $(BUILD_DIR)/fuzzers/debug_%: fuzzers/fuzz_%.c $(DEBUG_OBJECTS)
$(BUILD_DIR)/fuzzers/debug_%: fuzzers/fuzz_%.cpp $(DEBUG_OBJECTS)
$(LINK.cc) $< $(DEBUG_OBJECTS) $(LOADLIBES) $(LDLIBS) -o $@
+%.html: %.rst
+ rst2html $< $@
+
### dependencies
-include $(RELEASE_OBJECTS:.o=.d)