diff options
author | kraxel <kraxel> | 2008-09-18 15:51:56 +0000 |
---|---|---|
committer | kraxel <kraxel> | 2008-09-18 15:51:56 +0000 |
commit | a2fa1c886c58b89428d7e9a88080bd9e29f20d51 (patch) | |
tree | a015e98534a140c0d124824e1d999cd524281037 /GNUmakefile | |
download | qemu-gtk-a2fa1c886c58b89428d7e9a88080bd9e29f20d51.tar.gz |
Initial revision
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) + |