How to get qmake to support assembly language?
-
I'm trying to get qmake to support building some asm files. So far, no luck.
My code looks like this:
ASM_FILES += myfile.asm ASMEXTRAFLAGS = -march=armv8-a QMAKE_EXTRA_COMPILERS += as as.commands = as $$ASMEXTRAFLAGS -o ${QMAKE_FILE_BASE}.o ${QMAKE_FILE_NAME} as.output = ${QMAKE_FILE_BASE}.o as.input = $ASM_FILES OTHER_FILES += $$ASM_SOURCES QMAKE_EXTRA_TARGETS += myfile.o
The "as" command is never run to generate myfile.o.
Is there something I'm missing?
Thanks. -
Hi,
I would recommend starting by following the new_moc example from the documentation more closely.
Also, I would not use the exact same name for the compiler declaration as the command name.
-
I'm trying to get qmake to support building some asm files. So far, no luck.
My code looks like this:
ASM_FILES += myfile.asm ASMEXTRAFLAGS = -march=armv8-a QMAKE_EXTRA_COMPILERS += as as.commands = as $$ASMEXTRAFLAGS -o ${QMAKE_FILE_BASE}.o ${QMAKE_FILE_NAME} as.output = ${QMAKE_FILE_BASE}.o as.input = $ASM_FILES OTHER_FILES += $$ASM_SOURCES QMAKE_EXTRA_TARGETS += myfile.o
The "as" command is never run to generate myfile.o.
Is there something I'm missing?
Thanks.@Publicnamer:
i am not sure but i think you must write this line after you filled theas
variableQMAKE_EXTRA_COMPILERS += as
i think qmake isn't using references of variables
-
OK thanks, here's what I found works:
ASM_FILES += myfile.asm ASMEXTRAFLAGS = -march=armv8-a QMAKE_EXTRA_TARGETS += myfile.o asm.output = ${QMAKE_FILE_BASE}.o asm.commands = as $$ASMEXTRAFLAGS -o ${QMAKE_FILE_BASE}.o ${QMAKE_FILE_NAME} asm.input = ASM_FILES QMAKE_EXTRA_COMPILERS += asm