]> Dogcows Code - chaz/openbox/blob - build/Makefile.kernel
make stacked cycling the default
[chaz/openbox] / build / Makefile.kernel
1 include build/Makefile.incl
2
3 dir = kernel
4
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
9
10 target = openbox3
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
15
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)
22
23 all: $(target)
24
25 $(target): $(objects) render/librender.a
26 $(LINK) -o $@ $^ $(LIBS) $(LDFLAGS)
27
28 # kill the implicit .c.y rule
29 $(srcdir)/%.c: $(srcdir)/%.y
30 @
31
32 $(dir)/%.o: $(srcdir)/%.c $(depdir)/%.d
33 $(COMPILE) -c -o $@ $<
34
35 %.lex.c: %.l
36 $(FLEX) -o$@ $<
37
38 %.tab.c: %.y
39 $(BISON) -d -o $@ $<
40
41 $(depdir)/%.d: $(srcdir)/%.c
42 @echo Building dependancies for $<
43 $(INSTALL) -d $(depdir)
44 @$(CC) $(CPPFLAGS) $(CFLAGS) -w -MM -MF $@ -MQ $(<:.c=.o) $<
45
46 install:
47 $(INSTALL) -d $(DESTDIR)$(bindir)/
48 $(INSTALL) $(target) $(DESTDIR)$(bindir)/$(notdir $(target))
49
50 uninstall:
51 -$(RM) $(DESTDIR)$(bindir)/$(notdir $(target))
52 -rmdir $(DESTDIR)$(bindir)/
53
54 clean:
55 $(LTCLEAN) $(target)
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)))
60
61 distclean:
62
63 -include $(deps)
64
65 .PHONY: all install uninstall clean distclean
This page took 0.050758 seconds and 4 git commands to generate.