2011-08-01 10:13:19 -04:00
|
|
|
TOPDIR=..
|
2010-07-21 19:15:18 -04:00
|
|
|
|
|
|
|
include $(TOPDIR)/common.mk
|
|
|
|
|
|
|
|
FILES:=$(wildcard src/*.c)
|
|
|
|
FILES:=$(FILES:.c=.o)
|
|
|
|
HEADERS:=$(wildcard include/*.h)
|
|
|
|
|
2011-08-01 10:13:19 -04:00
|
|
|
CPPFLAGS += -I$(TOPDIR)/include
|
|
|
|
|
2010-09-17 12:27:07 -04:00
|
|
|
all: i3bar doc
|
|
|
|
|
2011-10-21 14:06:53 -04:00
|
|
|
i3bar: $(TOPDIR)/libi3/libi3.a ${FILES}
|
2011-10-21 14:03:54 -04:00
|
|
|
echo "[i3bar] LINK"
|
2011-10-09 08:05:29 -04:00
|
|
|
$(CC) $(LDFLAGS) -o $@ $(filter-out libi3/libi3.a,$^) $(LIBS)
|
|
|
|
|
|
|
|
libi3/%.a:
|
|
|
|
$(MAKE) -C $(TOPDIR)/libi3
|
2010-07-21 19:15:18 -04:00
|
|
|
|
2010-09-17 12:27:07 -04:00
|
|
|
doc:
|
|
|
|
echo ""
|
2011-10-21 14:03:54 -04:00
|
|
|
echo "[i3bar] SUBDIR doc"
|
2010-09-17 12:27:07 -04:00
|
|
|
$(MAKE) -C doc
|
|
|
|
|
2010-07-21 19:15:18 -04:00
|
|
|
src/%.o: src/%.c ${HEADERS}
|
2011-10-21 14:03:54 -04:00
|
|
|
echo "[i3bar] CC $<"
|
2011-07-18 22:21:36 -04:00
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
2010-07-21 19:15:18 -04:00
|
|
|
|
2010-08-06 21:50:22 -04:00
|
|
|
install: all
|
2011-10-21 14:03:54 -04:00
|
|
|
echo "[i3bar] INSTALL"
|
2010-08-06 21:50:22 -04:00
|
|
|
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
|
|
|
|
$(INSTALL) -m 0755 i3bar $(DESTDIR)$(PREFIX)/bin
|
|
|
|
|
2010-07-21 19:15:18 -04:00
|
|
|
clean:
|
2010-10-23 23:29:54 -04:00
|
|
|
rm -f src/*.o
|
2011-10-09 18:30:08 -04:00
|
|
|
$(MAKE) -C doc clean
|
2010-08-06 21:50:22 -04:00
|
|
|
|
2010-10-23 23:29:54 -04:00
|
|
|
distclean: clean
|
|
|
|
rm -f i3bar
|
2011-10-09 18:30:08 -04:00
|
|
|
$(MAKE) -C doc distclean
|
2010-10-23 23:29:54 -04:00
|
|
|
|
|
|
|
.PHONY: install clean distclean doc
|