]> git.sur5r.net Git - i3/i3/blob - i3-nagbar/Makefile
Merge branch 'fix-scratchpad-focus'
[i3/i3] / i3-nagbar / Makefile
1 # Default value so one can compile i3-nagbar standalone
2 TOPDIR=..
3
4 include $(TOPDIR)/common.mk
5
6 CPPFLAGS += -I$(TOPDIR)/include
7
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)
11
12 # Depend on the specific file (.c for each .o) and on all headers
13 %.o: %.c ${HEADERS}
14         echo "[i3-nagbar] CC $<"
15         $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
16
17 all: i3-nagbar
18
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)
22
23 $(TOPDIR)/libi3/%.a: $(TOPDIR)/libi3/*.c
24         $(MAKE) -C $(TOPDIR)/libi3
25
26 install: all
27         echo "[i3-nagbar] INSTALL"
28         $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
29         $(INSTALL) -m 0755 i3-nagbar $(DESTDIR)$(PREFIX)/bin/
30
31 clean:
32         rm -f *.o
33
34 distclean: clean
35         rm -f i3-nagbar