kopia lustrzana https://github.com/pimoroni/pimoroni-pico
Append CMAKE_MODULE_PATHs to simplify micropython.cmake, drop .mk files
This change appends the list dir and project root dir to CMAKE_MODULE_PATH so that it doesn't need prepended to each "include" directive. All .mk files have been deleted, since these are completely redundant.pull/157/head
rodzic
c393286133
commit
225d5e024f
|
@ -1,13 +0,0 @@
|
|||
set(MOD_NAME breakout_as7262)
|
||||
BREAKOUT_MOD_DIR := $(USERMOD_DIR)
|
||||
|
||||
# Add our source files to the respective variables.
|
||||
SRC_USERMOD += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.c
|
||||
SRC_USERMOD_CXX += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.cpp
|
||||
|
||||
# Add our module directory to the include path.
|
||||
CFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
CXXFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
|
||||
# We use C++ features so have to link against the standard library.
|
||||
LDFLAGS_USERMOD += -lstdc++
|
|
@ -1,13 +0,0 @@
|
|||
set(MOD_NAME breakout_colourlcd160x80)
|
||||
BREAKOUT_MOD_DIR := $(USERMOD_DIR)
|
||||
|
||||
# Add our source files to the respective variables.
|
||||
SRC_USERMOD += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.c
|
||||
SRC_USERMOD_CXX += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.cpp
|
||||
|
||||
# Add our module directory to the include path.
|
||||
CFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
CXXFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
|
||||
# We use C++ features so have to link against the standard library.
|
||||
LDFLAGS_USERMOD += -lstdc++
|
|
@ -1,13 +0,0 @@
|
|||
set(MOD_NAME breakout_colourlcd240x240)
|
||||
BREAKOUT_MOD_DIR := $(USERMOD_DIR)
|
||||
|
||||
# Add our source files to the respective variables.
|
||||
SRC_USERMOD += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.c
|
||||
SRC_USERMOD_CXX += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.cpp
|
||||
|
||||
# Add our module directory to the include path.
|
||||
CFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
CXXFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
|
||||
# We use C++ features so have to link against the standard library.
|
||||
LDFLAGS_USERMOD += -lstdc++
|
|
@ -1,13 +0,0 @@
|
|||
set(MOD_NAME breakout_dotmatrix)
|
||||
BREAKOUT_MOD_DIR := $(USERMOD_DIR)
|
||||
|
||||
# Add our source files to the respective variables.
|
||||
SRC_USERMOD += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.c
|
||||
SRC_USERMOD_CXX += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.cpp
|
||||
|
||||
# Add our module directory to the include path.
|
||||
CFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
CXXFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
|
||||
# We use C++ features so have to link against the standard library.
|
||||
LDFLAGS_USERMOD += -lstdc++
|
|
@ -1,13 +0,0 @@
|
|||
set(MOD_NAME breakout_encoder)
|
||||
BREAKOUT_MOD_DIR := $(USERMOD_DIR)
|
||||
|
||||
# Add our source files to the respective variables.
|
||||
SRC_USERMOD += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.c
|
||||
SRC_USERMOD_CXX += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.cpp
|
||||
|
||||
# Add our module directory to the include path.
|
||||
CFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
CXXFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
|
||||
# We use C++ features so have to link against the standard library.
|
||||
LDFLAGS_USERMOD += -lstdc++
|
|
@ -1,13 +0,0 @@
|
|||
set(MOD_NAME breakout_ioexpander)
|
||||
BREAKOUT_MOD_DIR := $(USERMOD_DIR)
|
||||
|
||||
# Add our source files to the respective variables.
|
||||
SRC_USERMOD += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.c
|
||||
SRC_USERMOD_CXX += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.cpp
|
||||
|
||||
# Add our module directory to the include path.
|
||||
CFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
CXXFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
|
||||
# We use C++ features so have to link against the standard library.
|
||||
LDFLAGS_USERMOD += -lstdc++
|
|
@ -1,13 +0,0 @@
|
|||
set(MOD_NAME breakout_ltr559)
|
||||
BREAKOUT_MOD_DIR := $(USERMOD_DIR)
|
||||
|
||||
# Add our source files to the respective variables.
|
||||
SRC_USERMOD += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.c
|
||||
SRC_USERMOD_CXX += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.cpp
|
||||
|
||||
# Add our module directory to the include path.
|
||||
CFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
CXXFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
|
||||
# We use C++ features so have to link against the standard library.
|
||||
LDFLAGS_USERMOD += -lstdc++
|
|
@ -1,13 +0,0 @@
|
|||
set(MOD_NAME breakout_matrix11x7)
|
||||
PICOSCROLL_MOD_DIR := $(USERMOD_DIR)
|
||||
|
||||
# Add our source files to the respective variables.
|
||||
SRC_USERMOD += $(PICOSCROLL_MOD_DIR)/${MOD_NAME}.c
|
||||
SRC_USERMOD_CXX += $(PICOSCROLL_MOD_DIR)/${MOD_NAME}.cpp
|
||||
|
||||
# Add our module directory to the include path.
|
||||
CFLAGS_USERMOD += -I$(PICOSCROLL_MOD_DIR)
|
||||
CXXFLAGS_USERMOD += -I$(PICOSCROLL_MOD_DIR)
|
||||
|
||||
# We use C++ features so have to link against the standard library.
|
||||
LDFLAGS_USERMOD += -lstdc++
|
|
@ -1,13 +0,0 @@
|
|||
set(MOD_NAME breakout_mics6814)
|
||||
BREAKOUT_MOD_DIR := $(USERMOD_DIR)
|
||||
|
||||
# Add our source files to the respective variables.
|
||||
SRC_USERMOD += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.c
|
||||
SRC_USERMOD_CXX += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.cpp
|
||||
|
||||
# Add our module directory to the include path.
|
||||
CFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
CXXFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
|
||||
# We use C++ features so have to link against the standard library.
|
||||
LDFLAGS_USERMOD += -lstdc++
|
|
@ -1,13 +0,0 @@
|
|||
set(MOD_NAME breakout_msa301)
|
||||
BREAKOUT_MOD_DIR := $(USERMOD_DIR)
|
||||
|
||||
# Add our source files to the respective variables.
|
||||
SRC_USERMOD += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.c
|
||||
SRC_USERMOD_CXX += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.cpp
|
||||
|
||||
# Add our module directory to the include path.
|
||||
CFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
CXXFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
|
||||
# We use C++ features so have to link against the standard library.
|
||||
LDFLAGS_USERMOD += -lstdc++
|
|
@ -1,13 +0,0 @@
|
|||
set(MOD_NAME breakout_potentiometer)
|
||||
BREAKOUT_MOD_DIR := $(USERMOD_DIR)
|
||||
|
||||
# Add our source files to the respective variables.
|
||||
SRC_USERMOD += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.c
|
||||
SRC_USERMOD_CXX += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.cpp
|
||||
|
||||
# Add our module directory to the include path.
|
||||
CFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
CXXFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
|
||||
# We use C++ features so have to link against the standard library.
|
||||
LDFLAGS_USERMOD += -lstdc++
|
|
@ -1,13 +0,0 @@
|
|||
set(MOD_NAME breakout_rgbmatrix5x5)
|
||||
PICOSCROLL_MOD_DIR := $(USERMOD_DIR)
|
||||
|
||||
# Add our source files to the respective variables.
|
||||
SRC_USERMOD += $(PICOSCROLL_MOD_DIR)/${MOD_NAME}.c
|
||||
SRC_USERMOD_CXX += $(PICOSCROLL_MOD_DIR)/${MOD_NAME}.cpp
|
||||
|
||||
# Add our module directory to the include path.
|
||||
CFLAGS_USERMOD += -I$(PICOSCROLL_MOD_DIR)
|
||||
CXXFLAGS_USERMOD += -I$(PICOSCROLL_MOD_DIR)
|
||||
|
||||
# We use C++ features so have to link against the standard library.
|
||||
LDFLAGS_USERMOD += -lstdc++
|
|
@ -1,13 +0,0 @@
|
|||
set(MOD_NAME breakout_roundlcd)
|
||||
BREAKOUT_MOD_DIR := $(USERMOD_DIR)
|
||||
|
||||
# Add our source files to the respective variables.
|
||||
SRC_USERMOD += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.c
|
||||
SRC_USERMOD_CXX += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.cpp
|
||||
|
||||
# Add our module directory to the include path.
|
||||
CFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
CXXFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
|
||||
# We use C++ features so have to link against the standard library.
|
||||
LDFLAGS_USERMOD += -lstdc++
|
|
@ -1,13 +0,0 @@
|
|||
set(MOD_NAME breakout_rtc)
|
||||
BREAKOUT_MOD_DIR := $(USERMOD_DIR)
|
||||
|
||||
# Add our source files to the respective variables.
|
||||
SRC_USERMOD += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.c
|
||||
SRC_USERMOD_CXX += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.cpp
|
||||
|
||||
# Add our module directory to the include path.
|
||||
CFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
CXXFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
|
||||
# We use C++ features so have to link against the standard library.
|
||||
LDFLAGS_USERMOD += -lstdc++
|
|
@ -1,13 +0,0 @@
|
|||
set(MOD_NAME breakout_sgp30)
|
||||
BREAKOUT_MOD_DIR := $(USERMOD_DIR)
|
||||
|
||||
# Add our source files to the respective variables.
|
||||
SRC_USERMOD += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.c
|
||||
SRC_USERMOD_CXX += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.cpp
|
||||
|
||||
# Add our module directory to the include path.
|
||||
CFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
CXXFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
|
||||
# We use C++ features so have to link against the standard library.
|
||||
LDFLAGS_USERMOD += -lstdc++
|
|
@ -1,13 +0,0 @@
|
|||
set(MOD_NAME breakout_trackball)
|
||||
BREAKOUT_MOD_DIR := $(USERMOD_DIR)
|
||||
|
||||
# Add our source files to the respective variables.
|
||||
SRC_USERMOD += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.c
|
||||
SRC_USERMOD_CXX += $(BREAKOUT_MOD_DIR)/${MOD_NAME}.cpp
|
||||
|
||||
# Add our module directory to the include path.
|
||||
CFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
CXXFLAGS_USERMOD += -I$(BREAKOUT_MOD_DIR)
|
||||
|
||||
# We use C++ features so have to link against the standard library.
|
||||
LDFLAGS_USERMOD += -lstdc++
|
|
@ -1,28 +1,31 @@
|
|||
include_directories(${CMAKE_CURRENT_LIST_DIR}/../../)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/pimoroni_i2c/micropython.cmake)
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../../")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/breakout_dotmatrix/micropython.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/breakout_encoder/micropython.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/breakout_ioexpander/micropython.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/breakout_ltr559/micropython.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/breakout_colourlcd160x80/micropython.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/breakout_as7262/micropython.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/breakout_roundlcd/micropython.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/breakout_rgbmatrix5x5/micropython.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/breakout_matrix11x7/micropython.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/breakout_msa301/micropython.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/breakout_mics6814/micropython.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/breakout_potentiometer/micropython.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/breakout_rtc/micropython.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/breakout_trackball/micropython.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/breakout_sgp30/micropython.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/breakout_colourlcd240x240/micropython.cmake)
|
||||
include(pimoroni_i2c/micropython)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/pico_scroll/micropython.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/pico_rgb_keypad/micropython.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/pico_unicorn/micropython.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/pico_display/micropython.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/pico_explorer/micropython.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/pico_wireless/micropython.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/ulab/code/micropython.cmake)
|
||||
include(breakout_dotmatrix/micropython)
|
||||
include(breakout_encoder/micropython)
|
||||
include(breakout_ioexpander/micropython)
|
||||
include(breakout_ltr559/micropython)
|
||||
include(breakout_colourlcd160x80/micropython)
|
||||
include(breakout_as7262/micropython)
|
||||
include(breakout_roundlcd/micropython)
|
||||
include(breakout_rgbmatrix5x5/micropython)
|
||||
include(breakout_matrix11x7/micropython)
|
||||
include(breakout_msa301/micropython)
|
||||
include(breakout_mics6814/micropython)
|
||||
include(breakout_potentiometer/micropython)
|
||||
include(breakout_rtc/micropython)
|
||||
include(breakout_trackball/micropython)
|
||||
include(breakout_sgp30/micropython)
|
||||
include(breakout_colourlcd240x240/micropython)
|
||||
|
||||
include(pico_scroll/micropython)
|
||||
include(pico_rgb_keypad/micropython)
|
||||
include(pico_unicorn/micropython)
|
||||
include(pico_display/micropython)
|
||||
include(pico_explorer/micropython)
|
||||
include(pico_wireless/micropython)
|
||||
include(ulab/code/micropython)
|
|
@ -1,6 +0,0 @@
|
|||
DISPLAY_MOD_DIR := $(USERMOD_DIR)
|
||||
# Add all C files to SRC_USERMOD.
|
||||
SRC_USERMOD += $(DISPLAY_MOD_DIR)/pico_display.c
|
||||
# # We can add our module folder to include paths if needed
|
||||
# # This is not actually needed in this example.
|
||||
CFLAGS_USERMOD += -I$(DISPLAY_MOD_DIR)
|
|
@ -1,6 +0,0 @@
|
|||
EXPLORER_MOD_DIR := $(USERMOD_DIR)
|
||||
# Add all C files to SRC_USERMOD.
|
||||
SRC_USERMOD += $(EXPLORER_MOD_DIR)/pico_explorer.c
|
||||
# # We can add our module folder to include paths if needed
|
||||
# # This is not actually needed in this example.
|
||||
CFLAGS_USERMOD += -I$(EXPLORER_MOD_DIR)
|
|
@ -1,6 +0,0 @@
|
|||
RGBKEYPAD_MOD_DIR := $(USERMOD_DIR)
|
||||
# Add all C files to SRC_USERMOD.
|
||||
SRC_USERMOD += $(RGBKEYPAD_MOD_DIR)/pico_rgb_keypad.c
|
||||
# # We can add our module folder to include paths if needed
|
||||
# # This is not actually needed in this example.
|
||||
CFLAGS_USERMOD += -I$(RGBKEYPAD_MOD_DIR)
|
|
@ -1,12 +0,0 @@
|
|||
PICOSCROLL_MOD_DIR := $(USERMOD_DIR)
|
||||
|
||||
# Add our source files to the respective variables.
|
||||
SRC_USERMOD += $(PICOSCROLL_MOD_DIR)/pico_scroll.c
|
||||
SRC_USERMOD_CXX += $(PICOSCROLL_MOD_DIR)/pico_scroll.cpp
|
||||
|
||||
# Add our module directory to the include path.
|
||||
CFLAGS_USERMOD += -I$(PICOSCROLL_MOD_DIR)
|
||||
CXXFLAGS_USERMOD += -I$(PICOSCROLL_MOD_DIR)
|
||||
|
||||
# We use C++ features so have to link against the standard library.
|
||||
LDFLAGS_USERMOD += -lstdc++
|
|
@ -1,12 +0,0 @@
|
|||
PICOUNICORN_MOD_DIR := $(USERMOD_DIR)
|
||||
|
||||
# Add our source files to the respective variables.
|
||||
SRC_USERMOD += $(PICOUNICORN_MOD_DIR)/pico_unicorn.c
|
||||
SRC_USERMOD_CXX += $(PICOUNICORN_MOD_DIR)/pico_unicorn.cpp
|
||||
|
||||
# Add our module directory to the include path.
|
||||
CFLAGS_USERMOD += -I$(PICOUNICORN_MOD_DIR)
|
||||
CXXFLAGS_USERMOD += -I$(PICOUNICORN_MOD_DIR)
|
||||
|
||||
# We use C++ features so have to link against the standard library.
|
||||
LDFLAGS_USERMOD += -lstdc++
|
|
@ -1,12 +0,0 @@
|
|||
WIRELESS_MOD_DIR := $(USERMOD_DIR)
|
||||
|
||||
# Add our source files to the respective variables.
|
||||
SRC_USERMOD += $(WIRELESS_MOD_DIR)/esp32spi.c
|
||||
SRC_USERMOD_CXX += $(WIRELESS_MOD_DIR)/esp32spi.cpp
|
||||
|
||||
# Add our module directory to the include path.
|
||||
CFLAGS_USERMOD += -I$(WIRELESS_MOD_DIR)
|
||||
CXXFLAGS_USERMOD += -I$(WIRELESS_MOD_DIR)
|
||||
|
||||
# We use C++ features so have to link against the standard library.
|
||||
LDFLAGS_USERMOD += -lstdc++
|
Ładowanie…
Reference in New Issue