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)
8 LDFLAGS += -export-dynamic
11 sources = action.c client.c dispatch.c engine.c event.c group.c \
12 extensions.c focus.c frame.c grab.c menu.c openbox.c \
13 parse.c plugin.c prop.c screen.c stacking.c timer.c xerror.c \
14 parse.lex.c parse.tab.c
16 srcdir := $(srcdir)/$(dir)
17 target := $(addprefix $(dir)/,$(target))
18 objects := $(addprefix $(dir)/,$(sources:.c=.o))
19 sources := $(addprefix $(srcdir)/,$(sources))
20 deps := $(addprefix $(depdir)/,$(objects:.o=.d))
21 depdir := $(depdir)/$(dir)
25 $(target): $(objects) render/librender.a
26 $(LINK) -o $@ $^ $(LIBS) $(LDFLAGS)
28 # kill the implicit .c.y rule
29 $(srcdir)/%.c: $(srcdir)/%.y
32 $(dir)/%.o: $(srcdir)/%.c $(depdir)/%.d
33 $(COMPILE) -c -o $@ $<
41 $(depdir)/%.d: $(srcdir)/%.c
42 @echo Building dependancies for $<
43 $(INSTALL) -d $(depdir)
44 @$(CC) $(CPPFLAGS) $(CFLAGS) -w -MM -MF $@ -MQ $(<:.c=.o) $<
47 $(INSTALL) -d $(DESTDIR)$(bindir)/
48 $(INSTALL) $(target) $(DESTDIR)$(bindir)/$(notdir $(target))
51 -$(RM) $(DESTDIR)$(bindir)/$(notdir $(target))
52 -rmdir $(DESTDIR)$(bindir)/
56 $(RM) $(objects) $(srcdir)/*\~
57 $(RM) $(filter %.lex.c, $(sources))
58 $(RM) $(filter %.tab.c, $(sources))
59 $(RM) $(patsubst %.c,%.h, $(filter %.tab.c, $(sources)))
65 .PHONY: all install uninstall clean distclean