47 lines
1.1 KiB
Text
47 lines
1.1 KiB
Text
include build/Makefile.incl
|
|
|
|
dir = plugins/keyboard
|
|
|
|
CPPFLAGS += $(GLIB_CFLAGS) $(XFT_CFLAGS) -DG_LOG_DOMAIN=\"Plugin-Keyboard\"
|
|
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)/*\~
|
|
|
|
distclean:
|
|
|
|
-include $(deps)
|
|
|
|
.PHONY: all install uninstall clean distclean
|