craigsapp/humlib

Renovate makefile

Closed this issue · 2 comments

The makefile combines all source code into src/humlib.cpp, which causes the compiling process for the library (and hence the command-line programs) to take quite a while to compile. Split the combining of files into humlib.cpp and humlib.h into a separate process so that precompiled source code can be used to avoid compiling the entire library every time.

Implemented with commit c1f0fe2

Here is the result of make help:

Humlib make targets:
   make            Compile library and command-line tools (default).
   make clean      Delete object files.
   make clean-bin  Delete compiled CLI programs.
   make clean-lib  Delete library files.
   make dirs       Create obj and lib directories if they do not yet exist.
   make help       Show this list.
   make install    Copy CLI programs to /usr/local/bin
   make library    Compile humlib library.
   make min        Compile combined files humlib.cpp and humlib.h (in min directory)
   make min-test   Test Compile combined file humlib.cpp .h (in min directory)
   make programs   Same as default make target.
   make pugi       Compile pugixml library.
   make strip      Strip (remove debugging info) CLI programs.
   make superclean Delete object, library, and compiled CLI programs.
   make update     Download most recent code on Github.

Any other make target will be presumed to compile a specific
CLI program such as cli/flipper.cpp:
   make flipper

Type make to compile both the library and all of the programs.

Type make flipper to compile the library (if needed) for the flipper program in the cli directory (program will be created as bin/flipper).

Type make install or sudo make install to copy the compiled command- line programs to /usr/local/bin.