2010-05-19 15:24:15 +02:00
|
|
|
CPPFLAGS+= -wo
|
|
|
|
|
2010-03-03 15:27:30 +01:00
|
|
|
.SUFFIXES: .o .e .S
|
2010-02-16 15:41:33 +01:00
|
|
|
|
|
|
|
# Treated like a C file
|
|
|
|
.e.o:
|
|
|
|
${_MKTARGET_COMPILE}
|
|
|
|
${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
|
|
|
|
# .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
|
|
|
|
# ${OBJCOPY} -x ${.TARGET}
|
|
|
|
# .endif
|
|
|
|
|
2010-03-03 15:27:30 +01:00
|
|
|
ASMCONV=gas2ack
|
2010-09-13 15:36:29 +02:00
|
|
|
AFLAGS+=-D__ASSEMBLY__ -w -wo
|
2011-08-05 13:59:44 +02:00
|
|
|
CPP.s=${CC} -E ${AFLAGS} ${CPPFLAGS}
|
2010-03-03 15:27:30 +01:00
|
|
|
ASMCONVFLAGS+=-mi386
|
|
|
|
|
|
|
|
# Need to convert ACK assembly files to GNU assembly before building
|
|
|
|
.S.o:
|
|
|
|
${_MKTARGET_COMPILE}
|
|
|
|
${CPP.s} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.PREFIX}.gnu.s
|
|
|
|
${ASMCONV} ${ASMCONVFLAGS} ${.PREFIX}.gnu.s ${.PREFIX}.ack.s
|
|
|
|
${COMPILE.s} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.PREFIX}.ack.s -o ${.TARGET}
|
|
|
|
rm -rf ${.PREFIX}.ack.s ${.PREFIX}.gnu.s
|