Cleaned up and fixed os4build.sh
This commit is contained in:
parent
7a347ca436
commit
1279fde93b
44
os4build.sh
44
os4build.sh
|
@ -1,44 +1,32 @@
|
|||
#!/bin/bash
|
||||
|
||||
cflags="-D__USE_INLINE__ -DLITE_XL_DATA_USE_EXEDIR -DLITE_USE_SDL_RENDERER -Wall -O3 -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"
|
||||
INCPATH="-Isrc -Ilib/font_renderer -I/sdk/local/newlib/include/SDL2"
|
||||
DFLAGS="-D__USE_INLINE__ -DLITE_XL_DATA_USE_EXEDIR -DLITE_USE_SDL_RENDERER"
|
||||
CFLAGS="-Wall -O3 -std=gnu11 -fno-strict-aliasing"
|
||||
LFLAGS="-mcrt=newlib -static-libgcc -static-libstdc++ -lauto -lSDL2 -lfontrenderer -lagg -lfreetype -llua -lm -lpthread -athread=native"
|
||||
|
||||
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 src/fontdesc.c -o fontdesc.o $CFLAGS $INCPATH $DFLAGS
|
||||
gcc -c src/main.c -o main.o $CFLAGS $INCPATH $DFLAGS
|
||||
gcc -c src/rencache.c -o rencache.o $CFLAGS $INCPATH $DFLAGS
|
||||
gcc -c src/renderer.c -o renderer.o $CFLAGS $INCPATH $DFLAGS
|
||||
gcc -c src/renwindow.c -o renwindow.o $CFLAGS $INCPATH $DFLAGS
|
||||
|
||||
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 src/api/api.c -o api.o $CFLAGS $INCPATH $DFLAGS
|
||||
gcc -c src/api/cp_replace.c -o cp_replace.o $CFLAGS $INCPATH $DFLAGS
|
||||
gcc -c src/api/renderer.c -o apirenderer.o $CFLAGS $INCPATH $DFLAGS
|
||||
gcc -c src/api/renderer_font.c -o renderer_font.o $CFLAGS $INCPATH $DFLAGS
|
||||
gcc -c src/api/system.c -o system.o $CFLAGS $INCPATH $DFLAGS
|
||||
|
||||
gcc -c $cflags src/platform/amigaos4.c -o amigaos4.o
|
||||
gcc -c src/platform/amigaos4.c -o amigaos4.o $CFLAGS $INCPATH $DFLAGS
|
||||
|
||||
echo "linking..."
|
||||
g++ -o $outfile *.o $libs $lflags
|
||||
g++ -o $outfile *.o $LFLAGS
|
||||
|
||||
echo "cleaning up..."
|
||||
rm *.o
|
||||
|
|
Loading…
Reference in New Issue