gri3-wm/i3bar/Makefile

43 lines
770 B
Makefile
Raw Normal View History

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