File: Makefile

package info (click to toggle)
xen 4.11.4+24-gddaaccbbab-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 36,336 kB
  • sloc: ansic: 489,281; asm: 7,844; python: 7,435; makefile: 7,344; sh: 6,424; ml: 4,752; perl: 4,223; cpp: 1,829; lex: 708; yacc: 656; pascal: 433
file content (45 lines) | stat: -rw-r--r-- 1,181 bytes parent folder | download | duplicates (3)
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
XEN_ROOT = $(CURDIR)/../../..
include $(XEN_ROOT)/tools/libfsimage/Rules.mk

CFLAGS += -DFSDIR="\"$(LIBEXEC_LIB)/fs\""

LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS
LDFLAGS-$(CONFIG_Linux) = -Wl,mapfile-GNU
LDFLAGS += $(LDFLAGS-y)

CFLAGS += $(PTHREAD_CFLAGS)
LDFLAGS += $(PTHREAD_LDFLAGS)

LIB_SRCS-y = fsimage.c fsimage_plugin.c fsimage_grub.c

PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y))

LIB = libfsimage.so

.PHONY: all
all: $(LIB)

.PHONY: install
install: all
	$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_LIB)
	$(INSTALL_DIR) $(DESTDIR)$(includedir)
	$(INSTALL_PROG) libfsimage.so $(DESTDIR)$(LIBEXEC_LIB)
	$(INSTALL_DATA) fsimage.h $(DESTDIR)$(includedir)
	$(INSTALL_DATA) fsimage_plugin.h $(DESTDIR)$(includedir)
	$(INSTALL_DATA) fsimage_grub.h $(DESTDIR)$(includedir)

.PHONY: uninstall
uninstall:
	rm -f $(DESTDIR)$(includedir)/fsimage_grub.h
	rm -f $(DESTDIR)$(includedir)/fsimage_plugin.h
	rm -f $(DESTDIR)$(includedir)/fsimage.h
	rm -f $(DESTDIR)$(LIBEXEC_LIB)/libfsimage.so

clean distclean::
	rm -f $(LIB)

libfsimage.so: $(PIC_OBJS)
	$(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG),$@ $(SHLIB_LDFLAGS) -o $@ $^ $(PTHREAD_LIBS) $(APPEND_LDFLAGS)

-include $(DEPS_INCLUDE)