Added nanux receipe
authorDaniel G <giri@nwrk.biz>
Sat, 26 Jan 2019 11:52:29 +0000 (12:52 +0100)
committerDaniel G <giri@nwrk.biz>
Sat, 26 Jan 2019 11:52:29 +0000 (12:52 +0100)
_template/packages/fltk1.3/Makefile

index f8e806c..ac2e28f 100644 (file)
@@ -11,11 +11,12 @@ all: unpack windows clean linux
 .PHONY: unpack
 unpack:
        tar xvzf fltk-1.3.4-1-source.tar.gz
+       cd $(WORKDIR)/fltk-1.3.4-1
 
 .PHONY: windows
 windows:
        cd $(WORKDIR)/fltk-1.3.4-1; \
-       ./configure CFLAGS="-m32 -mwindows" CXXFLAGS="-m32 -mwindows" LDFLAGS="-m32 -static -static-libgcc -static-libstdc++ -lpthread" --host=i686-w64-mingw32 --enable-cygwin --enable-localjpeg --enable-localzlib --enable-localpng --disable-xcursor --disable-xinerama --disable-xft --disable-xdbe --disable-xrender --disable-xfixes; \
+       ./configure CFLAGS="-m32 -mwindows" CXXFLAGS="-m32 -mwindows" LDFLAGS="-m32 -static -static-libgcc -static-libstdc++ -lpthread"  --enable-static --host=i686-w64-mingw32 --enable-cygwin --enable-localjpeg --enable-localzlib --enable-localpng --disable-xcursor --disable-xinerama --disable-xft --disable-xdbe --disable-xrender --disable-xfixes; \
        make -j4
        mkdir -p $(WORKDIR)/../../include
        mkdir -p $(WORKDIR)/../../lib/mingw32
@@ -25,13 +26,27 @@ windows:
 .PHONY: linux
 linux:
        cd $(WORKDIR)/fltk-1.3.4-1; \
-       ./configure CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32 -static-libgcc -static-libstdc++" --enable-localjpeg --enable-localzlib --enable-localpng --disable-xcursor --disable-xinerama --disable-xft --disable-xdbe --disable-xrender --disable-xfixes; \
+       ./configure CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32 -static-libgcc -static-libstdc++" --enable-static --enable-localjpeg --enable-localzlib --enable-localpng --disable-xcursor --disable-xinerama --disable-xft --disable-xdbe --disable-xrender --disable-xfixes; \
        make -j4
        mkdir -p $(WORKDIR)/../../include
        mkdir -p $(WORKDIR)/../../lib/linux32
        cp -rf $(WORKDIR)/fltk-1.3.4-1/FL $(WORKDIR)/../../include
        cp -rf $(WORKDIR)/fltk-1.3.4-1/lib/* $(WORKDIR)/../../lib/linux32
 
+.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; \
+       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
+       mkdir -p $(WORKDIR)/../../include
+       mkdir -p $(WORKDIR)/../../lib/linux32
+       cp -rf $(WORKDIR)/fltk-1.3.4-1/FL $(WORKDIR)/../../include
+       cp -rf $(WORKDIR)/fltk-1.3.4-1/lib/*.a $(WORKDIR)/../../lib/linux32
+
 .PHONY: clean
 clean:
        cd $(WORKDIR)/fltk-1.3.4-1; \