ref: 4b28f6ac422e9ca8b2b3e75c59e663fe4e13bae1
parent: 4e659d7eadb2cb17c28f1c23ac77cebd7b7e3e33
author: Werner Lemberg <[email protected]>
date: Sun Sep 4 15:05:45 EDT 2016
[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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2016-09-04 Werner Lemberg <[email protected]>
+
+ [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 <[email protected]>
[truetype] More fixes for handling of GX deltas.
--- a/src/tools/ftrandom/Makefile
+++ b/src/tools/ftrandom/Makefile
@@ -5,8 +5,13 @@
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
CC = gcc
@@ -23,13 +28,17 @@
-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