Skip to content

Conversation

@IvanNardi
Copy link
Collaborator

This commit implements comprehensive improvements to the nDPI build system to enhance portability, enable parallel testing, and ensure reliable out-of-tree (VPATH) builds across all platforms.

Changes:

  1. Optimize library linking order (configure.ac, all Makefiles)

    • Reorder ADDITIONAL_LIBS to follow proper dependency hierarchy
    • Move low-level libraries (libm) to end of link line
    • Ensures compatibility with --as-needed linker flag
    • Improves LTO and static linking support
  2. Fix VPATH build dependencies (all Makefiles)

    • Add explicit dependencies on generated headers (ndpi_config.h, ndpi_define.h)
    • Prevents race conditions in parallel builds (make -j)
    • Ensures headers exist before compilation starts
  3. Replace mkdir -p with portable $(MKDIR_P) macro

  4. Enable parallel test execution (configure.ac)

    • Add 'parallel-tests' option to AM_INIT_AUTOMAKE
    • Allows test suites to run concurrently during 'make check'
  5. Add defensive .NOTPARALLEL directive (Makefile.am)

    • Prevents race conditions if 'make -j clean distclean' is run
  6. Fix clean target completeness (src/lib/Makefile.in)

    • Remove all .so symlinks (libndpi.so, libndpi.so.N)
    • Add cleanup for Windows DLL files (*.dll)
    • Explicitly remove versioned shared libraries

🤖 Generated with Claude Code

@IvanNardi IvanNardi force-pushed the build-system-improvements branch 2 times, most recently from 852da1d to f597ca8 Compare November 18, 2025 18:46
This commit implements comprehensive improvements to the nDPI build system
to enhance portability, enable parallel testing, and ensure reliable
out-of-tree (VPATH) builds across all platforms.

Changes:

1. Optimize library linking order (configure.ac, all Makefiles)
   - Reorder ADDITIONAL_LIBS to follow proper dependency hierarchy
   - Move low-level libraries (libm) to end of link line
   - Ensures compatibility with --as-needed linker flag
   - Improves LTO and static linking support

2. Fix VPATH build dependencies (all Makefiles)
   - Add explicit dependencies on generated headers (ndpi_config.h, ndpi_define.h)
   - Prevents race conditions in parallel builds (make -j)
   - Ensures headers exist before compilation starts

3. Replace mkdir -p with portable $(MKDIR_P) macro

4. Enable parallel test execution (configure.ac)
   - Add 'parallel-tests' option to AM_INIT_AUTOMAKE
   - Allows test suites to run concurrently during 'make check'

5. Add defensive .NOTPARALLEL directive (Makefile.am)
   - Prevents race conditions if 'make -j clean distclean' is run

6. Fix clean target completeness (src/lib/Makefile.in)
   - Remove all .so symlinks (libndpi.so, libndpi.so.N)
   - Add cleanup for Windows DLL files (*.dll)
   - Explicitly remove versioned shared libraries

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Ivan Nardi <[email protected]>
@IvanNardi IvanNardi force-pushed the build-system-improvements branch from f597ca8 to 16e65d5 Compare November 18, 2025 19:29
Ensure that performance test tools are compiled with project warning flags
(NDPI_CFLAGS) for consistent code quality standards across the codebase.

Previously, tests/performance/Makefile.in compiled tools (gcrypt-int,
gcrypt-gnu, substringsearch, strnstr, geo, patriciasearch) with only
user-provided CFLAGS, missing the project's warning flags (-W, -Wall,
-Wno-address-of-packed-member).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@sonarqubecloud
Copy link

@IvanNardi IvanNardi merged commit 1bbafbd into ntop:dev Nov 18, 2025
32 checks passed
@IvanNardi IvanNardi deleted the build-system-improvements branch November 18, 2025 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant