Skip to content

Build script updates#332

Merged
cconlon merged 1 commit intowolfSSL:masterfrom
padelsbach:padelsbach/build-updates
Feb 20, 2026
Merged

Build script updates#332
cconlon merged 1 commit intowolfSSL:masterfrom
padelsbach:padelsbach/build-updates

Conversation

@padelsbach
Copy link
Copy Markdown
Contributor

  • Update Makefile to compile all .c files, generate and use dependency files, add verbose mode, etc
  • Update java.sh to use make rather than vice-versa
  • Compile with -Wextra and -Werror (trial run initially, may be too aggressive)
  • Fix a handful of warnings/errors that arose from ^^
  • Update readme

@padelsbach padelsbach requested a review from cconlon February 12, 2026 23:17
@padelsbach padelsbach assigned cconlon and padelsbach and unassigned cconlon Feb 12, 2026
@padelsbach padelsbach force-pushed the padelsbach/build-updates branch 5 times, most recently from ce65cf9 to 4cfca95 Compare February 13, 2026 17:49
@cconlon cconlon requested review from Copilot and removed request for cconlon February 13, 2026 21:15
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the project’s build workflow by moving native JNI compilation into the Makefile, tightening compiler warning settings, and updating supporting scripts/docs accordingly.

Changes:

  • Reworked Makefile to compile all native *.c sources, generate/use dependency files (*.d), and add a V=1 verbose mode.
  • Simplified java.sh to invoke make targets instead of directly compiling/linking with gcc.
  • Fixed native-code warnings (unused parameters/variables) to support -Wextra -Werror, and updated README.md instructions.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
native/com_wolfssl_WolfSSLSession.c Initializes variables and silences unused JNI parameters to satisfy stricter warnings.
native/com_wolfssl_WolfSSLContext.c Minor formatting + unused-parameter fixes under conditional compilation.
native/com_wolfssl_WolfSSLCertificate.c Unused-parameter fix and warning cleanup in EKU handling.
native/com_wolfssl_WolfSSLCertRequest.c Silences unused JNI parameter to avoid -Wunused-parameter.
native/com_wolfssl_WolfSSL.c Unused-parameter fixes in JNI exports to keep builds warning-clean.
java.sh Converted to a thin wrapper calling make clean-native native.
README.md Updated build instructions for make/ant workflow and new build flags.
Makefile Added native build system (wildcard sources, .d deps, verbosity, -Wextra -Werror, new targets).
.gitignore Ignores generated native dependency files (native/*.d).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Makefile
Comment thread README.md Outdated
@padelsbach padelsbach force-pushed the padelsbach/build-updates branch from 4cfca95 to fe655d1 Compare February 13, 2026 22:47
@padelsbach padelsbach assigned cconlon and unassigned padelsbach Feb 13, 2026
@padelsbach padelsbach force-pushed the padelsbach/build-updates branch from fe655d1 to 5c43149 Compare February 16, 2026 18:58
Copy link
Copy Markdown
Member

@cconlon cconlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we can add back in some of the info that used to print out with java.sh but with the Makefile approach, for example the old way used to print info:

Compiling Native JNI library:
    WOLFSSL_INSTALL_DIR = /usr/local
    JAVA_HOME already set = /Users/chrisc/.sdkman/candidates/java/current
    CFLAGS = <none>
    Detected Darwin/OSX host OS
        Darwin x86_64
    Java Home = /Users/chrisc/.sdkman/candidates/java/current
    Generated ./lib/libwolfssljni.dylib

This was helpful from time to time for debugging user issues, when they sent over logs of their build we could see what a few things were set to.

Comment thread Makefile
Comment thread README.md Outdated
Comment thread Makefile
@cconlon cconlon assigned padelsbach and unassigned cconlon Feb 19, 2026
@padelsbach
Copy link
Copy Markdown
Contributor Author

I'm wondering if we can add back in some of the info that used to print out with java.sh but with the Makefile approach, for example the old way used to print info:

Compiling Native JNI library:
    WOLFSSL_INSTALL_DIR = /usr/local
    JAVA_HOME already set = /Users/chrisc/.sdkman/candidates/java/current
    CFLAGS = <none>
    Detected Darwin/OSX host OS
        Darwin x86_64
    Java Home = /Users/chrisc/.sdkman/candidates/java/current
    Generated ./lib/libwolfssljni.dylib

This was helpful from time to time for debugging user issues, when they sent over logs of their build we could see what a few things were set to.

Updated to this. How does it look?

root in wolfssljni on  padelsbach/build-updates [⇕$!] …
➜ make native
Compiling Native JNI library:
    WOLFSSL_INSTALL_DIR = /usr/local
    WOLFSSL_LIBNAME     = wolfssl
    JAVA_HOME           = /usr/lib/jvm/java-21-openjdk-arm64
    CFLAGS              = <none>
    Host OS             = Linux aarch64
  CC      native/com_wolfssl_WolfCryptECC.c
  CC      native/com_wolfssl_WolfCryptEccKey.c
  CC      native/com_wolfssl_WolfCryptRSA.c
  CC      native/com_wolfssl_WolfSSL.c
  CC      native/com_wolfssl_WolfSSLCertificate.c
  CC      native/com_wolfssl_WolfSSLCertManager.c
  CC      native/com_wolfssl_WolfSSLCertRequest.c
  CC      native/com_wolfssl_WolfSSLContext.c
  CC      native/com_wolfssl_WolfSSLCRL.c
  CC      native/com_wolfssl_WolfSSLNameConstraints.c
  CC      native/com_wolfssl_WolfSSLSession.c
  CC      native/com_wolfssl_WolfSSLX509Name.c
  CC      native/com_wolfssl_WolfSSLX509StoreCtx.c
  LD      lib/libwolfssljni.so
    Generated ./lib/libwolfssljni.so

@padelsbach padelsbach force-pushed the padelsbach/build-updates branch from 5c43149 to ed66804 Compare February 19, 2026 22:06
@padelsbach padelsbach assigned cconlon and unassigned padelsbach Feb 19, 2026
@cconlon
Copy link
Copy Markdown
Member

cconlon commented Feb 19, 2026

Looks good, will approve/merge once tests finish

@cconlon cconlon merged commit 13cb353 into wolfSSL:master Feb 20, 2026
98 checks passed
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.

3 participants