File: Makefile.plugins

package info (click to toggle)
openvpn 2.6.3-1%2Bdeb12u3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 11,340 kB
  • sloc: ansic: 97,644; sh: 5,801; makefile: 791; python: 203; javascript: 73; perl: 66
file content (37 lines) | stat: -rw-r--r-- 986 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#  SPDX-License-Identifier: GPL-2.0-only
#
#  Copyright (C) 2020-2023 OpenVPN Inc <sales@openvpn.net>
#

#
# Plug-ins to build - listed entries should not carry any extensions
#
PLUGINS = \
	defer/multi-auth \
	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)