commit 9e9a962e2f115d0df0599cb84bdbc5009ea7de12
Author: Mattias Andrée <maandree_AT_kth.se>
AuthorDate: Wed Jul 12 13:17:54 2017 +0200
Commit: Mattias Andrée <maandree_AT_kth.se>
CommitDate: Wed Jul 12 13:17:54 2017 +0200
Small improvements to the makefile
Signed-off-by: Mattias Andrée <maandree_AT_kth.se>
diff --git a/Makefile b/Makefile
index 749f41c..8c5bc2f 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -1,6 +1,7 @@
CONFIGFILE = config.mk
include $(CONFIGFILE)
+
BIN =\
blind-apply-palette\
blind-arithm\
_AT_@ -90,10 +91,9 @@ SCRIPTS =\
blind-rotate-180\
blind-rotate-270
-MAN1 = $(BIN:=.1) $(SCRIPTS:=.1)
-MAN7 = blind.7
-
-SRC = $(BIN:=.c) util.c stream.c
+COMMON_OBJ =\
+ util.o\
+ stream.o
HDR =\
arg.h\
_AT_@ -113,7 +113,12 @@ HDR =\
util/fshut.h\
video-math.h
-MISCFILES = Makefile config.mk LICENSE README TODO
+MISCFILES =\
+ Makefile\
+ config.mk\
+ LICENSE\
+ README\
+ TODO
EXAMPLEDIRS =\
inplace-flop\
_AT_@ -125,10 +130,16 @@ EXAMPLEFILES =\
reverse/Makefile\
split/Makefile
+COMMON_SRC = $(COMMON_SRC:.o=.c)
+SRC = $(BIN:=.c) $(COMMON_SRC)
+MAN1 = $(BIN:=.1) $(SCRIPTS:=.1)
+MAN7 = blind.7
+
+
all: $(BIN)
-%: %.o util.o stream.o
- $(CC) $(LDFLAGS) -o $_AT_ $^
+%: %.o $(COMMON_OBJ)
+ $(CC) -o $_AT_ $^ $(LDFLAGS)
%.o: src/%.c src/*.h src/*/*.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $_AT_ $<
_AT_@ -174,5 +185,6 @@ clean:
-rm -f $(BIN) *.o blind-$(VERSION).tar.gz
-rm -rf "blind-$(VERSION)"
+
.PHONY: all install uninstall dist clean
-.PRECIOUS: util.o stream.o
+.PRECIOUS: $(COMMON_OBJ)
Received on Wed Jul 12 2017 - 13:18:34 CEST
This archive was generated by hypermail 2.3.0
: Wed Jul 12 2017 - 13:25:18 CEST