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 10SRC_DIR = $(TOP_DIR)/src/tools/ftrandom 11 12CC = gcc 13WFLAGS = -Wmissing-prototypes \ 14 -Wunused \ 15 -Wimplicit \ 16 -Wreturn-type \ 17 -Wparentheses \ 18 -pedantic \ 19 -Wformat \ 20 -Wchar-subscripts \ 21 -Wsequence-point 22CFLAGS = $(WFLAGS) \ 23 -g \ 24 -I $(TOP_DIR)/include 25LIBS = -lm \ 26 -L $(OBJ_DIR) \ 27 -lfreetype \ 28 -lz 29 30all: $(OBJ_DIR)/ftrandom 31 32$(OBJ_DIR)/ftrandom: $(SRC_DIR)/ftrandom.c $(OBJ_DIR)/libfreetype.a 33 $(CC) -o $(OBJ_DIR)/ftrandom $(CFLAGS) $(SRC_DIR)/ftrandom.c $(LIBS) 34 35# EOF 36