diff options
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 0000000..87aec2f --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,65 @@ +# config +-include Make.config +include mk/Variables.mk + +# add our flags + libs +CFLAGS += -DVERSION='"$(VERSION)"' -DLIB='"$(LIB)"' + +# build +TARGETS := qemu-gtk + +# default target +all: build + +################################################################# +# poor man's autoconf ;-) + +include mk/Autoconf.mk + +define make-config +LIB := $(LIB) +HAVE_GTK := $(call ac_pkg_config,gtk+-x11-2.0) +HAVE_GTK_VNC := $(call ac_pkg_config,gtk-vnc-1.0) +HAVE_VTE := $(call ac_pkg_config,vte) +endef + +pkglst := gtk+-x11-2.0 gtk-vnc-1.0 vte + +CFLAGS += -Wno-strict-prototypes +CFLAGS += $(shell test "$(pkglst)" != "" && pkg-config --cflags $(pkglst)) +LDLIBS += $(shell test "$(pkglst)" != "" && pkg-config --libs $(pkglst)) + +# desktop files +DESKTOP := $(wildcard $(patsubst %,%.desktop,$(TARGETS))) + + +######################################################################## +# rules + +ifeq ($(HAVE_GTK)$(HAVE_GTK_VNC)$(HAVE_VTE),yesyesyes) +build: $(TARGETS) +else +build: + @echo "build dependencies are missing" + @false +endif + +install: build + $(INSTALL_BINARY) $(TARGETS) $(bindir) + $(INSTALL_DATA) $(DESKTOP) $(appdir) + +clean: + -rm -f *.o *~ $(depfiles) + +realclean distclean: clean + -rm -f Make.config + -rm -f $(TARGETS) *~ *.bak + +############################################# + +qemu-gtk: qemu-gtk.o monitor.o tcp.o + +include mk/Compile.mk +include mk/Maintainer.mk +-include $(depfiles) + |