#!/bin/sh

VERSION=2.6

#gcc -lm main.c -owxbasicscript  -I/usr/X11R6/include -L/usr/X11R6/lib -lSM -lICE -lX11 -lXmu

#gcc main.c -o wxbasicscript $(pkg-config --cflags --libs glib-2.0) -lX11 -lXmu -lm -fpermissive -Wno-error

#gcc -g main.c -o wxbasicscript $(pkg-config --cflags --libs glib-2.0) -lX11 -lXmu -lm -Wno-error

gcc -g main.c -o wxbasicscript $(pkg-config --cflags --libs glib-2.0) -lX11 -lXmu -lm -Wno-error

#gcc main.c -o wxbasicscript $(pkg-config --cflags --libs glib-2.0) -lX11 -lXmu -lm -Wno-error -D"wGrowGet(a,b)=(void*)(uintptr_t)wGrowGet(a,b)" -D"wGrowAppend(a,b)=wGrowAppend(a,(intptr_t)(b))" -D"wGrowSet(a,b,c)=wGrowSet(a,b,(intptr_t)(c))" -D"wGrowInsert(a,b,c)=wGrowInsert(a,b,(intptr_t)(c))"

#strip wxbasicscript
#upx wxbasicscript

cp -ax wxbasicscript PuppyBasic-$VERSION/usr/bin/wxbasicscript

rm -f PuppyBasic-$VERSION.tar.gz
tar -czvf PuppyBasic-$VERSION.tar.gz PuppyBasic-$VERSION
