I've got as far as this:
Code:
make profile=1 debug=1 static_libs=1 rebuild
...
make -f gnu.mak rebuild check=extra
rm -f src/basic/branch.c.o src/basic/buffer.c.o src/basic/defect.c.o src/basic/encode.c.o src/basic/moment.c.o src/basic/pipefd.c.o src/basic/shared.c.o src/basic/thread.c.o src/basic/vector.c.o src/basic/string/achs.c.o src/basic/string/c16s.c.o src/basic/string/c32s.c.o src/basic/string/tchs.c.o src/basic/string/uchs.c.o src/basic/string/wchs.c.o
rm -f src/extra/viewfx/shader.c.o src/extra/viewfx/vfxapi.c.o src/extra/viewfx/vfxapp.c.o src/extra/viewfx/vfxbuf.c.o src/extra/viewfx/vfxcfg.c.o src/extra/viewfx/vfxdef.c.o src/extra/viewfx/vfxvar.c.o src/extra/viewfx/vfxwin.c.o
rm -f src/extra/viewfx/glfw/glfw_api.c.o src/extra/viewfx/glfw/glfw_eio.c.o
rm -f src/extra/viewfx/gl/opengl_api.c.o src/extra/viewfx/gl/opengl_app.c.o src/extra/viewfx/gl/opengl_def.c.o src/extra/viewfx/gl/opengl_err.c.o src/extra/viewfx/gl/opengl_shader.c.o src/extra/viewfx/gl/opengl_vfxbuf.c.o src/extra/viewfx/gl/opengl_vfxcfg.c.o src/extra/viewfx/gl/opengl_vfxvar.c.o
rm -f test/basic/main.c.o
rm -f test/extra/create.c.o test/extra/debug.c.o test/extra/events.c.o test/extra/launch.c.o test/extra/lib.c.o test/extra/main.c.o
rm -f bin/*basic*.so bin/*extra*.so
rm -f bin/*basic*.dll bin/*extra*.dll
rm -f bin/*basic*.out bin/*extra*.out
rm -f bin/*basic*.elf bin/*extra*.elf
rm -f bin/*basic*.app bin/*extra*.app
rm -f bin/*basic*.exe bin/*extra*.exe
rm -f bin/*basic*.AppImage bin/*extra*.AppImage
cc  -pg -D PROFILING -ggdb -D _DEBUG -Wall -Wextra -fPIC  -static -D BUILD_STATIC_BASIC -D BUILD_STATIC_EXTRA -o src/basic/branch.c.o -c src/basic/branch.c
cc  -pg -D PROFILING -ggdb -D _DEBUG -Wall -Wextra -fPIC  -static -D BUILD_STATIC_BASIC -D BUILD_STATIC_EXTRA -o src/basic/buffer.c.o -c src/basic/buffer.c
cc  -pg -D PROFILING -ggdb -D _DEBUG -Wall -Wextra -fPIC  -static -D BUILD_STATIC_BASIC -D BUILD_STATIC_EXTRA -o src/basic/defect.c.o -c src/basic/defect.c
cc  -pg -D PROFILING -ggdb -D _DEBUG -Wall -Wextra -fPIC  -static -D BUILD_STATIC_BASIC -D BUILD_STATIC_EXTRA -o src/basic/encode.c.o -c src/basic/encode.c
cc  -pg -D PROFILING -ggdb -D _DEBUG -Wall -Wextra -fPIC  -static -D BUILD_STATIC_BASIC -D BUILD_STATIC_EXTRA -o src/basic/moment.c.o -c src/basic/moment.c
cc  -pg -D PROFILING -ggdb -D _DEBUG -Wall -Wextra -fPIC  -static -D BUILD_STATIC_BASIC -D BUILD_STATIC_EXTRA -o src/basic/pipefd.c.o -c src/basic/pipefd.c
cc  -pg -D PROFILING -ggdb -D _DEBUG -Wall -Wextra -fPIC  -static -D BUILD_STATIC_BASIC -D BUILD_STATIC_EXTRA -o src/basic/shared.c.o -c src/basic/shared.c
cc  -pg -D PROFILING -ggdb -D _DEBUG -Wall -Wextra -fPIC  -static -D BUILD_STATIC_BASIC -D BUILD_STATIC_EXTRA -o src/basic/thread.c.o -c src/basic/thread.c
cc  -pg -D PROFILING -ggdb -D _DEBUG -Wall -Wextra -fPIC  -static -D BUILD_STATIC_BASIC -D BUILD_STATIC_EXTRA -o src/basic/vector.c.o -c src/basic/vector.c
cc  -pg -D PROFILING -ggdb -D _DEBUG -Wall -Wextra -fPIC  -static -D BUILD_STATIC_BASIC -D BUILD_STATIC_EXTRA -o src/basic/string/achs.c.o -c src/basic/string/achs.c
cc  -pg -D PROFILING -ggdb -D _DEBUG -Wall -Wextra -fPIC  -static -D BUILD_STATIC_BASIC -D BUILD_STATIC_EXTRA -o src/basic/string/c16s.c.o -c src/basic/string/c16s.c
cc  -pg -D PROFILING -ggdb -D _DEBUG -Wall -Wextra -fPIC  -static -D BUILD_STATIC_BASIC -D BUILD_STATIC_EXTRA -o src/basic/string/c32s.c.o -c src/basic/string/c32s.c
cc  -pg -D PROFILING -ggdb -D _DEBUG -Wall -Wextra -fPIC  -static -D BUILD_STATIC_BASIC -D BUILD_STATIC_EXTRA -o src/basic/string/tchs.c.o -c src/basic/string/tchs.c
cc  -pg -D PROFILING -ggdb -D _DEBUG -Wall -Wextra -fPIC  -static -D BUILD_STATIC_BASIC -D BUILD_STATIC_EXTRA -o src/basic/string/uchs.c.o -c src/basic/string/uchs.c
cc  -pg -D PROFILING -ggdb -D _DEBUG -Wall -Wextra -fPIC  -static -D BUILD_STATIC_BASIC -D BUILD_STATIC_EXTRA -o src/basic/string/wchs.c.o -c src/basic/string/wchs.c
cc -pg -ggdb -Wl,-rpath,.  -fPIC -static -D BUILD_STATIC_BASIC -D BUILD_STATIC_EXTRA -o bin/libd-p-basic.a
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../lib/gcrt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
...
Compilation failed.
I'm sure it's a minor fix but I don't see what I did wrong, anyone able to see it?