1XEN_ROOT = $(CURDIR)/../..
2
3ifeq (,$(findstring clean,$(MAKECMDGOALS)))
4include $(XEN_ROOT)/Config.mk
5endif
6
7CAMLLIB = $(shell $(OCAMLC_CROSS_PREFIX)ocamlc -where)
8DEF_CPPFLAGS += -I$(CAMLLIB)
9
10OCAMLOPT=$(OCAMLC_CROSS_PREFIX)ocamlopt
11
12OBJS := hello.cmx
13LIBS :=
14
15all: main-caml.o caml.o
16
17%.cmx: %.ml
18	$(OCAMLOPT) -c $< -o $@
19
20caml.o: $(OBJS)
21	$(OCAMLOPT) $(LIBS) $^ -output-obj -o $@
22
23clean:
24	rm -f *.a *.o *.cmx *.cmi
25