parent
b80db811cf
commit
14c38dccd1
6 changed files with 83 additions and 96 deletions
@ -1,27 +1,32 @@ |
||||
# Define required macros here
|
||||
TOP_DIR := ../..
|
||||
BUILD_DIR := $(TOP_DIR)/builds/unix
|
||||
|
||||
SHELL = /bin/sh
|
||||
include $(TOP_DIR)/builds/unix/unix-def.mk |
||||
|
||||
SRC_SPRITE = make_sprite.c bitmap.c murmur3.c
|
||||
SRC_LIB = $(libdir)/libfreetype.a
|
||||
|
||||
SRC_LIB = ./base/lib/libfreetype.a
|
||||
OBJS = $(src:.c=.o)
|
||||
|
||||
CFLAGS = -Wall -g
|
||||
CC = gcc
|
||||
INCLUDE = -I ./base/include/freetype2/
|
||||
INCLUDE = -I $(includedir)/freetype2
|
||||
LIBS = -lpng -lharfbuzz -lbz2 -ldl
|
||||
|
||||
DPI = 72
|
||||
DPI ?= 72
|
||||
FT_TEST_RENDER_MODE ?= RGB
|
||||
|
||||
all: sprite |
||||
all: tests |
||||
|
||||
sprite:$(SRC_SPRITE) |
||||
$(CC) $(CFLAGS) $(INCLUDE) -DDPI=$(DPI) -o $@ $(SRC_SPRITE) $(SRC_LIB) $(OBJS) $(LIBS)
|
||||
tests: $(SRC_SPRITE) render_modes dpi |
||||
$(CC) $(CFLAGS) $(INCLUDE) -DDPI=$(DPI) -DFT_TEST_RENDER_MODE=$(FT_TEST_RENDER_MODE) -o $@ $(SRC_SPRITE) $(SRC_LIB) $(OBJS) $(LIBS)
|
||||
|
||||
.PHONY: clean |
||||
.PHONY: clean force |
||||
clean: |
||||
-rm -f *.o
|
||||
|
||||
|
||||
|
||||
render_modes: force |
||||
echo '$(FT_TEST_RENDER_MODE)' | cmp -s - $@ || echo '$(FT_TEST_RENDER_MODE)' > $@
|
||||
|
||||
dpi: force |
||||
echo '$(DPI)' | cmp -s - $@ || echo '$(DPI)' > $@
|
@ -1,30 +1,26 @@ |
||||
TEST_DIR=$1 |
||||
BASE_DIR=$PWD |
||||
rm -f ./html/images/* |
||||
|
||||
cd $TEST_DIR/include/freetype/config/ |
||||
sed -i 's/\/\* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING \*\//#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING /g' ftoption.h |
||||
BASE_DIR=$1 |
||||
TEST_DIR=../.. |
||||
|
||||
cd $TEST_DIR |
||||
./autogen.sh |
||||
./configure --prefix=$BASE_DIR/test/ |
||||
make |
||||
make install |
||||
BASE_LIB=$BASE_DIR/objs/.libs/libfreetype.so |
||||
TEST_LIB=$TEST_DIR/objs/.libs/libfreetype.so |
||||
|
||||
cd $BASE_DIR/../.. |
||||
./autogen.sh |
||||
./configure --prefix=$BASE_DIR/base/ |
||||
make |
||||
make install |
||||
FONT_FILE=$2 |
||||
PT_SIZE=$3 |
||||
|
||||
cd $BASE_DIR |
||||
make |
||||
echo |
||||
echo "*** Generating Images ***" |
||||
echo |
||||
|
||||
BASE_LIB=./base/lib/libfreetype.so |
||||
TEST_LIB=./test/lib/libfreetype.so |
||||
./tests $BASE_LIB $TEST_LIB $FONT_FILE $PT_SIZE |
||||
|
||||
echo "Font: " $FONT_FILE |
||||
echo "Size: " $PT_SIZE |
||||
|
||||
# Removing the current DPI and Render Mode settings |
||||
# for future compilations. |
||||
rm -f ./render_modes ./dpi |
||||
|
||||
FONT_FILE=$2 |
||||
PT_SIZE=$3 |
||||
RENDER_MODE=$4 |
||||
|
||||
./sprite $BASE_LIB $TEST_LIB $FONT_FILE $PT_SIZE $RENDER_MODE |
||||
|
||||
|
Loading…
Reference in new issue