]> git.sur5r.net Git - i3/i3/blob - i3-msg/Makefile
Merge branch 'next'
[i3/i3] / i3-msg / Makefile
1 # Default value so one can compile i3-msg standalone
2 TOPDIR=..
3
4 include $(TOPDIR)/common.mk
5
6 CFLAGS += -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 "CC $<"
15         $(CC) $(CFLAGS) -c -o $@ $<
16
17 all: ${FILES}
18         echo "LINK i3-msg"
19         $(CC) -o i3-msg ${FILES} $(LDFLAGS)
20
21 install: all
22         echo "INSTALL"
23         $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
24         $(INSTALL) -m 0755 i3-msg $(DESTDIR)$(PREFIX)/bin/
25
26 clean:
27         rm -f *.o
28
29 distclean: clean
30         rm -f i3-msg