@$(MAKE) -$(MAKEFLAGS) -f build/Makefile.render $@
@$(MAKE) -$(MAKEFLAGS) -f build/Makefile.kernel $@
@$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins $@
-# @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.engines $@
+ @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.engines $@
# @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.themes $@
clean:
@$(MAKE) -$(MAKEFLAGS) -f build/Makefile.render $@
@$(MAKE) -$(MAKEFLAGS) -f build/Makefile.kernel $@
@$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins $@
-# @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.engines $@
+ @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.engines $@
# @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.themes $@
$(RM) *\~
-engines_dir:=engines
-engines_srcdir:=$(srcdir)/$(engines_dir)
-engines_depdir:=$(depdir)/$(engines_dir)
+include build/Makefile.incl
-engines_ob_dir:=$(engines_dir)/openbox
-engines_ob_srcdir:=$(engines_srcdir)/openbox
-engines_ob_target:=openbox.la
-engines_ob_sources:=obengine.c obtheme.c obrender.c
-engines_ob_CPPFLAGS:=$(CPPFLAGS) $(GLIB_CFLAGS) $(XFT_CFLAGS) \
- -DG_LOG_DOMAIN=\"Engine-Openbox\" \
- -DTHEMEDIR=\"$(themesdir)/openbox\" \
- -DDEFAULT_THEME=\"operation\"
+all clean distclean:
+ @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.engines.openbox $@
-engines_targets:=$(engines_ob_dir)/$(engines_ob_target)
-
-engines_ob_objects:=$(addprefix $(engines_ob_dir)/,$(engines_ob_sources:.c=.lo))
-engines_ob_sources:=$(addprefix $(engines_ob_srcdir)/,$(engines_ob_sources))
-engines_ob_target:=$(addprefix $(engines_ob_dir)/,$(engines_ob_target))
-engines_ob_deps:=$(addprefix $(depdir)/,$(engines_ob_objects:.lo=.d))
-engines_ob_depdir:=$(depdir)/$(engines_ob_dir)
-
-## engines_ob
-
-$(engines_ob_target): $(engines_ob_objects)
- $(LIBTOOL) --mode=link $(CC) -rpath $(enginedir) $(engines_ob_CPPFLAGS) \
- $(CFLAGS) -module -avoid-version -o $@ $^
-
-$(engines_ob_dir):
- @mkdir $@
-
-$(engines_ob_dir)/%.lo: $(engines_ob_srcdir)/%.c $(engines_ob_depdir)/%.d
- $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
- $(engines_ob_CPPFLAGS) $(CFLAGS) -c -o $@ $<
-
-$(engines_ob_depdir)/%.d: $(engines_ob_srcdir)/%.c
- @echo Building dependancies for $<
- $(INSTALL) -d $(dir $@)
- @$(CC) $(engines_ob_CPPFLAGS) $(CFLAGS) -w -MM -MF $@ -MQ $(<:.c=.lo) $<
-
-## end engines_ob
-
-engines-install:
- $(INSTALL) -d $(DESTDIR)$(enginedir)/
- $(LIBTOOL) --mode=install $(INSTALL) $(engines_ob_target) \
- $(DESTDIR)$(enginedir)/$(notdir $(engines_ob_target))
+install:
+ @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.engines.openbox $@
$(LIBTOOL) --mode=finish $(DESTDIR)$(enginedir)
-engines-uninstall:
- $(LIBTOOL) --mode=uninstall $(RM) \
- $(DESTDIR)$(enginedir)/$(notdir $(engines_ob_target))
- -rmdir $(DESTDIR)$(enginedir)/
-
-engines-clean:
- $(RM) $(engines_ob_target) $(engines_ob_objects)
- $(RM) $(engines_ob_dir)/*\~
-
--include $(engines_ob_deps)
+uninstall:
+ @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.engines.openbox $@
+ -rmdir $(DESTDIR)$(enginedir)
-.PHONY: engines-install engines-uninstall engines-clean
+.PHONY: all clean distclean install uninstall
--- /dev/null
+include build/Makefile.incl
+
+dir = engines/openbox
+theme = operation
+
+CPPFLAGS += $(GLIB_CFLAGS) $(XFT_CFLAGS) -DG_LOG_DOMAIN=\"Engine-Openbox\" \
+ -DDEFAULT_THEME=\"$(theme)\" -DTHEMEDIR=\"$(themedir)/openbox\"
+LDFLAGS = -module -avoid-version
+
+target = openbox.la
+sources = obengine.c obtheme.c obrender.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 $(enginedir) -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)$(enginedir)/
+ $(LIBTOOL) --mode=install $(INSTALL) $(target) \
+ $(DESTDIR)$(enginedir)/$(notdir $(target))
+
+uninstall:
+ $(LTRM) $(DESTDIR)$(enginedir)/$(notdir $(target))
+
+clean:
+ $(RM) $(target) $(objects)
+ $(RM) $(srcdir)/*\~
+
+-include $(deps)
+
+.PHONY: all install uninstall clean distclean
enginedir = $(libdir)/openbox/engines
plugindir = $(libdir)/openbox/plugins
rcdir = $(datadir)/openbox
-themesdir = $(datadir)/openbox/themes
+themedir = $(datadir)/openbox/themes
depdir = .deps
-all install uninstall clean distclean:
+include build/Makefile.incl
+
+all clean distclean:
+ @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.resistance $@
+ @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.placement $@
+
+install:
+ @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.resistance $@
+ @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.placement $@
+ $(LIBTOOL) --mode=finish $(DESTDIR)$(plugindir)
+
+uninstall:
@$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.resistance $@
@$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.placement $@
+ -rmdir $(DESTDIR)$(plugindir)
.PHONY: all clean distclean install uninstall
$(INSTALL) -d $(DESTDIR)$(plugindir)/
$(LIBTOOL) --mode=install $(INSTALL) $(target) \
$(DESTDIR)$(plugindir)/$(notdir $(target))
- $(LIBTOOL) --mode=finish $(DESTDIR)$(plugindir)
uninstall:
$(LTRM) $(DESTDIR)$(plugindir)/$(notdir $(target))
$(INSTALL) -d $(DESTDIR)$(plugindir)/
$(LIBTOOL) --mode=install $(INSTALL) $(target) \
$(DESTDIR)$(plugindir)/$(notdir $(target))
- $(LIBTOOL) --mode=finish $(DESTDIR)$(plugindir)
uninstall:
$(LTRM) $(DESTDIR)$(plugindir)/$(notdir $(target))