summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/Makefile.cwmcc46
-rw-r--r--build/Makefile.engines.openbox2
-rw-r--r--build/Makefile.obcl46
-rw-r--r--build/Makefile.plugins.keyboard2
-rw-r--r--build/Makefile.plugins.mouse2
-rw-r--r--build/Makefile.plugins.placement2
-rw-r--r--build/Makefile.plugins.resistance2
-rw-r--r--build/Makefile.render17
8 files changed, 108 insertions, 11 deletions
diff --git a/build/Makefile.cwmcc b/build/Makefile.cwmcc
new file mode 100644
index 00000000..4e17a7dd
--- /dev/null
+++ b/build/Makefile.cwmcc
@@ -0,0 +1,46 @@
+include build/Makefile.incl
+
+dir = cwmcc
+
+CPPFLAGS += $(GLIB_CFLAGS) $(XFT_CFLAGS) -DG_LOG_DOMAIN=\"CWMCC\"
+
+target = libcwmcc.la
+sources = cwmcc.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) -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=.o) $<
+
+install:
+ $(INSTALL) -d $(DESTDIR)$(libdir)/
+ $(LIBTOOL) --mode=install $(INSTALL) $(target) \
+ $(DESTDIR)$(libdir)/$(notdir $(target))
+
+uninstall:
+ $(LTRM) $(DESTDIR)$(libdir)/$(notdir $(target))
+
+clean:
+ $(LTCLEAN) $(target) $(objects)
+ $(RM) $(srcdir)/*\~
+
+distclean:
+
+-include $(deps)
+
+.PHONY: all install uninstall clean distclean
diff --git a/build/Makefile.engines.openbox b/build/Makefile.engines.openbox
index b5ed7293..3830dd29 100644
--- a/build/Makefile.engines.openbox
+++ b/build/Makefile.engines.openbox
@@ -39,7 +39,7 @@ uninstall:
$(LTRM) $(DESTDIR)$(enginedir)/$(notdir $(target))
clean:
- $(RM) $(target) $(objects)
+ $(LTCLEAN) $(target) $(objects)
$(RM) $(srcdir)/*\~
-include $(deps)
diff --git a/build/Makefile.obcl b/build/Makefile.obcl
new file mode 100644
index 00000000..c602c686
--- /dev/null
+++ b/build/Makefile.obcl
@@ -0,0 +1,46 @@
+include build/Makefile.incl
+
+dir = obcl
+
+CPPFLAGS += $(GLIB_CFLAGS) $(XFT_CFLAGS) -DG_LOG_DOMAIN=\"OBCF\"
+
+target = libobcl.la
+sources = obcl.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) -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=.o) $<
+
+install:
+ $(INSTALL) -d $(DESTDIR)$(libdir)/
+ $(LIBTOOL) --mode=install $(INSTALL) $(target) \
+ $(DESTDIR)$(libdir)/$(notdir $(target))
+
+uninstall:
+ $(LTRM) $(DESTDIR)$(libdir)/$(notdir $(target))
+
+clean:
+ $(LTCLEAN) $(target) $(objects)
+ $(RM) $(srcdir)/*\~
+
+distclean:
+
+-include $(deps)
+
+.PHONY: all install uninstall clean distclean
diff --git a/build/Makefile.plugins.keyboard b/build/Makefile.plugins.keyboard
index 0aedf696..6af04c80 100644
--- a/build/Makefile.plugins.keyboard
+++ b/build/Makefile.plugins.keyboard
@@ -37,7 +37,7 @@ uninstall:
$(LTRM) $(DESTDIR)$(plugindir)/$(notdir $(target))
clean:
- $(RM) $(target) $(objects)
+ $(LTCLEAN) $(target) $(objects)
$(RM) $(srcdir)/*\~
distclean:
diff --git a/build/Makefile.plugins.mouse b/build/Makefile.plugins.mouse
index da392d6d..8e7c5459 100644
--- a/build/Makefile.plugins.mouse
+++ b/build/Makefile.plugins.mouse
@@ -37,7 +37,7 @@ uninstall:
$(LTRM) $(DESTDIR)$(plugindir)/$(notdir $(target))
clean:
- $(RM) $(target) $(objects)
+ $(LTCLEAN) $(target) $(objects)
$(RM) $(srcdir)/*\~
distclean:
diff --git a/build/Makefile.plugins.placement b/build/Makefile.plugins.placement
index 06428a53..edc0ed18 100644
--- a/build/Makefile.plugins.placement
+++ b/build/Makefile.plugins.placement
@@ -37,7 +37,7 @@ uninstall:
$(LTRM) $(DESTDIR)$(plugindir)/$(notdir $(target))
clean:
- $(RM) $(target) $(objects)
+ $(LTCLEAN) $(target) $(objects)
$(RM) $(srcdir)/*\~
-include $(deps)
diff --git a/build/Makefile.plugins.resistance b/build/Makefile.plugins.resistance
index b1405401..6b428990 100644
--- a/build/Makefile.plugins.resistance
+++ b/build/Makefile.plugins.resistance
@@ -37,7 +37,7 @@ uninstall:
$(LTRM) $(DESTDIR)$(plugindir)/$(notdir $(target))
clean:
- $(RM) $(target) $(objects)
+ $(LTCLEAN) $(target) $(objects)
$(RM) $(srcdir)/*\~
-include $(deps)
diff --git a/build/Makefile.render b/build/Makefile.render
index a16edeef..58b2d5db 100644
--- a/build/Makefile.render
+++ b/build/Makefile.render
@@ -4,22 +4,22 @@ dir = render
CPPFLAGS += $(GLIB_CFLAGS) $(XFT_CFLAGS) -DG_LOG_DOMAIN=\"Render\"
-target = librender.a
+target = libobrender.la
sources = color.c font.c gradient.c image.c mask.c render.c test.c
srcdir := $(srcdir)/$(dir)
target := $(addprefix $(dir)/, $(target))
-objects := $(addprefix $(dir)/, $(sources:.c=.o))
+objects := $(addprefix $(dir)/, $(sources:.c=.lo))
sources := $(addprefix $(srcdir)/, $(sources))
-deps := $(addprefix $(depdir)/, $(objects:.o=.d))
+deps := $(addprefix $(depdir)/, $(objects:.lo=.d))
depdir := $(depdir)/$(dir)
all: $(target)
$(target): $(objects)
- $(LINK) -static -o $@ $^ $(LDFLAGS)
+ $(LINK) -o $@ $^ $(LDFLAGS)
-$(dir)/%.o: $(srcdir)/%.c $(depdir)/%.d
+$(dir)/%.lo: $(srcdir)/%.c $(depdir)/%.d
$(LTCOMPILE) -c -o $@ $<
$(depdir)/%.d: $(srcdir)/%.c
@@ -28,11 +28,16 @@ $(depdir)/%.d: $(srcdir)/%.c
@$(DEPCOMPILE) -w -MM -MF $@ -MQ $(<:.c=.o) $<
install:
+ $(INSTALL) -d $(DESTDIR)$(libdir)/
+ $(LIBTOOL) --mode=install $(INSTALL) $(target) \
+ $(DESTDIR)$(libdir)/$(notdir $(target))
uninstall:
+ $(LTRM) $(DESTDIR)$(libdir)/$(notdir $(target))
clean:
- $(RM) $(target) $(objects) $(srcdir)/*\~
+ $(LTCLEAN) $(target) $(objects)
+ $(RM) $(srcdir)/*\~
distclean: