From: David Scott Date: Mon, 26 Oct 2009 16:32:15 +0000 (+0000) Subject: [refactoring] Move pciutil from xen-api.hg to xen-api-libs.hg X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=75064c8b23069c211dfb9dd7c27fd582cdbf5a51;p=xcp%2Fxen-api-libs.git [refactoring] Move pciutil from xen-api.hg to xen-api-libs.hg --- diff --git a/pciutil/Makefile b/pciutil/Makefile index f05b29e..06aa95b 100644 --- a/pciutil/Makefile +++ b/pciutil/Makefile @@ -1,4 +1,3 @@ -IPROG=install -m 755 -o root -g root CC = gcc CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml OCAMLC = ocamlc -g @@ -6,7 +5,7 @@ OCAMLOPT = ocamlopt LDFLAGS = -cclib -L./ -LIBEXEC = "/opt/xensource/libexec" +DESTDIR ?= / VERSION := $(shell hg parents --template "{rev}" 2>/dev/null || echo 0.0) OCAMLOPTFLAGS = -g -dtypes @@ -18,8 +17,6 @@ OBJS = pciutil INTF = $(foreach obj, $(OBJS),$(obj).cmi) LIBS = pciutil.cma pciutil.cmxa -DOCDIR = /myrepos/xen-api-libs.hg/doc - PROGRAMS = pciutil all: $(INTF) $(LIBS) @@ -53,28 +50,12 @@ META: META.in sed 's/@VERSION@/$(VERSION)/g' < $< > $@ .PHONY: install -install: path = $(DESTDIR)$(shell ocamlfind printconf destdir) install: $(LIBS) META - mkdir -p $(path) - ocamlfind install -destdir $(path) -ldconf ignore pciutil META $(INTF) $(LIBS) *.a *.cmx - -.PHONY: bininstall -bininstall: path = $(DESTDIR)$(LIBEXEC) -bininstall: all - mkdir -p $(path) - $(IPROG) $(PROGRAMS) $(path) + ocamlfind install -destdir $(DESTDIR)$(shell ocamlfind printconf destdir) -ldconf ignore pciutil META $(INTF) $(LIBS) *.a *.cmx .PHONY: uninstall uninstall: ocamlfind remove pciutil -.PHONY: binuninstall -binuninstall: - rm -f $(DESTDIR)$(LIBEXEC)$(PROGRAMS) - -.PHONY: doc -doc: $(INTF) - python ../doc/doc.py $(DOCDIR) "pciutil" "package" "$(OBJS)" "." "stdext" "" - clean: - rm -f *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot $(LIBS) $(PROGRAMS) + rm -f *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot $(LIBS) $(PROGRAMS) \ No newline at end of file