1# TOP_DIR and OBJ_DIR should be set by the user to the right directories, 2# if necessary. 3 4TOP_DIR ?= ../../.. 5OBJ_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 12VPATH = $(OBJ_DIR) \ 13 $(OBJ_DIR)/.libs 14 15SRC_DIR = $(TOP_DIR)/src/tools/ftrandom 16 17CC = gcc 18WFLAGS = -Wmissing-prototypes \ 19 -Wunused \ 20 -Wimplicit \ 21 -Wreturn-type \ 22 -Wparentheses \ 23 -pedantic \ 24 -Wformat \ 25 -Wchar-subscripts \ 26 -Wsequence-point 27CFLAGS = $(WFLAGS) \ 28 -g 29INCLUDES = -I $(TOP_DIR)/include 30LDFLAGS = 31LIBS = -lm \ 32 -lz \ 33 -lpng \ 34 -lbz2 \ 35 -lharfbuzz 36 37all: $(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 46