File: Makefile.am

package info (click to toggle)
fence-virt 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 772 kB
  • sloc: ansic: 10,257; cpp: 382; makefile: 272; sh: 214; lex: 113; yacc: 105
file content (169 lines) | stat: -rw-r--r-- 4,889 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
###############################################################################
###############################################################################
##
##  Copyright (C) 2009-2019 Red Hat, Inc.
##  
##  This copyrighted material is made available to anyone wishing to use,
##  modify, copy, or redistribute it subject to the terms and conditions
##  of the GNU General Public License v.2.
##
###############################################################################
###############################################################################

MAINTAINERCLEANFILES		= Makefile.in

noinst_HEADERS			= cpg.h serial.h uuid-test.h virt.h

sbin_PROGRAMS			= fence_virtd

#
# daemon
#
fence_virtd_SOURCES		= main.c plugin.c config.c static_map.c uuid-test.c \
				  daemon_init.c

fence_virtd_CFLAGS		= $(AM_CFLAGS) \
				  $(nss_CFLAGS) $(xml2_CFLAGS) $(uuid_CFLAGS) $(PTHREAD_CFLAGS)

fence_virtd_LDADD		= $(CONFIG_LIBS) $(COMMON_LIBS) \
				  $(nss_LIBS) $(xml2_LIBS) $(uuid_LIBS) $(PTHREAD_LIBS) $(dl_LIBS)

fence_virtd_LDFLAGS		= $(AM_LDFLAGS) $(COMMON_LDFLAGS)

#
# modules
#

virt_la_SOURCES			= libvirt.c
null_la_SOURCES			= null.c
virt_qmf_la_SOURCES		= libvirt-qmf.cpp
pm_fence_la_SOURCES		= pm-fence.c
cpg_la_SOURCES			= cpg-virt.c cpg.c
multicast_la_SOURCES		= mcast.c
tcp_la_SOURCES			= tcp.c
vsock_la_SOURCES		= vsock.c
serial_la_SOURCES		= virt-serial.c virt-sockets.c serial.c

#################
# Modular build #
#################
if modularbuild

fence_virtd_CFLAGS		+= -DMODULE_PATH=\"$(pkglibdir)/\"

pkglib_LTLIBRARIES		=

MODULESCFLAGS			= $(AM_CFLAGS)
MODULESLDFLAGS			= $(AM_LDFLAGS) $(COMMON_LIBS) $(COMMON_LDFLAGS) -module -avoid-version -export-dynamic

if modlibvirt
pkglib_LTLIBRARIES		+= virt.la
virt_la_SOURCES			+= virt.c uuid-test.c
virt_la_CFLAGS			= $(MODULESCFLAGS) $(nss_CFLAGS) $(virt_CFLAGS)
virt_la_LDFLAGS			= $(MODULESLDFLAGS) $(nss_LIBS) $(virt_LIBS)
endif
if modlibvirtqmf
pkglib_LTLIBRARIES		+= virt-qmf.la
virt_qmf_la_SOURCES		+= uuid-test.c
virt_qmf_la_CXXFLAGS		= $(MODULESCFLAGS) $(nss_CFLAGS) $(qpid_CFLAGS)
virt_qmf_la_LDFLAGS		= $(MODULESLDFLAGS) $(nss_LIBS) $(qpid_LIBS)
endif
if modpmfence
pkglib_LTLIBRARIES		+= pm-fence.la
pm_fence_la_CFLAGS		= $(MODULESCFLAGS) $(nss_CFLAGS) $(cib_CFLAGS) $(glib2_CFLAGS) $(xml2_CFLAGS)
pm_fence_la_LDFLAGS		= $(MODULESLDFLAGS) $(nss_LIBS) $(cib_LIBS) $(glib2_LIBS) $(xml2_LIBS)
endif
if modcpg
pkglib_LTLIBRARIES		+= cpg.la
cpg_la_SOURCES			+= virt.c history.c uuid-test.c
cpg_la_CFLAGS			= $(MODULESCFLAGS) $(nss_CFLAGS) $(cpg_CFLAGS) $(virt_CFLAGS)
cpg_la_LDFLAGS			= $(MODULESLDFLAGS) $(nss_LIBS) $(cpg_LIBS) $(virt_LIBS)
endif
if modmulticast
pkglib_LTLIBRARIES		+= multicast.la
multicast_la_SOURCES		+= history.c
multicast_la_CFLAGS		= $(MODULESCFLAGS) $(nss_CFLAGS)
multicast_la_LDFLAGS		= $(MODULESLDFLAGS) $(nss_LIBS)
endif
if modserial
pkglib_LTLIBRARIES		+= serial.la
serial_la_SOURCES		+= history.c
serial_la_CFLAGS		= $(MODULESCFLAGS) $(nss_CFLAGS) $(xml2_CFLAGS) $(virt_CFLAGS)
serial_la_LDFLAGS		= $(MODULESLDFLAGS) $(nss_LIBS) $(xml2_LIBS) $(virt_LIBS)
endif
if modtcp
pkglib_LTLIBRARIES		+= tcp.la
tcp_la_SOURCES			+= history.c
tcp_la_CFLAGS			= $(MODULESCFLAGS) $(nss_CFLAGS)
tcp_la_LDFLAGS			= $(MODULESLDFLAGS) $(nss_LIBS)
endif
if modvsock
pkglib_LTLIBRARIES		+= vsock.la
vsock_la_SOURCES		+= history.c
vsock_la_CFLAGS			= $(MODULESCFLAGS) $(nss_CFLAGS)
vsock_la_LDFLAGS		= $(MODULESLDFLAGS) $(nss_LIBS)
endif
if modnull
pkglib_LTLIBRARIES		+= null.la
null_la_CFLAGS			= $(MODULESCFLAGS)
null_la_LDFLAGS			= $(MODULESLDFLAGS)
endif

else

####################
# Monolithic build #
####################

# avoid a linking issues when:
# 1) do a server modular build
# 2) run configure to switch to monolithic build without make clean
# 3) do a server build
#
# libtool will get confused by the presence of .la files in the builddir
# and will fail to link the binary

EXTRA_fence_virtd_DEPENDENCIES	= cleanmods

cleanmods:
	@rm -rf $(builddir)/*.la

fence_virtd_SOURCES		+= virt.c history.c

if modlibvirt
fence_virtd_SOURCES		+= $(libvirt_la_SOURCES)
fence_virtd_CFLAGS		+= $(virt_CFLAGS)
fence_virtd_LDADD		+= $(virt_LIBS)
endif
if modlibvirtqmf
fence_virtd_SOURCES		+= $(libvirt_qmf_la_SOURCES)
fence_virtd_CFLAGS		+= $(qpid_CFLAGS)
fence_virtd_LDADD		+= $(qpid_LIBS)
endif
if modpmfence
fence_virtd_SOURCES		+= $(pm_fence_la_SOURCES)
fence_virtd_CFLAGS		+= $(cib_CFLAGS)
fence_virtd_LDADD		+= $(cib_LIBS)
endif
if modcpg
fence_virtd_SOURCES		+= $(cpg_la_SOURCES)
fence_virtd_CFLAGS		+= $(cpg_CFLAGS)
fence_virtd_LDADD		+= $(cpg_LIBS)
endif
if modmulticast
fence_virtd_SOURCES		+= $(multicast_la_SOURCES)
endif
if modserial
fence_virtd_SOURCES		+= $(serial_la_SOURCES)
endif
if modtcp
fence_virtd_SOURCES		+= $(tcp_la_SOURCES)
endif
if modvsock
fence_virtd_SOURCES		+= $(vsock_la_SOURCES)
endif
if modnull
fence_virtd_SOURCES		+= $(null_la_SOURCES)
endif

endif