2010-07-21 19:15:18 -04:00
|
|
|
TOPDIR=$(shell pwd)
|
|
|
|
|
|
|
|
include $(TOPDIR)/common.mk
|
|
|
|
|
|
|
|
FILES:=$(wildcard src/*.c)
|
|
|
|
FILES:=$(FILES:.c=.o)
|
|
|
|
HEADERS:=$(wildcard include/*.h)
|
|
|
|
|
2010-09-17 12:27:07 -04:00
|
|
|
all: i3bar doc
|
|
|
|
|
|
|
|
i3bar: ${FILES}
|
2010-07-21 19:15:18 -04:00
|
|
|
echo "LINK"
|
|
|
|
$(CC) -o i3bar ${FILES} ${LDFLAGS}
|
|
|
|
|
2010-09-17 12:27:07 -04:00
|
|
|
doc:
|
|
|
|
echo ""
|
|
|
|
echo "SUBDIR doc"
|
|
|
|
$(MAKE) -C doc
|
|
|
|
|
2010-07-21 19:15:18 -04:00
|
|
|
src/%.o: src/%.c ${HEADERS}
|
|
|
|
echo "CC $<"
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
2010-08-06 21:50:22 -04:00
|
|
|
install: all
|
|
|
|
echo "INSTALL"
|
|
|
|
$(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
|
2010-09-17 12:27:07 -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
|
|
|
|
make -C doc distclean
|
|
|
|
|
|
|
|
.PHONY: install clean distclean doc
|