enable_language(CXX ASM)

add_library(
	TeaGBA
		cstartup.cpp
		gfx.cpp
)

if(TURBINE_BUILD_TYPE STREQUAL "GBA")
	set_source_files_properties(gfx.cpp PROPERTIES COMPILE_FLAGS -marm)
	target_sources(
		TeaGBA PRIVATE
			bios.s
			gba_crt0.s
	)
else()
	target_sources(
		TeaGBA PRIVATE
			bios_stub.cpp
	)
endif()

target_include_directories(
	TeaGBA PUBLIC
		../include
)

target_link_libraries(
	TeaGBA PUBLIC
		OxStd
)

install(
	TARGETS
		TeaGBA
	DESTINATION
		LIBRARY DESTINATION lib
		ARCHIVE DESTINATION lib
)
