mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
LDFLAGS cannot be appended to CFLAGS, instead pass them down as env variables. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Wei Liu <wei.liu2@citrix.com> Release-acked-by: Wei Liu <wei.liu2@citrix.com>
33 lines
808 B
Makefile
33 lines
808 B
Makefile
|
|
XEN_ROOT = $(CURDIR)/../..
|
|
include $(XEN_ROOT)/tools/Rules.mk
|
|
|
|
PY_CFLAGS = $(CFLAGS) $(PY_NOOPT_CFLAGS)
|
|
PY_LDFLAGS = $(LDFLAGS) $(APPEND_LDFLAGS)
|
|
|
|
.PHONY: all
|
|
all: build
|
|
.PHONY: build
|
|
build:
|
|
CC="$(CC)" CFLAGS="$(PY_CFLAGS)" $(PYTHON) setup.py build
|
|
|
|
.PHONY: install
|
|
install: all
|
|
CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) \
|
|
setup.py install $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
|
|
--install-scripts=$(LIBEXEC_BIN) --force
|
|
set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \
|
|
"`readlink -f $(DESTDIR)/$(bindir)`" != \
|
|
"`readlink -f $(LIBEXEC_BIN)`" ]; then \
|
|
ln -sf $(LIBEXEC_BIN)/pygrub $(DESTDIR)/$(bindir); \
|
|
fi
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -rf build tmp *.pyc *.pyo *.o *.a *~ a.out $(DEPS)
|
|
|
|
.PHONY: distclean
|
|
distclean: clean
|
|
|
|
-include $(DEPS)
|