Line | |
---|
1 | XEN_ROOT = ../../.. |
---|
2 | include $(XEN_ROOT)/tools/Rules.mk |
---|
3 | |
---|
4 | MAJOR = 1.0 |
---|
5 | MINOR = 0 |
---|
6 | |
---|
7 | CFLAGS += -Werror -Wp,-MD,.$(@F).d |
---|
8 | DEPS = .*.d |
---|
9 | |
---|
10 | LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS |
---|
11 | LDFLAGS-$(CONFIG_Linux) = -Wl,mapfile-GNU |
---|
12 | LDFLAGS = $(LDFLAGS-y) |
---|
13 | |
---|
14 | LIB_SRCS-y = fsimage.c fsimage_plugin.c fsimage_grub.c |
---|
15 | |
---|
16 | PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y)) |
---|
17 | |
---|
18 | LIB = libfsimage.so libfsimage.so.$(MAJOR) libfsimage.so.$(MAJOR).$(MINOR) |
---|
19 | |
---|
20 | .PHONY: all |
---|
21 | all: $(LIB) |
---|
22 | |
---|
23 | .PHONY: install |
---|
24 | install: all |
---|
25 | [ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR) |
---|
26 | [ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include |
---|
27 | $(INSTALL_PROG) libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR) |
---|
28 | ln -sf libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libfsimage.so.$(MAJOR) |
---|
29 | ln -sf libfsimage.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libfsimage.so |
---|
30 | $(INSTALL_DATA) fsimage.h $(DESTDIR)/usr/include |
---|
31 | $(INSTALL_DATA) fsimage_plugin.h $(DESTDIR)/usr/include |
---|
32 | $(INSTALL_DATA) fsimage_grub.h $(DESTDIR)/usr/include |
---|
33 | |
---|
34 | clean distclean: |
---|
35 | rm -f $(PIC_OBJS) $(LIB) |
---|
36 | |
---|
37 | libfsimage.so: libfsimage.so.$(MAJOR) |
---|
38 | ln -sf $< $@ |
---|
39 | libfsimage.so.$(MAJOR): libfsimage.so.$(MAJOR).$(MINOR) |
---|
40 | ln -sf $< $@ |
---|
41 | |
---|
42 | libfsimage.so.$(MAJOR).$(MINOR): $(PIC_OBJS) |
---|
43 | $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libfsimage.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ -lpthread |
---|
44 | |
---|
45 | -include $(DEPS) |
---|
46 | |
---|
Note: See
TracBrowser
for help on using the repository browser.