Makefile 1.09 KB
Newer Older
1
TOPLEVEL=$(CURDIR)/../..
2
XEN_ROOT=$(TOPLEVEL)/../..
Keir Fraser's avatar
Keir Fraser committed
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
include $(TOPLEVEL)/common.make

OCAMLINCLUDE += -I ../xb/

.NOTPARALLEL:
# Ocaml is such a PITA!

PREINTF = xsraw.cmi xst.cmi
PREOBJS = queueop xsraw xst
PRELIBS = $(foreach obj, $(PREOBJS),$(obj).cmo) $(foreach obj,$(PREOJBS),$(obj).cmx)
OBJS = queueop xsraw xst xs
INTF = xsraw.cmi xst.cmi xs.cmi
LIBS = xs.cma xs.cmxa

all: $(PREINTF) $(PRELIBS) $(INTF) $(LIBS) $(PROGRAMS)

bins: $(PROGRAMS)

libs: $(LIBS)

xs_OBJS = $(OBJS)
OCAML_NOC_LIBRARY = xs

#xs.cmxa: $(foreach obj,$(OBJS),$(obj).cmx)
#	$(E) " MLLIB     $@"
#	$(Q)$(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o $@ $(foreach obj,$(OBJS),$(obj).cmx)
#
#xs.cma: $(foreach obj,$(OBJS),$(obj).cmo)
#	$(E) " MLLIB     $@"
#	$(Q)$(OCAMLC) -a -o $@ $(foreach obj,$(OBJS),$(obj).cmo)

.PHONY: install
install: $(LIBS) META
36 37 38
	mkdir -p $(OCAMLDESTDIR)
	ocamlfind remove -destdir $(OCAMLDESTDIR) xs
	ocamlfind install -destdir $(OCAMLDESTDIR) -ldconf ignore xs META $(INTF) xs.mli xst.mli xsraw.mli $(LIBS) *.a *.cmx
Keir Fraser's avatar
Keir Fraser committed
39 40 41

.PHONY: uninstall
uninstall:
42
	ocamlfind remove -destdir $(OCAMLDESTDIR) xs
Keir Fraser's avatar
Keir Fraser committed
43 44 45

include $(TOPLEVEL)/Makefile.rules