-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
37 lines (32 loc) · 1.38 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
lib_dir=lib
export STATIC_LIB_DIR=$(shell realpath $(addprefix lib/,static))
export SHARED_LIB_DIR=$(shell realpath $(addprefix lib/,shared))
export SHARED_LIBZ_PATH=$(shell realpath $(addprefix $(SHARED_LIB_DIR)/,libz.so.1.2.11))
export SHARED_LIBPNG_PATH=$(shell realpath $(addprefix $(SHARED_LIB_DIR)/,libpng16.so))
export SHARED_LIBFREETYPE_PATH=$(shell realpath $(addprefix $(SHARED_LIB_DIR)/,libfreetype.so.6.12.6))
all: clean create_lib_dir static shared
create_lib_dir:
mkdir -pv $(STATIC_LIB_DIR)
mkdir -pv $(SHARED_LIB_DIR)
static:
cd $(lib_dir)/zlib && $(MAKE) static
cd $(lib_dir)/libpng-1.6.36 && $(MAKE) static
cd $(lib_dir)/freetype-2.9 && $(MAKE) static
cp $(lib_dir)/zlib/libz.a $(STATIC_LIB_DIR)
cp $(lib_dir)/libpng-1.6.36/libpng16.a $(STATIC_LIB_DIR)
cp $(lib_dir)/freetype-2.9/libfreetype.a $(STATIC_LIB_DIR)
cd app && $(MAKE) static
shared:
cd $(lib_dir)/zlib && $(MAKE) shared
cd $(lib_dir)/libpng-1.6.36 && $(MAKE) shared
cd $(lib_dir)/freetype-2.9 && $(MAKE) shared
cp $(lib_dir)/zlib/libz.so.1.2.11 $(SHARED_LIB_DIR)
cp $(lib_dir)/libpng-1.6.36/libpng16.so $(SHARED_LIB_DIR)
cp $(lib_dir)/freetype-2.9/libfreetype.so.6.12.6 $(SHARED_LIB_DIR)
cd app && $(MAKE) shared
clean:
cd $(lib_dir)/zlib && $(MAKE) clean
cd $(lib_dir)/libpng-1.6.36 && $(MAKE) clean
cd $(lib_dir)/freetype-2.9 && $(MAKE) clean
cd app && $(MAKE) clean
rm -rf $(STATIC_LIB_DIR) $(SHARED_LIB_DIR)