1 include build/Makefile.incl
5 CPPFLAGS += $(GLIB_CFLAGS) $(GMODULE_CFLAGS) $(XFT_CFLAGS) $(X_CFLAGS) \
6 -DG_LOG_DOMAIN=\"Openbox\"
7 LIBS += $(GLIB_LIBS) $(GMODULE_LIBS) $(XFT_LIBS) $(X_LIBS) $(XINERAMA_LIBS) \
9 LDFLAGS += -Lrender -export-dynamic
12 sources = action.c client.c config.c dispatch.c engine.c event.c group.c \
13 extensions.c focus.c frame.c grab.c menu.c openbox.c \
14 parse.c plugin.c prop.c screen.c stacking.c timer.c xerror.c \
15 parse.lex.c parse.tab.c
17 srcdir := $(srcdir)/$(dir)
18 target := $(addprefix $(dir)/,$(target))
19 objects := $(addprefix $(dir)/,$(sources:.c=.lo))
20 sources := $(addprefix $(srcdir)/,$(sources))
21 deps := $(addprefix $(depdir)/,$(objects:.lo=.d))
22 depdir := $(depdir)/$(dir)
26 $(target): $(objects) render/libobrender.la
27 $(LINK) -o $@ $^ $(LIBS) $(LDFLAGS)
29 # kill the implicit .c.y rule
30 $(srcdir)/%.c: $(srcdir)/%.y
33 $(dir)/%.lo: $(srcdir)/%.c $(depdir)/%.d
34 $(COMPILE) -c -o $@ $<
42 $(depdir)/%.d: $(srcdir)/%.c
43 @echo Building dependancies for $<
44 $(INSTALL) -d $(depdir)
45 @$(CC) $(CPPFLAGS) $(CFLAGS) -w -MM -MF $@ -MQ $(<:.c=.lo) $<
48 $(INSTALL) -d $(DESTDIR)$(bindir)/
49 $(LIBTOOL) --mode=install $(INSTALL) $(target) \
50 $(DESTDIR)$(bindir)/$(notdir $(target))
53 -$(RM) $(DESTDIR)$(bindir)/$(notdir $(target))
54 -rmdir $(DESTDIR)$(bindir)/
58 $(RM) $(objects) $(srcdir)/*\~
59 $(RM) $(filter %.lex.c, $(sources))
60 $(RM) $(filter %.tab.c, $(sources))
61 $(RM) $(patsubst %.c,%.h, $(filter %.tab.c, $(sources)))
67 .PHONY: all install uninstall clean distclean