set(LLVM_TARGET_DEFINITIONS AVR.td)

tablegen(LLVM AVRGenAsmMatcher.inc -gen-asm-matcher)
tablegen(LLVM AVRGenRegisterInfo.inc -gen-register-info)
tablegen(LLVM AVRGenInstrInfo.inc -gen-instr-info)
tablegen(LLVM AVRGenCallingConv.inc -gen-callingconv)
tablegen(LLVM AVRGenSubtargetInfo.inc -gen-subtarget)
add_public_tablegen_target(AVRCommonTableGen)

add_llvm_target(AVRCodeGen
  AVRAsmPrinter.cpp
  AVRFrameLowering.cpp
  AVRInstrInfo.cpp
  AVRMCInstLower.cpp
  AVRRegisterInfo.cpp
  AVRSubtarget.cpp
  AVRTargetMachine.cpp
  AVRTargetObjectFile.cpp
)

add_dependencies(LLVMAVRCodeGen intrinsics_gen)

add_subdirectory(AsmParser)
add_subdirectory(InstPrinter)
add_subdirectory(MCTargetDesc)
add_subdirectory(TargetInfo)


set(LLVM_TARGET_DEFINITIONS AVR.td)

tablegen(LLVM AVRGenAsmMatcher.inc -gen-asm-matcher)
tablegen(LLVM AVRGenAsmWriter.inc -gen-asm-writer)
tablegen(LLVM AVRGenCallingConv.inc -gen-callingconv)
tablegen(LLVM AVRGenInstrInfo.inc -gen-instr-info)
tablegen(LLVM AVRGenRegisterInfo.inc -gen-register-info)
tablegen(LLVM AVRGenSubtargetInfo.inc -gen-subtarget)
add_public_tablegen_target(AVRCommonTableGen)

add_llvm_target(AVRCodeGen
  AVRAsmPrinter.cpp
  AVRFrameLowering.cpp
  AVRInstrInfo.cpp
  AVRMCInstLower.cpp
  AVRRegisterInfo.cpp
  AVRSubtarget.cpp
  AVRTargetMachine.cpp
  AVRTargetObjectFile.cpp
)

add_dependencies(LLVMAVRCodeGen intrinsics_gen)

add_subdirectory(AsmParser)
add_subdirectory(InstPrinter)
add_subdirectory(MCTargetDesc)
add_subdirectory(TargetInfo)


Enable generation of the TableGen assembly writer tables
[AVR] Enable generation of the TableGen assembly writer tables

This also changes the order of the statements in CMakeLists.txt to be
alphabetical.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@283711 91177308-0d34-0410-b5e6-96231b3b80d8
