1 # SPDX-License-Identifier: GPL-2.0
2 # Makefile for Hyper-V tools
4 CC
= $(CROSS_COMPILE
)gcc
5 WARNINGS
= -Wall
-Wextra
6 CFLAGS
= $(WARNINGS
) -g
$(shell getconf LFS_CFLAGS
)
8 CFLAGS
+= -D__EXPORTED_HEADERS__
-I..
/..
/include/uapi
-I..
/..
/include
11 libexecdir ?
= /usr
/libexec
12 sharedstatedir ?
= /var
/lib
14 ALL_PROGRAMS
:= hv_kvp_daemon hv_vss_daemon hv_fcopy_daemon
16 ALL_SCRIPTS
:= hv_get_dhcp_info.sh hv_get_dns_info.sh hv_set_ifconfig.sh
21 $(CC
) $(CFLAGS
) -o
$@
$^
24 $(RM
) hv_kvp_daemon hv_vss_daemon hv_fcopy_daemon
27 install -d
-m
755 $(DESTDIR
)$(sbindir
); \
28 install -d
-m
755 $(DESTDIR
)$(libexecdir
)/hypervkvpd
; \
29 install -d
-m
755 $(DESTDIR
)$(sharedstatedir
); \
30 for program in
$(ALL_PROGRAMS
); do \
31 install $$program -m
755 $(DESTDIR
)$(sbindir
); \
33 install -m
755 lsvmbus
$(DESTDIR
)$(sbindir
); \
34 for script in
$(ALL_SCRIPTS
); do \
35 install $$script -m
755 $(DESTDIR
)$(libexecdir
)/hypervkvpd
/$${script
%.sh
}; \