[ftrandom] Improve Makefile. It now supports both a normal build (`./configure && make') and a development build (`make devel'). * src/tools/ftrandom/Makefile (VPATH): Set it so that `libfreetype.a' gets searched in both `objs' (for the development build) and `objs/.libs' (for a normal build which uses libtool). (LIBS): Add missing libraries. (ftrandom.o): New rule. (ftrandom): Use automatic variables.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
diff --git a/ChangeLog b/ChangeLog
index 4bee150..355a034 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2016-09-04 Werner Lemberg <wl@gnu.org>
+
+ [ftrandom] Improve Makefile.
+
+ It now supports both a normal build (`./configure && make') and a
+ development build (`make devel').
+
+ * src/tools/ftrandom/Makefile (VPATH): Set it so that
+ `libfreetype.a' gets searched in both `objs' (for the development
+ build) and `objs/.libs' (for a normal build which uses libtool).
+ (LIBS): Add missing libraries.
+ (ftrandom.o): New rule.
+ (ftrandom): Use automatic variables.
+
2016-09-03 Werner Lemberg <wl@gnu.org>
[truetype] More fixes for handling of GX deltas.
diff --git a/src/tools/ftrandom/Makefile b/src/tools/ftrandom/Makefile
index 2e61929..61fdf48 100644
--- a/src/tools/ftrandom/Makefile
+++ b/src/tools/ftrandom/Makefile
@@ -5,7 +5,12 @@ TOP_DIR ?= ../../..
OBJ_DIR ?= $(TOP_DIR)/objs
-# The setup below is for gcc on a Unix-like platform.
+# The setup below is for gcc on a Unix-like platform,
+# where FreeType has been set up to create a static library
+# (which is the default).
+
+VPATH = $(OBJ_DIR) \
+ $(OBJ_DIR)/.libs
SRC_DIR = $(TOP_DIR)/src/tools/ftrandom
@@ -23,13 +28,17 @@ CFLAGS = $(WFLAGS) \
-g \
-I $(TOP_DIR)/include
LIBS = -lm \
- -L $(OBJ_DIR) \
- -lfreetype \
- -lz
+ -lz \
+ -lpng \
+ -lbz2 \
+ -lharfbuzz
all: $(OBJ_DIR)/ftrandom
-$(OBJ_DIR)/ftrandom: $(SRC_DIR)/ftrandom.c $(OBJ_DIR)/libfreetype.a
- $(CC) -o $(OBJ_DIR)/ftrandom $(CFLAGS) $(SRC_DIR)/ftrandom.c $(LIBS)
+$(OBJ_DIR)/ftrandom.o: $(SRC_DIR)/ftrandom.c
+ $(CC) -c -o $@ $(CFLAGS) $<
+
+$(OBJ_DIR)/ftrandom: $(OBJ_DIR)/ftrandom.o libfreetype.a
+ $(CC) -o $(OBJ_DIR)/ftrandom $^ $(LIBS)
# EOF