Skip to content

Commit f693a6b

Browse files
committed
Small makefile change, makefile details in readme
1 parent e1d177e commit f693a6b

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ uninstall:
5252
docs:
5353
@([ ! -d $(DOC_DIR) ] && mkdir -p $(DOC_DIR)) || true
5454
OUTDIR=$(DOC_DIR) INDIR=$(INCL_PATH) doxygen Doxyfile.mk
55+
$(BROWSER) $(DOC_DIR)/html/index.html
5556

5657
test:
5758
make CC="$(CC)" OBJD="$(BUILD_DIR)" BIND="$(BIN_DIR)" SRCD="$(TEST_DIR)" CXXARGS="$(CXXARGS) $(EXTRA_CXX) -I$(INCL_PATH)" LDARGS="$(LDARGS) $(EXTRA_LD)" -C $(TEST_DIR)/..

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,35 @@ Currently supported features:
2323

2424
Got another idea? Drop a feature request on the repo.
2525

26+
## Building
27+
The build system for fpgen is GNU make. The following targets are available:
28+
29+
Target name | Usage
30+
--- | ---
31+
`all` | Show all targets (Default target)
32+
`install` | installs the headers under
33+
`uninstall` | uninstalls the headers
34+
`docs` | generates the documentation using doxygen
35+
`test` | builds and runs the tests
36+
`clean` | cleans up test builds and documentation
37+
`coverage` | builds and runs the tests, then generates a coverage report
38+
39+
Some targets provide parameters you can overload:
40+
41+
Parameter name | Usage | Default value | Applicable targets
42+
--- | --- | --- | ---
43+
`CC` | The C++ compiler | `g++` | test, coverage
44+
`EXTRA_CXX` | Additional C++ compilation arguments | | test, coverage
45+
`EXTRA_LD` | Additional C++ linking arguments | | test, coverage
46+
`BUILD_DIR` | Object directory for tests | `./test/obj` | test, coverage
47+
`BIN_DIR` | Test binary directory | `./test/bin` | test, coverage
48+
`TEST_DIR` | Test source directory | `./test/src` | test, coverage
49+
`INSTALL_DIR` | Header installation directory | `/usr/include/fpgen` | install, uninstall
50+
`INCL_PATH` | Directory containing the headers | `./inc/` | install, docs, test, coverage
51+
`DOC_DIR` | Documentation output directory | `./docs/` | docs
52+
`BROWSER` | Default browser for (HTML) docs and coverage reports | `firefox` | docs, coverage
53+
`HTMLDIR` | Output directory for HTML coverage reports | `./cov/` | coverage
54+
2655
## Requirements
2756
This project strongly depends on C++20. For an optimal experience, I recommend GCC version 11.2 or greater.
2857
For the tests, we rely on Google Test via the Conan package manager, so make sure you have that installed as well.

0 commit comments

Comments
 (0)