Super Dimension Fortress Macross (1982–1983)...?
From Wikipedia:
Super Dimension Fortress Macross (Japanese: 超時空要塞マクロス, Hepburn: Chōjikū Yōsai Makurosu, lit. "Super Spacetime Fortress Macross") is an anime television series from 1982. According to story creator Shoji Kawamori, it depicts "a love triangle against the backdrop of great battles" during the first Human-alien war. It is the first part of two franchises: The Super Dimension trilogy and Macross series.
Macross (/məˈkrɒs/) features mechanical designs by Kazutaka Miyatake and Shoji Kawamori (both of Studio Nue) and character designs by Haruhiko Mikimoto of Artland. Macross also created one of the first anime idols Lynn Minmay, turning her voice actress Mari Iijima into an instant celebrity, and launching her musical career. Most of its animation (with edited content and revised dialogue) was adapted in the US for the first saga of Robotech.
From IMDB:
An alien spaceship crash lands on Earth and her secrets lead to a desperate war against an alien enemy sent to retrieve the ship.
In the year 1999, a huge alien ship crash lands on a desert island on Earth, and humanity unites under a new global government to restore it to a flightworthy condition over the following decade. After the ship is restored and launched into space, it battles smaller alien vessels, and subsequently transforms into a giant robot-like form, as shown towards the end of episode 5, "Transformation."
Captin Global has ordered the Macross to change to combat mode to fiend off attack waves sent by the Zentradi.