[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.
This commit is contained in:
Werner Lemberg 2016-09-04 19:05:45 +02:00
parent 4e659d7ead
commit 4b28f6ac42
2 changed files with 29 additions and 6 deletions

View File

@ -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.

View File

@ -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