Build script updates#332
Conversation
ce65cf9 to
4cfca95
Compare
There was a problem hiding this comment.
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
Makefileto compile all native*.csources, generate/use dependency files (*.d), and add aV=1verbose mode. - Simplified
java.shto invokemaketargets instead of directly compiling/linking withgcc. - Fixed native-code warnings (unused parameters/variables) to support
-Wextra -Werror, and updatedREADME.mdinstructions.
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.
4cfca95 to
fe655d1
Compare
fe655d1 to
5c43149
Compare
cconlon
left a comment
There was a problem hiding this comment.
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? |
5c43149 to
ed66804
Compare
|
Looks good, will approve/merge once tests finish |
Makefileto compile all .c files, generate and use dependency files, add verbose mode, etcjava.shto usemakerather than vice-versa-Wextraand-Werror(trial run initially, may be too aggressive)