1 # Default value so one can compile i3-nagbar standalone
4 include $(TOPDIR)/common.mk
6 CPPFLAGS += -I$(TOPDIR)/include
8 # Depend on the object files of all source-files in src/*.c and on all header files
9 FILES=$(patsubst %.c,%.o,$(wildcard *.c))
10 HEADERS=$(wildcard *.h)
12 # Depend on the specific file (.c for each .o) and on all headers
14 echo "[i3-nagbar] CC $<"
15 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
19 i3-nagbar: $(TOPDIR)/libi3/libi3.a ${FILES}
20 echo "[i3-nagbar] LINK i3-nagbar"
21 $(CC) $(LDFLAGS) -o $@ $(filter-out libi3/libi3.a,$^) $(LIBS)
23 $(TOPDIR)/libi3/%.a: $(TOPDIR)/libi3/*.c
24 $(MAKE) -C $(TOPDIR)/libi3
27 echo "[i3-nagbar] INSTALL"
28 $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
29 $(INSTALL) -m 0755 i3-nagbar $(DESTDIR)$(PREFIX)/bin/