# pssh ARM makefile
# fixme suck

WARNINGS = -W -Wall -Wmissing-declarations -Wmissing-prototypes -Wpointer-arith -Wno-format 

BN_SRCS = bn/bn_armcalls.c bn/bn_add.c bn/bn_asm.c bn/bn_ctx.c bn/bn_div.c bn/bn_exp.c bn/bn_gcd.c bn/bn_lib.c bn/bn_mod.c bn/bn_mont.c bn/bn_mul.c bn/bn_print.c bn/bn_rand.c bn/bn_recp.c bn/bn_shift.c bn/bn_sqr.c bn/bn_word.c

AES_SRCS = aes/aes_armcalls.c aes/aes_cbc.c aes/aes_core.c

SRCS = armcalls.c $(BN_SRCS) $(AES_SRCS)

OBJECTS = $(ARM_SRCS:.c=.o)

INCDIRS = -I. -Ibn -Iaes

all: pssh-arm

pssh-arm: $(SRCS) 
	arm-palmos-gcc -nostartfiles -Os $(WARNINGS) $(INCDIRS) -x c $(SRCS) -o pssh-arm

clean: 
	rm -f *~ *.grc  *.bin *.o *.prc pssh-arm
	rm -f bn/*.o bn/*~
	rm -f aes/*.o aes/*~

.PHONY=all pssh-arm clean
.SUFFIXES=
