mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
Running "make uninstall" does not remove all installed files, a situation which might cause link related issues if xen is re-installed in a different location. In order to make uninstall correctly remove the files it is best the process should be done recursively by mirroring each "install" target with an "uninstall" who removes the installed files. An exception to this rule is uninstalling the files produced by "qemu-xen-dir-remote" and "qemu-xen-traditional-dir", which are external to the project. These projects do not implement an "uninstall" target so the files have to be removed manually. Signed-off-by: Petre Pircalabu <ppircalabu@bitdefender.com> Acked-by: Wei Liu <wei.liu2@citrix.com>
43 lines
913 B
Makefile
43 lines
913 B
Makefile
XEN_ROOT = $(CURDIR)/../../..
|
|
include $(XEN_ROOT)/tools/Rules.mk
|
|
|
|
# libelf fuzz target
|
|
vpath %.c ../../../xen/common/libelf
|
|
CFLAGS += -I../../../xen/common/libelf
|
|
ELF_SRCS-y += libelf-tools.c libelf-loader.c libelf-dominfo.c
|
|
ELF_LIB_OBJS := $(patsubst %.c,%.o,$(ELF_SRCS-y))
|
|
|
|
$(patsubst %.c,%.o,$(ELF_SRCS-y)): CFLAGS += -Wno-pointer-sign
|
|
|
|
$(ELF_LIB_OBJS): CFLAGS += -DFUZZ_NO_LIBXC $(CFLAGS_xeninclude)
|
|
|
|
libelf-fuzzer.o: CFLAGS += $(CFLAGS_xeninclude)
|
|
|
|
libelf.a: libelf-fuzzer.o $(ELF_LIB_OBJS)
|
|
$(AR) rc $@ $^
|
|
|
|
.PHONY: libelf-fuzzer-all
|
|
libelf-fuzzer-all: libelf.a libelf-fuzzer.o
|
|
|
|
afl-libelf-fuzzer: afl-libelf-fuzzer.o libelf-fuzzer.o $(ELF_LIB_OBJS)
|
|
$(CC) $(CFLAGS) $^ -o $@
|
|
|
|
# Common targets
|
|
.PHONY: all
|
|
all: libelf-fuzzer-all
|
|
|
|
.PHONY: distclean
|
|
distclean: clean
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -f *.o .*.d *.a *-libelf-fuzzer
|
|
|
|
.PHONY: install
|
|
install: all
|
|
|
|
.PHONY: uninstall
|
|
|
|
.PHONY: afl
|
|
afl: afl-libelf-fuzzer
|