]> git.sur5r.net Git - i3/i3/blob - i3-nagbar/Makefile
Merge i3bar into next
[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 # Depend on the object files of all source-files in src/*.c and on all header files
7 FILES=$(patsubst %.c,%.o,$(wildcard *.c))
8 HEADERS=$(wildcard *.h)
9
10 # Depend on the specific file (.c for each .o) and on all headers
11 %.o: %.c ${HEADERS}
12         echo "CC $<"
13         $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
14
15 all: i3-nagbar
16
17 i3-nagbar: ${FILES}
18         echo "LINK i3-nagbar"
19         $(CC) $(LDFLAGS) -o $@ ${FILES} $(LIBS)
20
21 install: all
22         echo "INSTALL"
23         $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
24         $(INSTALL) -m 0755 i3-nagbar $(DESTDIR)$(PREFIX)/bin/
25
26 clean:
27         rm -f *.o
28
29 distclean: clean
30         rm -f i3-nagbar