$OpenBSD: patch-Makefile,v 1.6 2012/05/09 11:56:49 dcoppa Exp $ --- Makefile.orig Wed Apr 25 23:21:25 2012 +++ Makefile Wed May 9 12:40:11 2012 @@ -19,7 +19,12 @@ else UNUSED:=$(shell $(MAKE) loglevels.h) endif +# XXX OpenBSD lacks POSIX shared memory support, so no i3-dump-log +ifeq ($(UNAME),OpenBSD) +SUBDIRS:=i3-msg i3-input i3-nagbar i3-config-wizard i3bar +else SUBDIRS:=i3-msg i3-input i3-nagbar i3-config-wizard i3bar i3-dump-log +endif # Depend on the specific file (.c for each .o) and on all headers src/%.o: src/%.c ${HEADERS} @@ -44,7 +49,7 @@ subdirs: loglevels.h: echo "[i3] LOGLEVELS" - for file in $$(ls src/*.c src/*.y src/*.l | grep -v 'cfgparse.\(tab\|yy\).c'); \ + for file in $$(ls src/*.c src/*.y src/*.l | grep -v cfgparse.tab.c | grep -v cfgparse.yy.c); \ do \ echo $$(basename $$file .c); \ done > loglevels.tmp @@ -67,7 +72,7 @@ include/GENERATED_tokens.h: include/GENERATED_call.h # and once as an object file for i3. src/commands_parser.o: src/commands_parser.c ${HEADERS} ${CMDPARSE_HEADERS} echo "[i3] CC $<" - $(CC) $(CPPFLAGS) $(CFLAGS) -DTEST_PARSER -DLOGLEVEL="((uint64_t)1 << $(shell awk '/$(shell basename $< .c)/ { print NR; exit 0; }' loglevels.tmp))" -o test.commands_parser $< $(LIBS) + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -DTEST_PARSER -DLOGLEVEL="((uint64_t)1 << $(shell awk '/$(shell basename $< .c)/ { print NR; exit 0; }' loglevels.tmp))" -o test.commands_parser $< $(LIBS) $(CC) $(CPPFLAGS) $(CFLAGS) -DLOGLEVEL="((uint64_t)1 << $(shell awk '/$(shell basename $< .c)/ { print NR; exit 0; }' loglevels.tmp))" -c -o $@ $< src/cfgparse.yy.o: src/cfgparse.l src/cfgparse.y.o ${HEADERS} @@ -89,17 +94,13 @@ install: all $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/include/i3 $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/share/xsessions $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/share/applications - $(INSTALL) -m 0755 i3 $(DESTDIR)$(PREFIX)/bin/ - $(INSTALL) -m 0755 i3-migrate-config-to-v4 $(DESTDIR)$(PREFIX)/bin/ - $(INSTALL) -m 0755 i3-sensible-editor $(DESTDIR)$(PREFIX)/bin/ - $(INSTALL) -m 0755 i3-sensible-pager $(DESTDIR)$(PREFIX)/bin/ - $(INSTALL) -m 0755 i3-sensible-terminal $(DESTDIR)$(PREFIX)/bin/ - test -e $(DESTDIR)$(SYSCONFDIR)/i3/config || $(INSTALL) -m 0644 i3.config $(DESTDIR)$(SYSCONFDIR)/i3/config - test -e $(DESTDIR)$(SYSCONFDIR)/i3/config.keycodes || $(INSTALL) -m 0644 i3.config.keycodes $(DESTDIR)$(SYSCONFDIR)/i3/config.keycodes - $(INSTALL) -m 0644 i3.welcome $(DESTDIR)$(SYSCONFDIR)/i3/welcome - $(INSTALL) -m 0644 i3.xsession.desktop $(DESTDIR)$(PREFIX)/share/xsessions/i3.desktop - $(INSTALL) -m 0644 i3.applications.desktop $(DESTDIR)$(PREFIX)/share/applications/i3.desktop - $(INSTALL) -m 0644 include/i3/ipc.h $(DESTDIR)$(PREFIX)/include/i3/ + ${INSTALL_PROGRAM} i3 $(DESTDIR)$(PREFIX)/bin/ + ${INSTALL_SCRIPT} i3-migrate-config-to-v4 $(DESTDIR)$(PREFIX)/bin/ + ${INSTALL_DATA} i3.config $(DESTDIR)$(SYSCONFDIR)/i3/config + ${INSTALL_DATA} i3.config.keycodes $(DESTDIR)$(SYSCONFDIR)/i3/config.keycodes + ${INSTALL_DATA} i3.xsession.desktop $(DESTDIR)$(PREFIX)/share/xsessions/i3.desktop + ${INSTALL_DATA} i3.applications.desktop $(DESTDIR)$(PREFIX)/share/applications/i3.desktop + ${INSTALL_DATA} include/i3/ipc.h $(DESTDIR)$(PREFIX)/include/i3/ for dir in $(SUBDIRS); do \ $(MAKE) -C $$dir install; \ done