Changes to makefile to use compiled version of freetype

GSoC-2017-kushal
Kushal K S V S 8 years ago
parent 4d3200b4db
commit 6bf7bcd378
  1. 11
      tests/make_png/README
  2. 1
      tests/make_png/hashes/README
  3. 1
      tests/make_png/images/README
  4. 10
      tests/make_png/makefile

@ -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

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

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

@ -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

Loading…
Cancel
Save