| 1 |
# TOP_DIR and OBJ_DIR should be set by the user to the right directories, |
| 2 |
# if necessary. |
| 3 |
|
| 4 |
TOP_DIR ?= ../../.. |
| 5 |
OBJ_DIR ?= $(TOP_DIR)/objs |
| 6 |
|
| 7 |
|
| 8 |
# The setup below is for gcc on a Unix-like platform, |
| 9 |
# where FreeType has been set up to create a static library |
| 10 |
# (which is the default). |
| 11 |
|
| 12 |
VPATH = $(OBJ_DIR) \ |
| 13 |
$(OBJ_DIR)/.libs |
| 14 |
|
| 15 |
SRC_DIR = $(TOP_DIR)/src/tools/ftrandom |
| 16 |
|
| 17 |
CC = gcc |
| 18 |
WFLAGS = -Wmissing-prototypes \ |
| 19 |
-Wunused \ |
| 20 |
-Wimplicit \ |
| 21 |
-Wreturn-type \ |
| 22 |
-Wparentheses \ |
| 23 |
-pedantic \ |
| 24 |
-Wformat \ |
| 25 |
-Wchar-subscripts \ |
| 26 |
-Wsequence-point |
| 27 |
CFLAGS = $(WFLAGS) \ |
| 28 |
-g |
| 29 |
INCLUDES = -I $(TOP_DIR)/include |
| 30 |
LDFLAGS = |
| 31 |
LIBS = -lm \ |
| 32 |
-lz \ |
| 33 |
-lpng \ |
| 34 |
-lbz2 \ |
| 35 |
-lharfbuzz |
| 36 |
|
| 37 |
all: $(OBJ_DIR)/ftrandom |
| 38 |
|
| 39 |
$(OBJ_DIR)/ftrandom.o: $(SRC_DIR)/ftrandom.c |
| 40 |
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $< |
| 41 |
|
| 42 |
$(OBJ_DIR)/ftrandom: $(OBJ_DIR)/ftrandom.o libfreetype.a |
| 43 |
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) |
| 44 |
|
| 45 |
# EOF |