template for my C projects
-
Main file: myfile.c
-
Header: myfile.h
-
Unit tests: myfile_test.c
The method main()
in myfile.c is guarded by the macro FAB_MAIN
so that it can be left out of the binary when running unit tests
To build and run the project and the tests, there is availbble:
-
VSCode tasks
-
Makefile
The following sections show how to use Makefile.
make unittest
make myfile CPPFLAGS=-DFAB_MAIN