Changes to makefile to use compiled version of freetype

This commit is contained in:
Kushal K S V S 2017-07-09 13:13:06 +05:30
parent 4d3200b4db
commit 6bf7bcd378
4 changed files with 16 additions and 7 deletions

View File

@ -1,6 +1,11 @@
NOTE: First make freetype library (in the ../../ directory)
make devel
make
To generate hashes and store it in the ./hashes folder,
1) sudo make hash
1) make hash
(set resoluton in DPI by passing argument
example: sudo make DPI=100, if not specified,default is 72)
@ -18,11 +23,11 @@ To generate hashes and store it in the ./hashes folder,
To generate 32-bit RGBA PNG(s) of all glyphs in a font\n
1) sudo make png
1) make png
(set resoluton in DPI by passing argument
example: sudo make DPI=100, if not specified,default is 72)
2.Usage ./<exe> <font_file> <pt_size> <render_mode>
2) Usage ./<exe> <font_file> <pt_size> <render_mode>
Images will be saved in a file named
$(font)_$(pt_size)_$(render_mode)_$(glyph_index).png

View File

@ -0,0 +1 @@
This folder includes all the hashes generated

View File

@ -0,0 +1 @@
This folder includes all the images generated

View File

@ -4,25 +4,27 @@ SHELL = /bin/sh
SRC_HASH = hash_to_file.c bitmap.c murmur3.c
SRC_PNG = make_png.c bitmap.c murmur3.c
SRC_LIB = ../../objs/libfreetype.a
OBJS = $(src:.c=.o)
CFLAGS = -Wall -g
CC = gcc
INCLUDE = -I /usr/local/include/freetype2/
LIBS = -lfreetype -lpng
INCLUDE = -I ../../include/
LIBS = -lpng -lharfbuzz -lbz2
DPI = 72
all: png hash
png:$(SRC_PNG)
$(CC) $(CFLAGS) $(INCLUDE) -DDPI=$(DPI) -o $@ $(SRC_PNG) $(OBJS) $(LIBS)
$(CC) $(CFLAGS) $(INCLUDE) -DDPI=$(DPI) -o $@ $(SRC_PNG) $(SRC_LIB) $(OBJS) $(LIBS)
hash:$(SRC_HASH)
$(CC) $(CFLAGS) $(INCLUDE) -DDPI=$(DPI) -o $@ $(SRC_HASH) $(OBJS) $(LIBS)
$(CC) $(CFLAGS) $(INCLUDE) -DDPI=$(DPI) -o $@ $(SRC_HASH) $(SRC_LIB) $(OBJS) $(LIBS)
.PHONY: clean
clean:
-rm -f *.o