openbox/build/Makefile.kernel

68 lines
1.7 KiB
Text
Raw Normal View History

include build/Makefile.incl
dir = kernel
CPPFLAGS += $(GLIB_CFLAGS) $(GMODULE_CFLAGS) $(XFT_CFLAGS) $(X_CFLAGS) \
-DG_LOG_DOMAIN=\"Openbox\"
2003-04-09 18:36:01 +00:00
LIBS += $(GLIB_LIBS) $(GMODULE_LIBS) $(XFT_LIBS) $(X_LIBS) $(XINERAMA_LIBS) \
-lobrender
LDFLAGS += -Lrender -export-dynamic
target = openbox3
sources = action.c client.c config.c dispatch.c engine.c event.c group.c \
extensions.c focus.c frame.c grab.c menu.c openbox.c \
parse.c plugin.c prop.c screen.c stacking.c timer.c xerror.c \
parse.lex.c parse.tab.c
srcdir := $(srcdir)/$(dir)
target := $(addprefix $(dir)/,$(target))
2003-04-10 04:49:22 +00:00
objects := $(addprefix $(dir)/,$(sources:.c=.lo))
sources := $(addprefix $(srcdir)/,$(sources))
2003-04-10 04:49:22 +00:00
deps := $(addprefix $(depdir)/,$(objects:.lo=.d))
depdir := $(depdir)/$(dir)
all: $(target)
2003-04-09 18:36:01 +00:00
$(target): $(objects) render/libobrender.la
$(LINK) -o $@ $^ $(LIBS) $(LDFLAGS)
# kill the implicit .c.y rule
$(srcdir)/%.c: $(srcdir)/%.y
@
2003-04-10 04:49:22 +00:00
$(dir)/%.lo: $(srcdir)/%.c $(depdir)/%.d
$(COMPILE) -c -o $@ $<
%.lex.c: %.l
$(FLEX) -o$@ $<
%.tab.c: %.y
$(BISON) -d -o $@ $<
$(depdir)/%.d: $(srcdir)/%.c
2003-04-03 05:59:03 +00:00
@echo Building dependancies for $<
$(INSTALL) -d $(depdir)
2003-04-10 04:49:22 +00:00
@$(CC) $(CPPFLAGS) $(CFLAGS) -w -MM -MF $@ -MQ $(<:.c=.lo) $<
2003-04-03 05:59:03 +00:00
install:
2003-04-03 05:59:03 +00:00
$(INSTALL) -d $(DESTDIR)$(bindir)/
2003-04-09 22:16:03 +00:00
$(LIBTOOL) --mode=install $(INSTALL) $(target) \
$(DESTDIR)$(bindir)/$(notdir $(target))
2003-04-03 05:59:03 +00:00
uninstall:
-$(RM) $(DESTDIR)$(bindir)/$(notdir $(target))
2003-04-03 05:59:03 +00:00
-rmdir $(DESTDIR)$(bindir)/
clean:
$(LTCLEAN) $(target)
2003-04-03 22:02:18 +00:00
$(RM) $(objects) $(srcdir)/*\~
$(RM) $(filter %.lex.c, $(sources))
$(RM) $(filter %.tab.c, $(sources))
$(RM) $(patsubst %.c,%.h, $(filter %.tab.c, $(sources)))
distclean:
2003-04-03 05:59:03 +00:00
-include $(deps)
2003-04-03 05:59:03 +00:00
.PHONY: all install uninstall clean distclean