direct-io.hg

view tools/debugger/libxendebug/Makefile @ 7477:5a7baecb1c70

Fix an issue for passing arguement from control panel to deivce model
for some arguemnt like 'localtime', 'isa', device model need an argument
"-localtime", instead of "-localtime 1"
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Sun Oct 23 16:51:47 2005 +0100 (2005-10-23)
parents 06d84bf87159
children 7e68bc2745af
line source
2 INSTALL = install
3 INSTALL_PROG = $(INSTALL) -m0755
4 INSTALL_DATA = $(INSTALL) -m0644
5 INSTALL_DIR = $(INSTALL) -d -m0755
7 MAJOR = 3.0
8 MINOR = 0
10 CC = gcc
12 XEN_ROOT = ../../..
13 include $(XEN_ROOT)/tools/Rules.mk
15 SRCS := xendebug.c
17 CFLAGS += -Wall -Werror -O3 -fno-strict-aliasing
18 CFLAGS += $(INCLUDES) -I. -I$(XEN_ROOT)/tools/libxc
19 # Get gcc to generate the dependencies for us.
20 CFLAGS += -Wp,-MD,.$(@F).d
21 DEPS = .*.d
23 LDFLAGS += -L$(XEN_ROOT)/tools/libxc -lxenctrl
25 LIB_OBJS := $(patsubst %.c,%.o,$(SRCS))
26 PIC_OBJS := $(patsubst %.c,%.opic,$(SRCS))
28 LIB := libxendebug.a libxendebug.so
29 LIB += libxendebug.so.$(MAJOR) libxendebug.so.$(MAJOR).$(MINOR)
31 all: build
32 build:
33 $(MAKE) $(LIB)
35 install: build
36 [ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
37 [ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include
38 $(INSTALL_PROG) libxendebug.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
39 $(INSTALL_DATA) libxendebug.a $(DESTDIR)/usr/$(LIBDIR)
40 ln -sf libxendebug.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxendebug.so.$(MAJOR)
41 ln -sf libxendebug.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxendebug.so
42 $(INSTALL_DATA) xendebug.h $(DESTDIR)/usr/include
44 .PHONY: TAGS clean rpm install all
46 TAGS:
47 etags -t $(SRCS) *.h
49 clean:
50 rm -rf *.a *.so* *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen
52 rpm: build
53 rm -rf staging
54 mkdir staging
55 mkdir staging/i386
56 rpmbuild --define "staging$$PWD/staging" --define '_builddir.' \
57 --define "_rpmdir$$PWD/staging" -bb rpm.spec
58 mv staging/i386/*.rpm .
59 rm -rf staging
61 libxendebug.a: $(LIB_OBJS)
62 $(AR) rc $@ $^
64 libxendebug.so: libxendebug.so.$(MAJOR)
65 ln -sf $< $@
66 libxendebug.so.$(MAJOR): libxendebug.so.$(MAJOR).$(MINOR)
67 ln -sf $< $@
69 libxendebug.so.$(MAJOR).$(MINOR): $(PIC_OBJS)
70 $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxendebug.so.$(MAJOR) -shared -o $@ $^
72 -include $(DEPS)