From 831db744f4c023bd0478631a6050c394497bb2ea Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 5 Apr 2003 17:21:44 +0000 Subject: [PATCH] add the mouse plugin to the build system --- build/Makefile.plugins | 3 +++ build/Makefile.plugins.keyboard | 2 ++ build/Makefile.plugins.mouse | 47 +++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 build/Makefile.plugins.mouse diff --git a/build/Makefile.plugins b/build/Makefile.plugins index f703b6fc..9555d871 100644 --- a/build/Makefile.plugins +++ b/build/Makefile.plugins @@ -4,17 +4,20 @@ all clean distclean: @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.resistance $@ @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.placement $@ @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.keyboard $@ + @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.mouse $@ install: @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.resistance $@ @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.placement $@ @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.keyboard $@ + @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.mouse $@ $(LIBTOOL) --mode=finish $(DESTDIR)$(plugindir) uninstall: @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.resistance $@ @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.placement $@ @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.keyboard $@ + @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.mouse $@ -rmdir $(DESTDIR)$(plugindir) .PHONY: all clean distclean install uninstall diff --git a/build/Makefile.plugins.keyboard b/build/Makefile.plugins.keyboard index e8e95163..497ce797 100644 --- a/build/Makefile.plugins.keyboard +++ b/build/Makefile.plugins.keyboard @@ -40,6 +40,8 @@ clean: $(RM) $(target) $(objects) $(RM) $(srcdir)/*\~ +distclean: + -include $(deps) .PHONY: all install uninstall clean distclean diff --git a/build/Makefile.plugins.mouse b/build/Makefile.plugins.mouse new file mode 100644 index 00000000..63f0d389 --- /dev/null +++ b/build/Makefile.plugins.mouse @@ -0,0 +1,47 @@ +include build/Makefile.incl + +dir = plugins/mouse + +CPPFLAGS += $(GLIB_CFLAGS) $(XFT_CFLAGS) -DG_LOG_DOMAIN=\"Plugin-Mouse\" +LDFLAGS = -module -avoid-version + +target = mouse.la +sources = mouse.c translate.c mouseparse.c + +srcdir := $(srcdir)/$(dir) +target := $(addprefix $(dir)/,$(target)) +objects := $(addprefix $(dir)/,$(sources:.c=.lo)) +sources := $(addprefix $(srcdir)/,$(sources)) +deps := $(addprefix $(depdir)/,$(objects:.lo=.d)) +depdir := $(depdir)/$(dir) + +all: $(target) + +$(target): $(objects) + $(LINK) -rpath $(plugindir) -o $@ $^ $(LDFLAGS) + +$(dir)/%.lo: $(srcdir)/%.c $(depdir)/%.d + $(LTCOMPILE) -c -o $@ $< + +$(depdir)/%.d: $(srcdir)/%.c + @echo Building dependancies for $< + $(INSTALL) -d $(depdir) + @$(DEPCOMPILE) -w -MM -MF $@ -MQ $(<:.c=.lo) $< + +install: + $(INSTALL) -d $(DESTDIR)$(plugindir)/ + $(LIBTOOL) --mode=install $(INSTALL) $(target) \ + $(DESTDIR)$(plugindir)/$(notdir $(target)) + +uninstall: + $(LTRM) $(DESTDIR)$(plugindir)/$(notdir $(target)) + +clean: + $(RM) $(target) $(objects) + $(RM) $(srcdir)/*\~ + +distclean: + +-include $(deps) + +.PHONY: all install uninstall clean distclean -- 2.45.2