lite-xl/os4build.sh

47 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
cflags="-D__USE_INLINE__ -DLITE_XL_DATA_USE_EXEDIR -DLITE_USE_SDL_RENDERER -Wall -O3 -g -std=gnu11 -fno-strict-aliasing -Isrc -Ilib/font_renderer -I/sdk/local/newlib/include/SDL2 -lSDL2 -llua -lauto"
#cflags+=" $(pkg-config --cflags lua5.2) $(sdl2-config --cflags)"
lflags="-mcrt=newlib -static-libgcc -static-libstdc++ -lSDL2 -lagg -lfreetype -llua -lm -lpthread -athread=native"
#for package in libagg freetype2 lua5.2; do
# lflags+=" $(pkg-config --libs $package)"
#done
#lflags+=" $(sdl2-config --libs) -lm"
#if [[ $* == *windows* ]]; then
# echo "cross compiling for windows is not yet supported"
# exit 1
#else
outfile="lite"
compiler="gcc"
cxxcompiler="g++"
#fi
#lib/font_renderer/build.sh || exit 1
#libs=libfontrenderer.a
libs="-lfontrenderer"
echo "compiling lite..."
gcc -c $cflags src/fontdesc.c -o fontdesc.o
gcc -c $cflags src/main.c -o main.o
gcc -c $cflags src/rencache.c -o rencache.o
gcc -c $cflags src/renderer.c -o renderer.o
gcc -c $cflags src/renwindow.c -o renwindow.o
gcc -c $cflags src/api/api.c -o api.o
gcc -c $cflags src/api/cp_replace.c -o cp_replace.o
gcc -c $cflags src/api/renderer.c -o apirenderer.o
gcc -c $cflags src/api/renderer_font.c -o renderer_font.o
gcc -c $cflags src/api/system.c -o system.o
gcc -c $cflags src/platform/amigaos4.c -o amigaos4.o
echo "linking..."
g++ -o $outfile *.o $libs $lflags
echo "cleaning up..."
rm *.o
echo "done"