File: Makefile.am

package info (click to toggle)
fcoe-utils 1.0.31+git20160622.5dfd3e4-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,060 kB
  • sloc: ansic: 11,919; sh: 1,298; makefile: 81
file content (75 lines) | stat: -rw-r--r-- 2,900 bytes parent folder | download | duplicates (2)
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
## target programs, to be built and installed in $(prefix)/sbin
sbin_PROGRAMS = fcoeadm fcoemon fcping fipvlan fcnsq fcrls

## all targets should look for headers in the include directory
AM_CPPFLAGS = -I${srcdir}/include -I${builddir}/include
## pass the sysconfdir into the C proprocessor
AM_CPPFLAGS += -DSYSCONFDIR="\"${sysconfdir}\"" -D_FORTIFY_SOURCE=2
AM_CFLAGS = -Wall -Wformat=2 -Werror -Wmissing-prototypes -Wstrict-prototypes

## rules for building fcoeadm
fcoeadm_SOURCES = fcoeadm.c fcoeadm_display.c
fcoeadm_LDADD = lib/libutil.a libopenfcoe.a $(PCIACCESS_LIBS)
fcoeadm_CFLAGS = $(AM_CFLAGS)

## rules for building fcoemon
fcoemon_SOURCES = fcoemon.c
fcoemon_LDADD = lib/libutil.a -lrt
fcoemon_CFLAGS = $(AM_CFLAGS) $(DCBD_CFLAGS)

## rules for building fcping
fcping_SOURCES = fcping.c
fcping_LDADD = lib/libutil.a libopenfcoe.a $(PCIACCESS_LIBS) -lrt
fcping_CFLAGS = $(AM_CFLAGS)

## rules for building fipvlan
fipvlan_SOURCES = fipvlan.c
fipvlan_LDADD = lib/libutil.a

AUTOMAKE_OPTIONS=subdir-objects
noinst_LIBRARIES = lib/libutil.a libopenfcoe.a
lib_libutil_a_SOURCES = lib/fcoe_utils.c lib/sa_log.c lib/sa_select.c \
	lib/sa_timer.c lib/sa_other.c lib/fip.c lib/rtnetlink.c lib/sa_sys.c \
	lib/sysfs_hba.c
libopenfcoe_a_SOURCES = libopenfcoe.c

## header files that need to be distributed
noinst_HEADERS = fcoeadm_display.h fcoe_clif.h fcoemon.h \
	include/fcoemon_utils.h include/fcoe_utils.h include/fc_scsi.h \
	include/fc_types.h include/fip.h include/net_types.h include/rtnetlink.h \
	include/libopenfcoe.h include/scsi_netlink_fc.h include/scsi_netlink.h \
	include/strarr.h include/fc_ns.h include/fc_gs.h include/fc_els.h include/scsi_bsg_fc.h \
	include/sysfs_hba.h include/linux/rtnetlink.h include/linux/types.h include/linux/dcbnl.h

## install configuration file in $(prefix)/etc/fcoe
fcoe_configdir = ${sysconfdir}/fcoe
dist_fcoe_config_DATA = etc/cfg-ethx

## install systemd service files
if HAVE_SYSTEMD
dist_systemdsystemunit_DATA = etc/systemd/fcoe.service etc/systemd/fcoemon.socket
endif

## man pages for fcoeadm and fcoemon
dist_man_MANS = doc/fcoeadm.8 doc/fcoemon.8 doc/fipvlan.8 doc/fcrls.8 \
	doc/fcnsq.8 doc/fcping.8

## init script for fcoemon
dist_noinst_SCRIPTS = etc/initd/initd.suse etc/initd/initd.fedora \
	contrib/fcc.sh contrib/fcoe-setup.sh contrib/fcoe_edd.sh \
	debug/dcbcheck.sh debug/fcoedump.sh

dist_noinst_DATA = README COPYING INSTALL CONFIGURE QUICKSTART fcoe-utils.spec etc/config

bashcompletiondir = $(prefix)/share/bash-completion/completions
dist_bashcompletion_DATA = contrib/bash_completion/fcoeadm contrib/bash_completion/fcoemon

install-data-hook:
	if [ ! -f ${DESTDIR}${fcoe_configdir}/config ] ; then \
		cp ${srcdir}/etc/config ${DESTDIR}${fcoe_configdir}/config; \
	fi;

uninstall-hook:
	rm ${DESTDIR}${fcoe_configdir}/config

AM_DISTCHECK_CONFIGURE_FLAGS = --with-systemdsystemunitdir='$${prefix}/lib/systemd/system'