Makefile: integrate makeinfo to build the manual
Signed-off-by: Adrien 'neox' Bourmault <neox@a-lec.org>
This commit is contained in:
parent
ede7ecac07
commit
01af624424
|
@ -2,4 +2,5 @@ bin/*
|
||||||
build/*
|
build/*
|
||||||
docs/html/*
|
docs/html/*
|
||||||
docs/rtfm/man3/*
|
docs/rtfm/man3/*
|
||||||
|
docs/rtfm/*.pdf
|
||||||
scripts/junk
|
scripts/junk
|
17
Makefile
17
Makefile
|
@ -1,4 +1,4 @@
|
||||||
.PHONY: run clean install all docs
|
.PHONY: run clean install all docs man
|
||||||
.DELETE_ON_ERROR: $(BINDIR)/Getting_Started_with_GTK
|
.DELETE_ON_ERROR: $(BINDIR)/Getting_Started_with_GTK
|
||||||
.DEFAULT_GOAL: all
|
.DEFAULT_GOAL: all
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ MAKEFLAGS += --jobs=$(CPUS)
|
||||||
|
|
||||||
CC=gcc
|
CC=gcc
|
||||||
DOXYGEN=doxygen
|
DOXYGEN=doxygen
|
||||||
|
MAKEINFO=makeinfo
|
||||||
CFLAGS=`pkg-config --cflags gtk4 epoxy glib-2.0 libxml-2.0`
|
CFLAGS=`pkg-config --cflags gtk4 epoxy glib-2.0 libxml-2.0`
|
||||||
LDFLAGS=`pkg-config --libs gtk4 epoxy glib-2.0 libxml-2.0` -lGL -lGLU -lm -lepoxy -lX11 -lGLEW
|
LDFLAGS=`pkg-config --libs gtk4 epoxy glib-2.0 libxml-2.0` -lGL -lGLU -lm -lepoxy -lX11 -lGLEW
|
||||||
WARNINGS = -Wall
|
WARNINGS = -Wall
|
||||||
|
@ -19,6 +20,8 @@ BINDIR=bin
|
||||||
BUILDDIR=build
|
BUILDDIR=build
|
||||||
SRCDIR=src
|
SRCDIR=src
|
||||||
DOCSDIR=docs
|
DOCSDIR=docs
|
||||||
|
MANSRC=$(DOCSDIR)/rtfm/*.texi
|
||||||
|
MANDIR=$(DOCSDIR)/rtfm
|
||||||
|
|
||||||
SOURCES = $(shell find $(SRCDIR) -type f -name "*.c")
|
SOURCES = $(shell find $(SRCDIR) -type f -name "*.c")
|
||||||
OBJECTS = $(patsubst %.c,$(BUILDDIR)/%.o,$(SOURCES))
|
OBJECTS = $(patsubst %.c,$(BUILDDIR)/%.o,$(SOURCES))
|
||||||
|
@ -64,6 +67,13 @@ $(BUILDDIR)/%.o: %.c Makefile | $(BUILDDIR)
|
||||||
@$(CC) $(CFLAGS) $(WARNINGS) $(DEBUG) $(OPTIMIZE) -c $< -o $@
|
@$(CC) $(CFLAGS) $(WARNINGS) $(DEBUG) $(OPTIMIZE) -c $< -o $@
|
||||||
@echo " CC $@"
|
@echo " CC $@"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Manual
|
||||||
|
#
|
||||||
|
$(MANDIR)/gem-graph.pdf: $(MANSRC)
|
||||||
|
cd $(BUILDDIR) && $(MAKEINFO) --pdf ../$(MANSRC) -o ../$(MANDIR)/gem-graph.pdf
|
||||||
|
@echo " MAKEINFO $(MANSRC)"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Virtual recipes
|
# Virtual recipes
|
||||||
#
|
#
|
||||||
|
@ -77,12 +87,15 @@ docs: $(SOURCES) $(DEPENDENCIES)
|
||||||
@$(DOXYGEN) $(DOCSDIR)/doxyfile
|
@$(DOXYGEN) $(DOCSDIR)/doxyfile
|
||||||
@echo " DOXYGEN $(DOCSDIR)/doxyfile"
|
@echo " DOXYGEN $(DOCSDIR)/doxyfile"
|
||||||
|
|
||||||
|
man: $(MANDIR)/gem-graph.pdf
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -rf $(BINDIR)
|
@rm -rf $(BINDIR)
|
||||||
@echo " RM $(BINDIR)"
|
@echo " RM $(BINDIR)"
|
||||||
@rm -rf $(BUILDDIR)
|
@rm -rf $(BUILDDIR)
|
||||||
@echo " RM $(BUILDDIR)"
|
@echo " RM $(BUILDDIR)"
|
||||||
|
@rm -rf $(MANDIR)/gem-graph.pdf
|
||||||
|
@echo " RM $(MANDIR)/gem-graph.pdf"
|
||||||
|
|
||||||
# More docs :
|
# More docs :
|
||||||
# https://www.gnu.org/software/make/manual/
|
# https://www.gnu.org/software/make/manual/
|
||||||
|
|
Loading…
Reference in New Issue