Buildsystem Code/file cleanup (step 2).
authorDaniel G <giri@nwrk.biz>
Sun, 27 Jan 2019 14:32:49 +0000 (15:32 +0100)
committerDaniel G <giri@nwrk.biz>
Sun, 27 Jan 2019 14:32:49 +0000 (15:32 +0100)
_template/packages/allegro5.1.13/Makefile
_template/packages/allegro5/.gitignore [deleted file]
_template/packages/allegro5/Makefile [deleted file]
_template/packages/allegro5/allegro-5.2.4.0.tar.gz [deleted file]
_template/packages/allegro5/setenv.sh [deleted file]
_template/packages/allegro5/setenv64.sh [deleted file]
_template/packages/fltk1.3/Makefile
_template/packages/nanox/Makefile
_template/packages/nanox/config_android_arm

index 759e37c..7033d10 100644 (file)
@@ -20,7 +20,7 @@ android_arm:
        . $(WORKDIR)/setenv.sh && \
        mkdir -p ./buildandroid; \
        cd ./buildandroid; \
-       cmake ..  -DANDROID_NDK_TOOLCHAIN_ROOT=../android_toolchain -DWANT_ANDROID=on -DCMAKE_BUILD_TYPE=Release -DANDROID_TARGET=android-23 -DARM_TARGETS=armeabi-v7a -DSHARED=false -DWANT_MONOLITH=ON -DWANT_EXAMPLES=false -DWANT_DEMO=false  -DWANT_TESTS=false; \
+       cmake ..  -DANDROID_NDK_TOOLCHAIN_ROOT=../android_toolchain -DWANT_ANDROID=on -DCMAKE_BUILD_TYPE=Release -DANDROID_TARGET=android-23 -DARM_TARGETS=armeabi-v7a -DSHARED=true -DWANT_MONOLITH=ON -DWANT_EXAMPLES=false -DWANT_DEMO=false  -DWANT_TESTS=false; \
        make -j4 -i 
        mkdir -p $(WORKDIR)/../../include
        mkdir -p $(WORKDIR)/../../lib/android_arm
@@ -28,8 +28,8 @@ android_arm:
        cp -rf $(WORKDIR)/allegro-5.1.13.1/include/* $(WORKDIR)/../../include
        cp -rf $(WORKDIR)/allegro-5.1.13.1/android/allegro_activity/src/* $(WORKDIR)/../../lib/android_arm/liballeg
        cp -rf $(WORKDIR)/allegro-5.1.13.1/buildandroid/include/* $(WORKDIR)/../../include
-       rename "s/_monolith-static//g" $(WORKDIR)/allegro-5.1.13.1/buildandroid/lib/*.a
-       cp -rf $(WORKDIR)/allegro-5.1.13.1/buildandroid/lib/*.a $(WORKDIR)/../../lib/android_arm
+       rename "s/_monolith//g" $(WORKDIR)/allegro-5.1.13.1/buildandroid/lib/*.so
+       cp -rf $(WORKDIR)/allegro-5.1.13.1/buildandroid/lib/*.so $(WORKDIR)/../../lib/android_arm
 
 .PHONY: clean
 clean:
diff --git a/_template/packages/allegro5/.gitignore b/_template/packages/allegro5/.gitignore
deleted file mode 100644 (file)
index 71e2983..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-# Ignore everything
-*
-
-# But not these files...
-!.gitignore
-!allegro-5.2.4.0.tar.gz
-!Makefile
-!setenv.sh
-!setenv64.sh
\ No newline at end of file
diff --git a/_template/packages/allegro5/Makefile b/_template/packages/allegro5/Makefile
deleted file mode 100644 (file)
index 729c1fe..0000000
+++ /dev/null
@@ -1,54 +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 android_arm android_arm64
-
-.PHONY: unpack
-unpack:
-       tar xvzf allegro-5.2.4.0.tar.gz
-       find $(WORKDIR)/allegro-5.2.4.0 -name build.gradle -exec sed -i -e '/compileSdkVersion.*/a buildToolsVersion "25.0.0"' {} \;
-       find $(WORKDIR)/allegro-5.2.4.0 -name build.gradle -exec sed -i -e 's/compileSdkVersion.*/compileSdkVersion 23/g' {} \;
-       find $(WORKDIR)/allegro-5.2.4.0 -name build.gradle -exec sed -i -e 's/targetSdkVersion.*/targetSdkVersion 23/g' {} \;
-       sed -i -e 's/classpath "com.android.tools.build:gradle:.*/classpath "com.android.tools.build:gradle:2.3.3"/g' $(WORKDIR)/allegro-5.2.4.0/android/gradle_project/build.gradle
-       sed -i -e '/google()/a maven { url "file:\/\/\/usr\/share\/maven-repo" }' $(WORKDIR)/allegro-5.2.4.0/android/gradle_project/build.gradle
-
-.PHONY: android_arm
-android_arm:
-       cd $(WORKDIR)/allegro-5.2.4.0; \
-       set -e; \
-       . $(WORKDIR)/setenv.sh && \
-       mkdir -p ./buildandroid; \
-       cd ./buildandroid; \
-       cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-android.cmake -DCMAKE_BUILD_TYPE=Release -DANDROID_TARGET=android-15 -DARM_TARGETS=armeabi-v7a -DSHARED=false -DWANT_EXAMPLES=false -DWANT_DEMO=false  -DWANT_TESTS=false; \
-       make -j6
-       mkdir -p $(WORKDIR)/../../include
-       mkdir -p $(WORKDIR)/../../lib/android_arm
-       cp -rf $(WORKDIR)/allegro-5.2.4.0/include/* $(WORKDIR)/../../include
-       cp -rf $(WORKDIR)/allegro-5.2.4.0/buildandroid/include/* $(WORKDIR)/../../include
-       rename "s/-static//g" $(WORKDIR)/allegro-5.2.4.0/buildandroid/lib/*.a
-       cp -rf $(WORKDIR)/allegro-5.2.4.0/buildandroid/lib/*.a $(WORKDIR)/../../lib/android_arm
-
-.PHONY: android_arm64
-android_arm64:
-       cd $(WORKDIR)/allegro-5.2.4.0; \
-       set -e; \
-       . $(WORKDIR)/setenv64.sh && \
-       mkdir -p ./buildandroid64; \
-       cd ./buildandroid64; \
-       cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-android.cmake -DCMAKE_BUILD_TYPE=Release -DANDROID_TARGET=android-21 -DARM_TARGETS=arm64-v8a -DSHARED=false  -DWANT_EXAMPLES=false -DWANT_DEMO=false  -DWANT_TESTS=false; \
-       make -j6
-       mkdir -p $(WORKDIR)/../../include
-       mkdir -p $(WORKDIR)/../../lib/android_arm64
-       cp -rf $(WORKDIR)/allegro-5.2.4.0/include/* $(WORKDIR)/../../include
-       cp -rf $(WORKDIR)/allegro-5.2.4.0/buildandroid64/include/* $(WORKDIR)/../../include
-       rename "s/-static//g" $(WORKDIR)/allegro-5.2.4.0/buildandroid64/lib/*.a
-       cp -rf $(WORKDIR)/allegro-5.2.4.0/buildandroid64/lib/*.a $(WORKDIR)/../../lib/android_arm64
-
-.PHONY: clean
-clean:
-       rm -rf allegro-5.2.4.0
diff --git a/_template/packages/allegro5/allegro-5.2.4.0.tar.gz b/_template/packages/allegro5/allegro-5.2.4.0.tar.gz
deleted file mode 100644 (file)
index bff5046..0000000
Binary files a/_template/packages/allegro5/allegro-5.2.4.0.tar.gz and /dev/null differ
diff --git a/_template/packages/allegro5/setenv.sh b/_template/packages/allegro5/setenv.sh
deleted file mode 100755 (executable)
index 1333ca4..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-WORKDIR=$(pwd)
-#git clone https://github.com/mherod/android-sdk-licenses.git
-#sudo cp -a $WORKDIR/android-sdk-licenses/*-license /usr/lib/android-sdk/licenses
-/usr/lib/android-ndk/build/tools/make_standalone_toolchain.py --api=15 --install-dir=$WORKDIR/android_toolchain --arch=arm
-export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/
-export ANDROID_HOME=/usr/lib/android-sdk/
-export ANDROID_NDK_HOME=/usr/lib/android-ndk/
-export ANDROID_NDK_TOOLCHAIN_ROOT=$WORKDIR/android_toolchain/
diff --git a/_template/packages/allegro5/setenv64.sh b/_template/packages/allegro5/setenv64.sh
deleted file mode 100755 (executable)
index bccd770..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-WORKDIR=$(pwd)
-#git clone https://github.com/mherod/android-sdk-licenses.git
-#sudo cp -a $WORKDIR/android-sdk-licenses/*-license /usr/lib/android-sdk/licenses
-/usr/lib/android-ndk/build/tools/make_standalone_toolchain.py --api=21 --install-dir=$WORKDIR/android_toolchain64 --arch=arm64
-export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/
-export ANDROID_HOME=/usr/lib/android-sdk/
-export ANDROID_NDK_HOME=/usr/lib/android-ndk/
-export ANDROID_NDK_TOOLCHAIN_ROOT=$WORKDIR/android_toolchain64/
index 5ae1f58..5461b39 100644 (file)
@@ -9,12 +9,14 @@ 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 clean linux
+all: unpack windows linux android_arm
 
 .PHONY: unpack
 unpack:
        tar xvzf fltk-1.3.4-1-source.tar.gz
        cd $(WORKDIR)/fltk-1.3.4-1
+       cp /usr/include/X11/Xmd.h ../../include/X11/
+       cp /usr/include/X11/cursorfont.h ../../include/X11/
 
 .PHONY: windows
 windows:
@@ -39,7 +41,7 @@ linux:
 .PHONY: linux_nanox
 linux_nanox:
        cd $(WORKDIR)/fltk-1.3.4-1; \
-       ./configure CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32 -static-libgcc -static-libstdc++" --enable-static --x-includes=../../../../include/X11  --x-libraries=../../../../lib/linux32 --enable-localjpeg --enable-localzlib --enable-localpng --disable-gl --disable-xinerama --disable-xft --disable-xdbe --disable-xfixes --disable-xcursor --disable-xrender; \
+       ./configure CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32 -static-libgcc -static-libstdc++" --enable-static --x-includes=../../../../include/  --x-libraries=../../../../lib/linux32 --enable-localjpeg --enable-localzlib --enable-localpng --disable-gl --disable-xinerama --disable-xft --disable-xdbe --disable-xfixes --disable-xcursor --disable-xrender; \
        sed -i -e 's/-lX11/-lNX11 -lnano-X/g' ./makeinclude; \
        sed -i -e 's/-lX11/-lNX11 -lnano-X/g' ./fltk-config; \
        sed -i -e '/#define USE_XRANDR/ a #undef USE_XRANDR' ./src/Fl_x.cxx; \
@@ -53,12 +55,13 @@ linux_nanox:
 .PHONY: android_arm
 android_arm:
        cd $(WORKDIR)/fltk-1.3.4-1; \
-       ./configure CFLAGS="--sysroot=/usr/lib/android-ndk/platforms/android-24/arch-arm" CXXFLAGS="--sysroot=/usr/lib/android-ndk/platforms/android-24/arch-arm" LDFLAGS="-static-libgcc -static-libstdc++ --sysroot=/usr/lib/android-ndk/platforms/android-24/arch-arm" --enable-static --x-includes=../../../../include/X11  --x-libraries=../../../../lib/android_arm --host=arm-linux-androideabi --enable-localjpeg --enable-localzlib --enable-localpng --disable-gl --disable-xinerama --disable-xft --disable-xdbe --disable-xfixes --disable-xcursor --disable-xrender; \
+       ./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" --enable-static  --x-includes=../../../../include/ --x-libraries=../../../../lib/android_arm --host=arm-linux-androideabi --enable-localjpeg --enable-localzlib --enable-localpng --disable-gl --disable-xinerama --disable-xft --disable-xdbe --disable-xfixes --disable-xcursor --disable-xrender; \
        sed -i -e 's/-lX11/-lNX11 -lnano-X/g' ./makeinclude; \
        sed -i -e 's/-lX11/-lNX11 -lnano-X/g' ./fltk-config; \
        sed -i -e '/#define USE_XRANDR/ a #undef USE_XRANDR' ./src/Fl_x.cxx; \
        sed -i -e '/#define USE_XRANDR/ a #undef USE_XRANDR' ./src/screen_xywh.cxx; \
-       make -k -j4
+       sed -i -e 's/char \*pc_dl_error/const char \*pc_dl_error/g' ./src/Fl_Native_File_Chooser_GTK.cxx; \
+       make -i -j4
        mkdir -p $(WORKDIR)/../../include
        mkdir -p $(WORKDIR)/../../lib/android_arm
        cp -rf $(WORKDIR)/fltk-1.3.4-1/FL $(WORKDIR)/../../include
@@ -66,5 +69,4 @@ android_arm:
 
 .PHONY: clean
 clean:
-       cd $(WORKDIR)/fltk-1.3.4-1; \
-       make clean
+       rm -rf $(WORKDIR)/fltk-1.3.4-1
index 354f0bb..42c1a2a 100644 (file)
@@ -33,8 +33,8 @@ android_arm:
        cp $(WORKDIR)/config_android_arm $(WORKDIR)/microwindows-master/src/config
        export PATH=/usr/lib/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/:${PATH}; \
        cd $(WORKDIR)/microwindows-master/src/; \
-       sed -i -e 's/CFLAGS=.*/CFLAGS=--sysroot=\/usr\/lib\/android-ndk\/platforms\/android-23\/arch-arm\/ -fPIE -fPIC -I..\/..\/..\/..\/..\/include/g' ./Makefile.rules; \
-       sed -i -e 's/LDFLAGS=.*/LDFLAGS=--sysroot=\/usr\/lib\/android-ndk\/platforms\/android-23\/arch-arm\/ -pic/g' ./Makefile.rules; \
+       sed -i -e 's/CFLAGS=.*/CFLAGS=--sysroot=\/usr\/lib\/android-ndk\/platforms\/android-23\/arch-arm\/ -I..\/..\/..\/..\/..\/include/g' ./Makefile.rules; \
+       sed -i -e 's/LDFLAGS=.*/LDFLAGS=--sysroot=\/usr\/lib\/android-ndk\/platforms\/android-23\/arch-arm\//g' ./Makefile.rules; \
        make -j4
        mkdir -p $(WORKDIR)/../../lib/android_arm
        mkdir -p $(WORKDIR)/../../include
index 74a9e5a..b0245ca 100644 (file)
@@ -69,7 +69,7 @@ MICROWIN                 = N
 NANOX                    = Y
 NX11                    = Y
 INCLUDE_XRM             = N
-ENGINE                   = N
+ENGINE                   = Y
 SHAREDLIBS               = N
 OBJFRAMEWORK             = N