#!/bin/sh

if [ `getconf LONG_BIT` = "64" ]; then
	echo "ARCH: 64-bit"

	#compile
	gcc `pkg-config gtk+-x11-2.0 --cflags` -DGTK_NO_CHECK_CASTS -DG_DISABLE_CAST_CHECKS \
sit.c -o sit `pkg-config gtk+-x11-2.0 --libs` && strip --strip-all -R .note -R .comment sit
else
	echo "ARCH: 32-bit"

	#compile
	gcc `pkg-config gtk+-x11-2.0 --cflags` -DGTK_NO_CHECK_CASTS -DG_DISABLE_CAST_CHECKS \
	-Os -fmerge-all-constants -mno-accumulate-outgoing-args -march=i486 -mtune=i686 \
	-Wl,-O2,--gc-sections,--as-needed,--sort-common,-s \
	sit.c -o sit -lgtk-x11-2.0 && strip --strip-all -R .note -R .comment sit
fi

