include common.mk

CFLAGS=-msoft-float -fshort-wchar -marm -mlittle-endian -mcpu=arm926ej-s -I/home/barracuda/mysource/sieelf/ep3elf/include -I../.. -O2 -nostdlib -pipe -fno-exceptions -fdata-sections -ffunction-sections
CC=arm-linux-gnueabi-gcc-4.5 -std=c99 ${CFLAGS} -DNEWSGOLD -DELKA -DHAVE_CONFIG_H -DJEL_CLASSPATH_DIR='"0:\\ZBin\\java.jar"' -fshort-enums

OBJS=array.o bytecode.o class.o classfile.o constantpool.o field.o header.o interpreter.o jstring.o kni.o loader.o main.o memory.o method.o native.o print.o thread.o utf8_string.o util.o vm.o

ifeq ($(DEBUG), 1)
STRIP=
else
STRIP=-s
endif

syms=--defsym __ex=0
LIBS=-lcrt -lzzip-0.36 -lm -lc -lz-1.2.5 -lgcc -lcrt_helper

all: ${OBJS}
	arm-linux-gnueabi-ld -L/home/barracuda/mysource/sieelf/ep3elf/libs -pie ${STRIP} -gc-sections -zmax-page-size=1 ${syms} ${LIBS} -marmelf_linux_eabi ${OBJS} -o test.elf -fno-short-enums
