Added freetype2 support.
authorDaniel G <giri@nwrk.biz>
Mon, 28 Jan 2019 03:09:31 +0000 (04:09 +0100)
committerDaniel G <giri@nwrk.biz>
Mon, 28 Jan 2019 03:09:31 +0000 (04:09 +0100)
_template/Makefile
_template/packages/freetype/.gitignore [deleted file]
_template/packages/freetype/Makefile [deleted file]
_template/packages/freetype/freetype-2.9.1.tar.gz [deleted file]
_template/packages/freetype2/Makefile [new file with mode: 0644]
_template/packages/freetype2/freetype-2.9.1.tar.gz [new file with mode: 0644]
_template/src/Makefile

index 748f088..46c77ed 100644 (file)
@@ -6,10 +6,14 @@
 ############################################################################
 WORKDIR = $(shell pwd)
 
-all: allegro nanox fltk _template linux_package windows_package android_package
+all: freetype allegro nanox fltk _template linux_package windows_package android_package
 
 
 #### Dependencies
+freetype:
+       cd $(WORKDIR)/packages/freetype2; \
+       make
+
 allegro:
        cd $(WORKDIR)/packages/allegro5.1.13; \
        make
@@ -33,6 +37,10 @@ _template:
 
 
 #### Clean
+clean_freetype:
+       cd $(WORKDIR)/packages/freetype2; \
+       make clean
+
 clean_allegro:
        cd $(WORKDIR)/packages/allegro5.1.13; \
        make clean
@@ -83,4 +91,4 @@ android_package:
        mkdir -p $(WORKDIR)/install_package/
        cp $(WORKDIR)/src/bin/Android/_template.apk $(WORKDIR)/install_package/
 
-clean: clean_lib clean__template clean_fltk  clean_tinyxml clean_allegro clean_nanox
+clean: clean_lib clean__template clean_fltk  clean_tinyxml clean_allegro clean_nanox clean_freetype
diff --git a/_template/packages/freetype/.gitignore b/_template/packages/freetype/.gitignore
deleted file mode 100644 (file)
index f695051..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# Ignore everything
-*
-
-# But not these files...
-!.gitignore
-!freetype-2.9.1.tar.gz
-!Makefile
\ No newline at end of file
diff --git a/_template/packages/freetype/Makefile b/_template/packages/freetype/Makefile
deleted file mode 100644 (file)
index d7a7542..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-############################################################################
-# Workfile: Makefile
-# Author: Daniel Giritzer, S1810567004 (daniel@giritzer.eu)
-# Date: 03.12.2018
-# Description: Universal Makefile for Unix based Operating Systems
-############################################################################
-WORKDIR = $(shell pwd)
-
-all: unpack windows clean linux
-
-.PHONY: unpack
-unpack:
-       tar xvzf freetype-2.9.1.tar.gz
-       cd $(WORKDIR)/freetype-2.9.1
-       
-.PHONY: windows
-windows:
-       cd $(WORKDIR)/freetype-2.9.1; \
-       ./configure CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32 -static-libgcc -static-libstdc++" --host=i686-w64-mingw32 --disable-shared --enable-static --without-png --without-zlib --without-harfbuzz; \
-       make -j4
-       mkdir -p $(WORKDIR)/../../include/*
-       mkdir -p $(WORKDIR)/../../lib/mingw32
-       cp -rf $(WORKDIR)/freetype-2.9.1/include $(WORKDIR)/../../include
-       cp -rf $(WORKDIR)/freetype-2.9.1/objs/.libs/libfreetype.a $(WORKDIR)/../../lib/mingw32
-
-.PHONY: linux
-linux:
-       cd $(WORKDIR)/freetype-2.9.1; \
-       ./configure CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32 -static-libgcc -static-libstdc++" --disable-shared --enable-static --without-png --without-zlib --without-harfbuzz; \
-       make -j4
-       mkdir -p $(WORKDIR)/../../include
-       mkdir -p $(WORKDIR)/../../lib/linux32
-       cp -rf $(WORKDIR)/freetype-2.9.1/include/* $(WORKDIR)/../../include
-       cp -rf $(WORKDIR)/freetype-2.9.1/objs/.libs/libfreetype.a $(WORKDIR)/../../lib/linux32
-
-.PHONY: clean
-clean:
-       cd $(WORKDIR)/freetype-2.9.1; \
-       make clean
diff --git a/_template/packages/freetype/freetype-2.9.1.tar.gz b/_template/packages/freetype/freetype-2.9.1.tar.gz
deleted file mode 100644 (file)
index 01ad8ea..0000000
Binary files a/_template/packages/freetype/freetype-2.9.1.tar.gz and /dev/null differ
diff --git a/_template/packages/freetype2/Makefile b/_template/packages/freetype2/Makefile
new file mode 100644 (file)
index 0000000..0c5ee04
--- /dev/null
@@ -0,0 +1,55 @@
+############################################################################
+# Workfile: Makefile
+# Author: Daniel Giritzer, S1810567004 (daniel@giritzer.eu)
+# Date: 03.12.2018
+# Description: Universal Makefile for Unix based Operating Systems
+############################################################################
+WORKDIR = $(shell pwd)
+
+# Add android ndk toolchain
+export PATH := /usr/lib/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/:$(PATH)
+
+all: unpack windows linux android_arm
+
+.PHONY: unpack
+unpack:
+       tar xvzf freetype-2.9.1.tar.gz
+       cd $(WORKDIR)/freetype-2.9.1
+       
+.PHONY: windows
+windows:
+       cd $(WORKDIR)/freetype-2.9.1; \
+       make clean; \
+       ./configure CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32 -static-libgcc -static-libstdc++" --host=i686-w64-mingw32 --disable-shared --enable-static --without-png --without-zlib --without-harfbuzz; \
+       make -j4
+       mkdir -p $(WORKDIR)/../../include/
+       mkdir -p $(WORKDIR)/../../lib/mingw32
+       cp -rf $(WORKDIR)/freetype-2.9.1/include $(WORKDIR)/../../include
+       cp -rf $(WORKDIR)/freetype-2.9.1/objs/.libs/libfreetype.a $(WORKDIR)/../../lib/mingw32
+
+.PHONY: linux
+linux:
+       cd $(WORKDIR)/freetype-2.9.1; \
+       make clean; \
+       ./configure CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32 -static-libgcc -static-libstdc++" --disable-shared --enable-static --without-png --without-zlib --without-harfbuzz; \
+       make -j4
+       mkdir -p $(WORKDIR)/../../include
+       mkdir -p $(WORKDIR)/../../lib/linux32
+       cp -rf $(WORKDIR)/freetype-2.9.1/include/* $(WORKDIR)/../../include
+       cp -rf $(WORKDIR)/freetype-2.9.1/objs/.libs/libfreetype.a $(WORKDIR)/../../lib/linux32
+
+.PHONY: android_arm
+android_arm:
+       cd $(WORKDIR)/freetype-2.9.1; \
+       make clean; \
+       ./configure CFLAGS="--sysroot=/usr/lib/android-ndk/platforms/android-23/arch-arm" CXXFLAGS="--sysroot=/usr/lib/android-ndk/platforms/android-23/arch-arm" LDFLAGS="-static-libgcc -static-libstdc++ --sysroot=/usr/lib/android-ndk/platforms/android-23/arch-arm" --host=arm-linux-androideabi  --disable-shared --enable-static --without-png --without-zlib --without-harfbuzz; \
+       make -i -j4
+       mkdir -p $(WORKDIR)/../../include
+       mkdir -p $(WORKDIR)/../../lib/android_arm
+       cp -rf $(WORKDIR)/freetype-2.9.1/include/* $(WORKDIR)/../../include
+       cp -rf $(WORKDIR)/freetype-2.9.1/objs/.libs/libfreetype.a $(WORKDIR)/../../lib/android_arm
+
+.PHONY: clean
+clean:
+       cd $(WORKDIR)/freetype-2.9.1; \
+       make clean
diff --git a/_template/packages/freetype2/freetype-2.9.1.tar.gz b/_template/packages/freetype2/freetype-2.9.1.tar.gz
new file mode 100644 (file)
index 0000000..01ad8ea
Binary files /dev/null and b/_template/packages/freetype2/freetype-2.9.1.tar.gz differ
index 81ad316..7552c54 100644 (file)
@@ -15,7 +15,7 @@ LIBDIR =
 INC = -I$(WORKDIR)/../include
 LDFLAGS = -std=c++11 -static-libstdc++ -static-libgcc -Wl,-Bstatic
 CFLAGS = -Wall -fexceptions -std=c++11 -static-libstdc++ -static-libgcc
-LIB = -lfltk_images -lfltk_png -lfltk_z -lfltk_jpeg -lfltk
+LIB = -lfltk_images -lfltk_png -lfltk_z -lfltk_jpeg -lfltk -lfreetype
 
 ###################################
 #GCC | EDIT 2/11