mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
While implementing the --enable-rpath change I noticed that a ocaml build does not use APPEND_LDFLAGS. Make use of APPEND_CFLAGS and APPEND_LDFLAGS as it is done already in other places. Signed-off-by: Olaf Hering <olaf@aepfle.de> Cc: David Scott <dave.scott@eu.citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> Acked-by: David Scott <dave.scott@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
72 lines
2.0 KiB
Makefile
72 lines
2.0 KiB
Makefile
TOPLEVEL=$(CURDIR)/../..
|
|
XEN_ROOT=$(TOPLEVEL)/../..
|
|
include $(TOPLEVEL)/common.make
|
|
|
|
# ignore unused generated functions and allow mixed declarations and code
|
|
CFLAGS += -Wno-unused -Wno-declaration-after-statement
|
|
|
|
CFLAGS += $(CFLAGS_libxenlight)
|
|
CFLAGS += -I ../xentoollog
|
|
CFLAGS += $(APPEND_CFLAGS)
|
|
|
|
OBJS = xenlight
|
|
INTF = xenlight.cmi
|
|
LIBS = xenlight.cma xenlight.cmxa
|
|
|
|
OCAMLINCLUDE += -I ../xentoollog
|
|
|
|
LIBS_xenlight = $(LDLIBS_libxenlight)
|
|
|
|
xenlight_OBJS = $(OBJS)
|
|
xenlight_C_OBJS = xenlight_stubs
|
|
|
|
OCAML_LIBRARY = xenlight
|
|
|
|
GENERATED_FILES += xenlight.ml xenlight.ml.tmp xenlight.mli xenlight.mli.tmp
|
|
GENERATED_FILES += _libxl_types.ml.in _libxl_types.mli.in
|
|
GENERATED_FILES += _libxl_types.inc META
|
|
|
|
all: $(INTF) $(LIBS)
|
|
|
|
xenlight.ml: xenlight.ml.in _libxl_types.ml.in
|
|
$(Q)sed -e '1i\
|
|
(*\
|
|
* AUTO-GENERATED FILE DO NOT EDIT\
|
|
* Generated from xenlight.ml.in and _libxl_types.ml.in\
|
|
*)\
|
|
' \
|
|
-e '/^(\* @@LIBXL_TYPES@@ \*)$$/r_libxl_types.ml.in' \
|
|
< xenlight.ml.in > xenlight.ml.tmp
|
|
$(Q)mv xenlight.ml.tmp xenlight.ml
|
|
|
|
xenlight.mli: xenlight.mli.in _libxl_types.mli.in
|
|
$(Q)sed -e '1i\
|
|
(*\
|
|
* AUTO-GENERATED FILE DO NOT EDIT\
|
|
* Generated from xenlight.mli.in and _libxl_types.mli.in\
|
|
*)\
|
|
' \
|
|
-e '/^(\* @@LIBXL_TYPES@@ \*)$$/r_libxl_types.mli.in' \
|
|
< xenlight.mli.in > xenlight.mli.tmp
|
|
$(Q)mv xenlight.mli.tmp xenlight.mli
|
|
|
|
_libxl_types.ml.in _libxl_types.mli.in _libxl_types.inc: genwrap.py $(XEN_ROOT)/tools/libxl/libxl_types.idl \
|
|
$(XEN_ROOT)/tools/libxl/idl.py
|
|
PYTHONPATH=$(XEN_ROOT)/tools/libxl $(PYTHON) genwrap.py \
|
|
$(XEN_ROOT)/tools/libxl/libxl_types.idl \
|
|
_libxl_types.mli.in _libxl_types.ml.in _libxl_types.inc
|
|
|
|
libs: $(LIBS)
|
|
|
|
.PHONY: install
|
|
install: $(LIBS) META
|
|
mkdir -p $(OCAMLDESTDIR)
|
|
$(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenlight
|
|
$(OCAMLFIND) install -destdir $(OCAMLDESTDIR) -ldconf ignore xenlight META $(INTF) $(LIBS) *.a *.so *.cmx
|
|
|
|
.PHONY: uninstall
|
|
uninstall:
|
|
$(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenlight
|
|
|
|
include $(TOPLEVEL)/Makefile.rules
|