Compare commits

..

No commits in common. "os4-1.16.12" and "v1.16.12.7" have entirely different histories.

1 changed files with 31 additions and 19 deletions

View File

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