diff options
Diffstat (limited to 'build')
| -rw-r--r-- | build/Makefile.kernel | 6 | ||||
| -rw-r--r-- | build/Makefile.plugins | 3 | ||||
| -rw-r--r-- | build/Makefile.plugins.keyboard | 45 |
3 files changed, 53 insertions, 1 deletions
diff --git a/build/Makefile.kernel b/build/Makefile.kernel index 69c8ac69..48602603 100644 --- a/build/Makefile.kernel +++ b/build/Makefile.kernel @@ -25,6 +25,10 @@ all: $(target) $(target): $(objects) render/librender.a $(LINK) -o $@ $^ $(LIBS) $(LDFLAGS) +# kill the implicit .c.y rule +$(srcdir)/%.c: $(srcdir)/%.y + @ + $(dir)/%.o: $(srcdir)/%.c $(depdir)/%.d $(COMPILE) -c -o $@ $< @@ -58,4 +62,4 @@ distclean: -include $(deps) -.PHONY: kernel-install kernel-uninstall kernel-clean +.PHONY: all install uninstall clean distclean diff --git a/build/Makefile.plugins b/build/Makefile.plugins index cb48d417..f703b6fc 100644 --- a/build/Makefile.plugins +++ b/build/Makefile.plugins @@ -3,15 +3,18 @@ include build/Makefile.incl all clean distclean: @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.resistance $@ @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.placement $@ + @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.keyboard $@ install: @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.resistance $@ @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.placement $@ + @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.keyboard $@ $(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 $@ -rmdir $(DESTDIR)$(plugindir) .PHONY: all clean distclean install uninstall diff --git a/build/Makefile.plugins.keyboard b/build/Makefile.plugins.keyboard new file mode 100644 index 00000000..54ec468a --- /dev/null +++ b/build/Makefile.plugins.keyboard @@ -0,0 +1,45 @@ +include build/Makefile.incl + +dir = plugins/keyboard + +CPPFLAGS += $(GLIB_CFLAGS) $(XFT_CFLAGS) -DG_LOG_DOMAIN=\"Plugin-Placement\" +LDFLAGS = -module -avoid-version + +target = keyboard.la +sources = keyboard.c tree.c translate.c keyparse.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)/*\~ + +-include $(deps) + +.PHONY: all install uninstall clean distclean |
