]> git.sur5r.net Git - i3/i3/blob - i3-input/Makefile
Add initial version of i3-input, an interactive tool for sending IPC commands
[i3/i3] / i3-input / Makefile
1 # Default value so one can compile i3-input 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) $(CFLAGS) -c -o $@ $<
14
15 all: ${FILES}
16         echo "LINK i3-input"
17         $(CC) -o i3-input ${FILES} $(LDFLAGS)
18
19 install: all
20         echo "INSTALL"
21         $(INSTALL) -d -m 0755 $(DESTDIR)/usr/bin
22         $(INSTALL) -m 0755 i3-input $(DESTDIR)/usr/bin/
23
24 clean:
25         rm -f *.o
26
27 distclean: clean
28         rm -f i3-input