]> git.sur5r.net Git - i3/i3/commitdiff
Move i3-dump-log to the new Makefile layout
authorQuentin Glidic <sardemff7+git@sardemff7.net>
Wed, 16 May 2012 14:22:57 +0000 (16:22 +0200)
committerQuentin Glidic <sardemff7+git@sardemff7.net>
Sun, 22 Jul 2012 17:57:22 +0000 (19:57 +0200)
Makefile
i3-dump-log/i3-dump-log.mk [new file with mode: 0644]

index f8f7245d9bd2b878d607dec54a290cbac43751db..5663342fa263a305ebe1cab52c2be6dbfcc3e472 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ TOPDIR=$(shell pwd)
 
 include $(TOPDIR)/common.mk
 
-SUBDIRS:=i3-dump-log
+SUBDIRS:=
 
 ALL_TARGETS =
 INSTALL_TARGETS =
@@ -18,6 +18,7 @@ include i3-msg/i3-msg.mk
 include i3-input/i3-input.mk
 include i3-nagbar/i3-nagbar.mk
 include i3bar/i3bar.mk
+include i3-dump-log/i3-dump-log.mk
 
 real-all: $(ALL_TARGETS) subdirs
 
diff --git a/i3-dump-log/i3-dump-log.mk b/i3-dump-log/i3-dump-log.mk
new file mode 100644 (file)
index 0000000..a29bced
--- /dev/null
@@ -0,0 +1,26 @@
+ALL_TARGETS += i3-dump-log/i3-dump-log
+INSTALL_TARGETS += install-i3-dump-log
+CLEAN_TARGETS += clean-i3-dump-log
+
+i3_dump_log_SOURCES := $(wildcard i3-dump-log/*.c)
+i3_dump_log_HEADERS := $(wildcard i3-dump-log/*.h)
+
+i3_dump_log_OBJECTS := $(i3_dump_log_SOURCES:.c=.o)
+
+
+i3-dump-log/%.o: i3-dump-log/%.c $(i3_dump_log_HEADERS)
+       echo "[i3-dump-log] CC $<"
+       $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+
+i3-dump-log/i3-dump-log: libi3.a $(i3_dump_log_OBJECTS)
+       echo "[i3-dump-log] Link i3-dump-log"
+       $(CC) $(LDFLAGS) -o $@ $(filter-out libi3.a,$^) $(LIBS)
+
+install-i3-dump-log: i3-dump-log/i3-dump-log
+       echo "[i3-dump-log] Install"
+       $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
+       $(INSTALL) -m 0755 i3-dump-log/i3-dump-log $(DESTDIR)$(PREFIX)/bin/
+
+clean-i3-dump-log:
+       echo "[i3-dump-log] Clean"
+       rm -f $(i3_dump_log_OBJECTS) i3-dump-log/i3-dump-log