mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
Sources of both xenconsoled and xenconsole are already separated into
different directory and don't share anything in common. Having two
different Makefile means it's easier to deal with *FLAGS.
Some common changes:
Rename $(BIN) to $(TARGETS), this will be useful later.
Stop removing *.so *.rpm *.a as they aren't created here.
Use $(OBJS-y) to list objects.
Update $(CFLAGS) for the directory rather than a single object.
daemon:
Remove the need for $(LDLIBS_xenconsoled), use $(LDLIBS) instead.
Remove the need for $(CONSOLE_CFLAGS-y) and use $(CFLAGS-y)
instead.
client:
Remove the unused $(LDLIBS_xenconsole)
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
40 lines
742 B
Makefile
40 lines
742 B
Makefile
XEN_ROOT=$(CURDIR)/../../..
|
|
include $(XEN_ROOT)/tools/Rules.mk
|
|
|
|
CFLAGS += -Werror
|
|
CFLAGS += $(CFLAGS_libxenctrl)
|
|
CFLAGS += $(CFLAGS_libxenstore)
|
|
CFLAGS += -include $(XEN_ROOT)/tools/config.h
|
|
|
|
LDLIBS += $(LDLIBS_libxenctrl)
|
|
LDLIBS += $(LDLIBS_libxenstore)
|
|
LDLIBS += $(SOCKET_LIBS)
|
|
|
|
OBJS-y := main.o
|
|
|
|
TARGETS := xenconsole
|
|
|
|
.PHONY: all
|
|
all: $(TARGETS)
|
|
|
|
xenconsole: $(OBJS-y)
|
|
$(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS) $(APPEND_LDFLAGS)
|
|
|
|
.PHONY: install
|
|
install: all
|
|
$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
|
|
$(INSTALL_PROG) xenconsole $(DESTDIR)$(LIBEXEC_BIN)
|
|
|
|
.PHONY: uninstall
|
|
uninstall:
|
|
rm -f $(DESTDIR)$(LIBEXEC_BIN)/xenconsole
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
$(RM) *.o $(TARGETS) $(DEPS_RM)
|
|
|
|
.PHONY: distclean
|
|
distclean: clean
|
|
|
|
-include $(DEPS_INCLUDE)
|