diff options
author | Bernhard Schmidt <berni@debian.org> | 2020-09-30 21:10:50 +0200 |
---|---|---|
committer | Bernhard Schmidt <berni@debian.org> | 2020-09-30 21:10:50 +0200 |
commit | 5246174f27866c0e9e22844d998f3c97cac54050 (patch) | |
tree | 7cdcbac7dfb50f319c053b2f35325c5dc368bdd8 /sample/sample-plugins/Makefile.plugins | |
parent | 57f0b7b331088e489e93ae89ee0aed98381d8806 (diff) |
New upstream version 2.5~rc2upstream/2.5_rc2
Diffstat (limited to 'sample/sample-plugins/Makefile.plugins')
-rw-r--r-- | sample/sample-plugins/Makefile.plugins | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/sample/sample-plugins/Makefile.plugins b/sample/sample-plugins/Makefile.plugins new file mode 100644 index 0000000..37559a8 --- /dev/null +++ b/sample/sample-plugins/Makefile.plugins @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Copyright (C) 2020 OpenVPN Inc <sales@openvpn.net> +# + +# +# Plug-ins to build - listed entries should not carry any extensions +# +PLUGINS = \ + defer/simple \ + keying-material-exporter-demo/keyingmaterialexporter \ + log/log log/log_v3 \ + simple/base64 \ + simple/simple \ + client-connect/sample-client-connect + +# All the plugins to build - rewritten with .so extension +all : $(foreach var, $(PLUGINS), $(var).so) + +# Do not automatically remove object files +# This is a special Make setting, to avoid adding an implicit +# 'rm' command on object files - due to the .c.o/%.so rules below +.PRECIOUS: %.o + +# Compile step +.c.o : + test -d `dirname $@` || $(MKDIR_P) `dirname $@`; \ + $(CC) -c -o $@ $(CFLAGS) $(AM_CPPFLAGS) -fPIC $< + +# Link step +%.so : %.o + $(CC) $(LDFLAGS) -shared -fPIC -o $@ $< + +# Clean up all build object and shared object files +clean : + rm -f $(foreach var, $(PLUGINS), $(var).o) \ + $(foreach var, $(PLUGINS), $(var).so) |