Use CFLAGS and LDFLAGS when building plugins so that our libraries, particularly
openssl3 which is in a weird location, are found.

https://github.com/uniconproject/unicon/issues/569
https://github.com/uniconproject/unicon/pull/571
--- plugins/src/Makedefs.orig	2020-12-20 23:08:43.000000000 -0600
+++ plugins/src/Makedefs	2026-04-03 03:24:31.000000000 -0500
@@ -27,7 +27,7 @@
 	cp  $(TLIB) $(LIBD)/
 
 $(TLIB): $(COBJ)
-	$(CC) $(LDDYN2) -o $(TLIB) $(CFDYN2) $(COBJ) ../../lib/icall.$(O) $(MYLIBS) $(XLIBS)
+	$(CC) $(LDDYN2) -o $(TLIB) $(CFDYN2) $(COBJ) ../../lib/icall.$(O) $(LDFLAGS) $(MYLIBS) $(XLIBS)
 	cp $(TLIB) $(LIBD)
 	
 # Unicon interface
@@ -37,7 +37,7 @@
 	rm $(LIBD)/$<
 
 %.o: %.c
-	$(CC) $(CFDYN2) -c $<
+	$(CC) $(CFDYN2) $(CFLAGS) -c $<
 
 zip:
 	 zip $(LNAME).zip Makefile *.icn *.c *.h
