]> Dogcows Code - chaz/openbox/commitdiff
build the resistance/placement plugins
authorDana Jansens <danakj@orodu.net>
Thu, 3 Apr 2003 22:02:18 +0000 (22:02 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 3 Apr 2003 22:02:18 +0000 (22:02 +0000)
Makefile
build/Makefile.incl.in
build/Makefile.kernel
build/Makefile.plugins
build/Makefile.plugins.placement [new file with mode: 0644]
build/Makefile.plugins.resistance [new file with mode: 0644]

index 5fa73e6ef9a59c0ac5d7c612e297d7fc3ef7fe07..3d6ea2b667c2964f7f92450d0f52077b325ecef7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,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.plugins $@
 #      @$(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.plugins $@
 #      @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.engines $@
 #      @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.themes $@
        $(RM) *\~
index 603055a7a46b762435e55cbfae1e3b10be363545..1ada8e3c06ad783898e10149883d01b09a06bfc7 100644 (file)
@@ -45,6 +45,8 @@ themesdir = $(datadir)/openbox/themes
 depdir = .deps
 
 COMPILE = $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) 
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) 
 DEPCOMPILE = $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) 
 LINK = $(LIBTOOL) --mode=link $(CC)
 LTCLEAN = $(LIBTOOL) --mode=clean $(RM)
+LTRM = $(LIBTOOL) --mode=uninstall $(RM)
index 46770379720bcbdc5b8f0b82ea928df2198bb8ab..69c8ac697c0546c9c5b2dbf26d21a4e8e77523f4 100644 (file)
@@ -49,7 +49,7 @@ uninstall:
 
 clean:
        $(LTCLEAN) $(target)
-       $(RM) $(objects) $(dir)/*\~
+       $(RM) $(objects) $(srcdir)/*\~
        $(RM) $(filter %.lex.c, $(sources))
        $(RM) $(filter %.tab.c, $(sources))
        $(RM) $(patsubst %.c,%.h, $(filter %.tab.c, $(sources)))
index d3c390b118ce19f87f2cd4ac3859a99fd1daab91..79e3ce44e9544e5c786f79a4b7a8f4548fc529c3 100644 (file)
@@ -1,97 +1,5 @@
-plugins_dir:=plugins
-plugins_srcdir:=$(srcdir)/$(plugins_dir)
-plugins_depdir:=$(depdir)/$(plugins_dir)
+all install uninstall clean distclean:
+       @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.resistance $@
+       @$(MAKE) -$(MAKEFLAGS) -f build/Makefile.plugins.placement $@
 
-plugins_resistance_dir:=$(plugins_dir)
-plugins_resistance_srcdir:=$(plugins_srcdir)
-plugins_resistance_target:=resistance.la
-plugins_resistance_sources:=resistance.c
-plugins_resistance_CPPFLAGS:=$(CPPFLAGS) $(GLIB_CFLAGS) $(XFT_CFLAGS) \
-  -DG_LOG_DOMAIN=\"Plugin-Resistance\"
-
-plugins_placement_dir:=$(plugins_dir)/placement
-plugins_placement_srcdir:=$(plugins_srcdir)/placement
-plugins_placement_target:=placement.la
-plugins_placement_sources:=placement.c history.c
-plugins_placement_CPPFLAGS:=$(CPPFLAGS) $(GLIB_CFLAGS) $(XFT_CFLAGS) \
-  -DG_LOG_DOMAIN=\"Plugin-Placement\"
-
-plugins_targets:=$(plugins_resistance_dir)/$(plugins_resistance_target)
-plugins_targets:=$(plugins_targets) $(plugins_placement_dir)/$(plugins_placement_target)
-
-plugins_resistance_objects:=$(addprefix $(plugins_resistance_dir)/,$(plugins_resistance_sources:.c=.lo))
-plugins_resistance_sources:=$(addprefix $(plugins_resistance_srcdir)/,$(plugins_resistance_sources))
-plugins_resistance_target:=$(addprefix $(plugins_resistance_dir)/,$(plugins_resistance_target))
-plugins_resistance_deps:=$(addprefix $(depdir)/,$(plugins_resistance_objects:.lo=.d))
-plugins_resistance_depdir:=$(depdir)/$(plugins_resistance_dir)
-
-plugins_placement_objects:=$(addprefix $(plugins_placement_dir)/,$(plugins_placement_sources:.c=.lo))
-plugins_placement_sources:=$(addprefix $(plugins_placement_srcdir)/,$(plugins_placement_sources))
-plugins_placement_target:=$(addprefix $(plugins_placement_dir)/,$(plugins_placement_target))
-plugins_placement_deps:=$(addprefix $(depdir)/,$(plugins_placement_objects:.lo=.d))
-plugins_placement_depdir:=$(depdir)/$(plugins_placement_dir)
-
-## plugins_resistance
-
-$(plugins_resistance_target): $(plugins_resistance_objects)
-       $(LIBTOOL) --mode=link $(CC) -rpath $(plugindir) $(plugins_resistance_CPPFLAGS) \
-               $(CFLAGS) -module -avoid-version -o $@ $^
-
-$(plugins_resistance_dir):
-       @mkdir $@
-
-$(plugins_resistance_dir)/%.lo: $(plugins_resistance_srcdir)/%.c $(plugins_resistance_depdir)/%.d
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
-               $(plugins_resistance_CPPFLAGS) $(CFLAGS) -c -o $@ $<
-
-$(plugins_resistance_depdir)/%.d: $(plugins_resistance_srcdir)/%.c $(depdir)
-       @echo Building dependancies for $<
-       $(INSTALL) -d $(dir $@)
-       @$(CC) $(plugins_resistance_CPPFLAGS) $(CFLAGS) -w -MM -MF $@ -MQ $(<:.c=.lo) $<
-
-## end plugins_resistance
-
-## plugins_placement
-
-$(plugins_placement_target): $(plugins_placement_objects)
-       $(LIBTOOL) --mode=link $(CC) -rpath $(plugindir) $(plugins_placement_CPPFLAGS) \
-               $(CFLAGS) -module -avoid-version -o $@ $^
-
-$(plugins_placement_dir):
-       @mkdir $@
-
-$(plugins_placement_dir)/%.lo: $(plugins_placement_srcdir)/%.c $(plugins_placement_depdir)/%.d
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
-               $(plugins_placement_CPPFLAGS) $(CFLAGS) -c -o $@ $<
-
-$(plugins_placement_depdir)/%.d: $(plugins_placement_srcdir)/%.c
-       @echo Building dependancies for $<
-       $(INSTALL) -d $(dir $@)
-       @$(CC) $(plugins_placement_CPPFLAGS) $(CFLAGS) -w -MM -MF $@ -MQ $(<:.c=.lo) $<
-
-## end plugins_placement
-
-plugins-install:
-       $(INSTALL) -d $(DESTDIR)$(plugindir)/
-       $(LIBTOOL) --mode=install $(INSTALL) $(plugins_resistance_target) \
-               $(DESTDIR)$(plugindir)/$(notdir $(plugins_resistance_target))
-       $(LIBTOOL) --mode=install $(INSTALL) $(plugins_placement_target) \
-               $(DESTDIR)$(plugindir)/$(notdir $(plugins_placement_target))
-       $(LIBTOOL) --mode=finish $(DESTDIR)$(plugindir)
-
-plugins-uninstall:
-       $(LIBTOOL) --mode=uninstall $(RM) \
-               $(DESTDIR)$(plugindir)/$(notdir $(plugins_placement_target))
-       $(LIBTOOL) --mode=uninstall $(RM) \
-               $(DESTDIR)$(plugindir)/$(notdir $(plugins_resistance_target))
-       -rmdir $(DESTDIR)$(plugindir)/
-
-plugins-clean:
-       $(RM) $(plugins_resistance_target) $(plugins_resistance_objects)
-       $(RM) $(plugins_resistance_dir)/*\~
-       $(RM) $(plugins_placement_target) $(plugins_placement_objects)
-       $(RM) $(plugins_placement_dir)/*\~
-
--include $(plugins_resistance_deps) $(plugins_placement_deps)
-
-.PHONY: plugins-install plugins-uninstall plugins-clean
+.PHONY: all clean distclean install uninstall
diff --git a/build/Makefile.plugins.placement b/build/Makefile.plugins.placement
new file mode 100644 (file)
index 0000000..1134c6a
--- /dev/null
@@ -0,0 +1,46 @@
+include build/Makefile.incl
+
+dir = plugins/placement
+
+CPPFLAGS += $(GLIB_CFLAGS) $(XFT_CFLAGS) -DG_LOG_DOMAIN=\"Plugin-Placement\"
+LDFLAGS = -module -avoid-version
+
+target = placement.la
+sources = history.c placement.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))
+       $(LIBTOOL) --mode=finish $(DESTDIR)$(plugindir)
+
+uninstall:
+       $(LTRM) $(DESTDIR)$(plugindir)/$(notdir $(target))
+
+clean:
+       $(RM) $(target) $(objects)
+       $(RM) $(srcdir)/*\~
+
+-include $(deps)
+
+.PHONY: all install uninstall clean distclean
diff --git a/build/Makefile.plugins.resistance b/build/Makefile.plugins.resistance
new file mode 100644 (file)
index 0000000..8a5529b
--- /dev/null
@@ -0,0 +1,46 @@
+include build/Makefile.incl
+
+dir = plugins
+
+CPPFLAGS += $(GLIB_CFLAGS) $(XFT_CFLAGS) -DG_LOG_DOMAIN=\"Plugin-Resistance\"
+LDFLAGS = -module -avoid-version
+
+target = resistance.la
+sources = resistance.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))
+       $(LIBTOOL) --mode=finish $(DESTDIR)$(plugindir)
+
+uninstall:
+       $(LTRM) $(DESTDIR)$(plugindir)/$(notdir $(target))
+
+clean:
+       $(RM) $(target) $(objects)
+       $(RM) $(srcdir)/*\~
+
+-include $(deps)
+
+.PHONY: all install uninstall clean distclean
This page took 0.02886 seconds and 4 git commands to generate.