added documentation to makefile

This commit is contained in:
Tristan Krause 2019-05-22 10:46:23 +02:00
parent 5d7407aded
commit cffac6757e
49 changed files with 111 additions and 352 deletions

View file

@ -5,6 +5,7 @@
# Environment
PATH_COMPILER = g++
PATH_DOXYGEN = ../bin/doxygen
# install paths
PATH_BIN = /usr/bin/
@ -22,6 +23,7 @@ OUT_TMP_PLOTTY = $(PATH_TMP_BIN)/plotty
OUT_DRV = $(PATH_LIB)/libb15fdrv.so
OUT_CLI = $(PATH_BIN)/b15fcli
OUT_PLOTTY = $(PATH_BIN)/plotty
OUT_DOC = ../../docs/html
# compiling & linking parameters
CFLAGS = -std=c++17 -O3 -Wall -Wextra -fPIC
@ -36,7 +38,7 @@ OBJECTS_CLI = cli.o ui/view.o ui/view_selection.o ui/view_promt.o ui/view_info
# *** TARGETS ***
all: drv cli
all: drv cli doc
drv: $(OBJECTS_DRV) $(OUT_TMP_DRV)
@ -47,7 +49,11 @@ cli: drv $(OBJECTS_CLI)
$(PATH_COMPILER) $(CFLAGS) $(OBJECTS_CLI) -L $(PATH_TMP_LIB) -o $(OUT_TMP_CLI) $(LDFLAGS_CLI)
@bash -c 'if [ ! -f "$(OUT_DRV)" ]; then echo -e "\n*** Warning ***: driver not installed\nType \"sudo make install\" to install or update b15fdrv."; fi'
install: all
doc:
@echo "Creating documentation with doxygen.."
$(PATH_DOXYGEN) doxygen-cfg
install:
@echo "Installing driver..."
@mkdir -p $(PATH_INCLUDE)
cp $(OUT_TMP_DRV) $(OUT_DRV)
@ -71,6 +77,7 @@ help:
clean:
@echo "Cleaning..."
rm -f $(OBJECTS_DRV) $(OBJECTS_CLI) $(OUT_TMP_CLI) $(OUT_TMP_DRV)
rm -rf $(OUT_DOC)
.cpp.o:
$(PATH_COMPILER) $(CFLAGS) -c $< -o $@