From: Dana Jansens Date: Thu, 3 Apr 2003 22:12:15 +0000 (+0000) Subject: engine builds X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=c0f1e3ae660f55d40b60467d04e0e5647c47a722;p=chaz%2Fopenbox engine builds --- diff --git a/Makefile b/Makefile index 3d6ea2b6..3d432794 100644 --- a/Makefile +++ b/Makefile @@ -2,14 +2,14 @@ all install uninstall: @$(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) *\~ diff --git a/build/Makefile.engines b/build/Makefile.engines index 25d6daf3..cc1cd840 100644 --- a/build/Makefile.engines +++ b/build/Makefile.engines @@ -1,59 +1,14 @@ -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 diff --git a/build/Makefile.engines.openbox b/build/Makefile.engines.openbox new file mode 100644 index 00000000..b19a4f9b --- /dev/null +++ b/build/Makefile.engines.openbox @@ -0,0 +1,47 @@ +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 diff --git a/build/Makefile.incl.in b/build/Makefile.incl.in index 1ada8e3c..a52c865c 100644 --- a/build/Makefile.incl.in +++ b/build/Makefile.incl.in @@ -40,7 +40,7 @@ localedir = $(datadir)/locale enginedir = $(libdir)/openbox/engines plugindir = $(libdir)/openbox/plugins rcdir = $(datadir)/openbox -themesdir = $(datadir)/openbox/themes +themedir = $(datadir)/openbox/themes depdir = .deps diff --git a/build/Makefile.plugins b/build/Makefile.plugins index 79e3ce44..cb48d417 100644 --- a/build/Makefile.plugins +++ b/build/Makefile.plugins @@ -1,5 +1,17 @@ -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 diff --git a/build/Makefile.plugins.placement b/build/Makefile.plugins.placement index 1134c6af..248546fc 100644 --- a/build/Makefile.plugins.placement +++ b/build/Makefile.plugins.placement @@ -32,7 +32,6 @@ install: $(INSTALL) -d $(DESTDIR)$(plugindir)/ $(LIBTOOL) --mode=install $(INSTALL) $(target) \ $(DESTDIR)$(plugindir)/$(notdir $(target)) - $(LIBTOOL) --mode=finish $(DESTDIR)$(plugindir) uninstall: $(LTRM) $(DESTDIR)$(plugindir)/$(notdir $(target)) diff --git a/build/Makefile.plugins.resistance b/build/Makefile.plugins.resistance index 8a5529b2..4f3922ab 100644 --- a/build/Makefile.plugins.resistance +++ b/build/Makefile.plugins.resistance @@ -32,7 +32,6 @@ install: $(INSTALL) -d $(DESTDIR)$(plugindir)/ $(LIBTOOL) --mode=install $(INSTALL) $(target) \ $(DESTDIR)$(plugindir)/$(notdir $(target)) - $(LIBTOOL) --mode=finish $(DESTDIR)$(plugindir) uninstall: $(LTRM) $(DESTDIR)$(plugindir)/$(notdir $(target))