--- mecrisp-stellaris/Makefile +++ mecrisp-stellaris/Makefile @@ -11,31 +11,35 @@ LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/COPYING -ONLY_FOR_ARCHS= armv7 -ONLY_FOR_ARCHS_REASON= written in ARM Thumb2 assembly +ONLY_FOR_ARCHS= armv6 armv7 +ONLY_FOR_ARCHS_REASON= written in ARM assembly +AFLAGS.armv6= -march=armv6 --defsym m0core=1 +MAKE_ENV+= AFLAGS="${AFLAGS.${ARCH}}" -OPTIONS_DEFINE= EXTRAS -OPTIONS_DEFAULT= EXTRAS -EXTRAS_DESC= Add disassembler and math library to Forth core -EXTRAS_VARS_OFF= PROGRAM=mecrisp-stellaris-freebsd -EXTRAS_VARS= PROGRAM=mecrisp-stellaris-freebsd-with-disassembler-and-math +BUILD_DEPENDS= binutils>2.33:devel/binutils -# definitions assuming we build on ARM -BINARY_ALIAS= arm-none-eabi-as=${AS} \ - arm-none-eabi-ld=${LD} \ - arm-none-eabi-objcopy=${OBJCOPY} # stripping eats our hand-crafted ELF binaries, so don't do that # the binaries are free of symbols or stuff like that anyway STRIP= +# definitions assuming we build on ARM +BINARY_ALIAS= arm-none-eabi-as=${LOCALBASE}/bin/${AS} \ + arm-none-eabi-ld=${LOCALBASE}/bin/${LD} \ + arm-none-eabi-objcopy=${LOCALBASE}/bin/${OBJCOPY} +OPTIONS_DEFINE= EXTRAS +OPTIONS_DEFAULT= EXTRAS +EXTRAS_DESC= Add disassembler and math library to Forth core +EXTRAS_VARS= PROGRAM=mecrisp-stellaris-freebsd-with-disassembler-and-math +EXTRAS_VARS_OFF= PROGRAM=mecrisp-stellaris-freebsd + .include # Can't use the release script as it tries to build a bunch of stuff # that won't build correctly. This does the relevant parts manually. do-build: - cd ${WRKSRC}/mecrisp-stellaris-source/freebsd-ra && ${SETENV} ${MAKE_ENV} ${SH} assemble + cd ${WRKSRC}/mecrisp-stellaris-source/freebsd-ra && ${SETENV} ${MAKE_ENV} ${SH} -v assemble ${CP} ${WRKSRC}/mecrisp-stellaris-source/freebsd-ra/mecrisp-stellaris-freebsd ${WRKSRC}/freebsd-ra/ - cd ${WRKSRC}/freebsd-ra && ${SETENV} ${MAKE_ENV} ${SH} buildcore-freebsd + cd ${WRKSRC}/freebsd-ra && ${SETENV} ${MAKE_ENV} ${SH} -v buildcore-freebsd do-install: ${MKDIR} ${STAGEDIR}${DOCSDIR}