mac-rom-simm-programmer/CMakeLists.txt
Doug Brown 3fd01f77d8 Continue implementing PC build
The PC build now brings up an empty Qt window. It also runs the
programmer firmware in the background in another thread. This also adds
a shell script you can use to create the USB gadget.
2021-07-25 16:21:36 -07:00

40 lines
1012 B
CMake

cmake_minimum_required(VERSION 3.13)
project(SIMMProgrammer)
# Create a list of all source files common to all architectures
set(SOURCES
drivers/mcp23s17.c
drivers/parallel_flash.c
tests/simm_electrical_test.c
main.c
simm_programmer.c
)
# Get hardware-specific source files
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "avr")
include(hal/at90usb646/at90usb646_sources.cmake)
else()
include(hal/pc/pc_sources.cmake)
endif()
# The actual executable, in ELF format
add_executable(SIMMProgrammer.elf ${SOURCES} ${HWSOURCES})
# Common compiler options
target_compile_options(SIMMProgrammer.elf PRIVATE
-Wall -Os -ffunction-sections -fdata-sections
)
set_property(TARGET SIMMProgrammer.elf PROPERTY C_STANDARD 99)
# Common linker options
target_link_options(SIMMProgrammer.elf PRIVATE
-Wl,-Map,SIMMProgrammer.map -Wl,--gc-sections
)
# Get hardware-specific options
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "avr")
include(hal/at90usb646/at90usb646_options.cmake)
else()
include(hal/pc/pc_options.cmake)
endif()