summaryrefslogtreecommitdiff
path: root/stubdom/caml/Makefile
blob: f550de1680a71df3de12175df47d2ea0b8444caf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
XEN_ROOT = $(CURDIR)/../..

ifeq (,$(findstring clean,$(MAKECMDGOALS)))
include $(XEN_ROOT)/Config.mk
endif

CAMLLIB = $(shell $(OCAMLC_CROSS_PREFIX)ocamlc -where)
DEF_CPPFLAGS += -I$(CAMLLIB)

OCAMLOPT=$(OCAMLC_CROSS_PREFIX)ocamlopt

OBJS := hello.cmx
LIBS := 

all: main-caml.o caml.o

%.cmx: %.ml
	$(OCAMLOPT) -c $< -o $@

caml.o: $(OBJS)
	$(OCAMLOPT) $(LIBS) $^ -output-obj -o $@

clean:
	rm -f *.a *.o *.cmx *.cmi