libobjs = o.trig o.invtrig o.explog o.roots o.hyp o.intops o.gamma
# Change to --fpe=SoftVFP+VFPv3 for soft vfp conventions
# add --predefine="FPE_POINTERS SETL {TRUE}" for pointer arguments
asmopts = --apcs=3/vfp --fpu=VFPv3 --cpu=Cortex-A9 --predefine="FPE_POINTERS SETL {TRUE}" --arm
gasmopts = -mapcs-32 -mcpu=cortex-a9 -mfpu=vfpv3 --defsym TARGET_FPU_SOFTVFP_VFP=1
ccdefs = -dFPE_POINTERS

all: test o.vfpmath

install: o.vfpmath h.vfpmath
    copy h.vfpmath <APCSExport$Dir>.Lib.CLib.h.vfpmath
    copy o.vfpmath <APCSExport$Dir>.Lib.CLib.o.vfpmath

test: c.Testlog c.Testtrig o.harness o.vfpmath
    cc -c -IC: c.Testtrig -o o.Testtrig
    link -AIF o.Testtrig o.harness o.vfpmath C:o.stubs -Output Testtrig
    cc -c -IC: c.Testlog -o o.Testlog
    link -AIF o.Testlog o.harness o.vfpmath C:o.stubs -Output Testlog

gcc:
    perl convasm/pl Hdr.Common >common/s
    perl convasm/pl s.trig >trig/s
    as $(gasmopts) trig/s -o trig/o

o.vfpmath: $(libobjs) Hdr.Common
    libfile -c -o o.vfpmath $(libobjs)

.SUFFIXES: .o .s
.s.o:; objasm $(asmopts) s.$* -o $@
