Skip to content

Commit 7568e5f

Browse files
author
nano
committed
updating to fix linux build compat
1 parent 1529880 commit 7568e5f

File tree

10 files changed

+790
-785
lines changed

10 files changed

+790
-785
lines changed

board/package_pawpet_index.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
{
1111
"name": "PawPet SAMD Boards",
1212
"architecture": "samd",
13-
"version": "1.0.4",
13+
"version": "1.0.5",
1414
"deprecated": false,
1515
"category": "NanoCodeBug",
16-
"url": "https://raw.githubusercontent.com/NanoCodeBug/pawpet/main/board/pawpet-1.0.4.zip",
17-
"archiveFileName": "pawpet-1.0.4.zip",
16+
"url": "https://raw.githubusercontent.com/NanoCodeBug/pawpet/main/board/pawpet-1.0.5.zip",
17+
"archiveFileName": "pawpet-1.0.5.zip",
1818
"checksum": "SHA-256:F8EE1905EF56EE5ABFABCC8B6159EF8E2750E2422919F064744CCBE5AA42CC9A",
1919
"size": 626244,
2020
"boards": [

board/pawpet-1.0.5.zip

636 KB
Binary file not shown.

board/pawpet/platform.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -D
9898
## Compile S files
9999
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_SAMD_ADAFRUIT {compiler.S.extra_flags} {build.extra_flags} {build.cache_flags} {compiler.arm.cmsis.c.flags} {includes} "{source_file}" -o "{object_file}"
100100

101+
## Create archives
102+
# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older, IDE 1.6.6 or newer overrides this value
103+
archive_file_path={build.path}/{archive_file}
104+
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
105+
101106
## Combine gc-sections, archives, and objects
102107
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.libraries.ldflags} -Wl,--start-group {compiler.arm.cmsis.ldflags} "-L{build.variant.path}" -lm "{build.path}/{archive_file}" -Wl,--end-group
103108

simulator/CMakeLists.txt

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
1-
cmake_minimum_required(VERSION 3.7)
2-
3-
project(pawpet)
4-
5-
set(PROJECT_ROOT "../")
6-
7-
set(CORE_SRC
8-
${PROJECT_ROOT}/src/global.cpp
9-
${PROJECT_ROOT}/src/states/gamestate.cpp
10-
${PROJECT_ROOT}/src/graphics/graphics.cpp
11-
)
12-
13-
set(CORE_INC
14-
${PROJECT_ROOT}/src/common.h
15-
${PROJECT_ROOT}/src/config.h
16-
${PROJECT_ROOT}/src/global.h
17-
${PROJECT_ROOT}/src/states/gamestate.h
18-
${PROJECT_ROOT}/src/sounds/pitches.h
19-
${PROJECT_ROOT}/src/graphics/display.h
20-
${PROJECT_ROOT}/src/graphics/graphics.h
21-
${PROJECT_ROOT}/src/graphics/sprites.h
22-
)
23-
24-
set(SIM_SRC
25-
${PROJECT_ROOT}/simulator/fork/Adafruit_GFX.cpp
26-
${PROJECT_ROOT}/simulator/fork/glcdfont.c
27-
${PROJECT_ROOT}/simulator/fork/Print.cpp
28-
${PROJECT_ROOT}/simulator/fork/display.cpp
29-
)
30-
31-
add_executable(pawpet main.cpp pawos.cpp pawos.h ${SIM_SRC} ${SIM_INC} ${CORE_SRC} ${CORE_INC})
32-
33-
target_include_directories(pawpet
34-
PRIVATE ${PROJECT_ROOT}/simulator/fork
35-
)
36-
37-
add_compile_definitions(SIMULATOR)
38-
39-
if (CMAKE_CXX_PLATFORM_ID STREQUAL "emscripten")
40-
set(ASSETS_PATH ${CMAKE_CURRENT_BINARY_DIR}\\..\\assets@)
41-
42-
set(USE_FLAGS "-s USE_SDL=2 --preload-file ${ASSETS_PATH}")
43-
44-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${USE_FLAGS}")
45-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${USE_FLAGS}")
46-
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${USE_FLAGS}")
47-
set(CMAKE_EXECUTABLE_SUFFIX .js)
48-
configure_file(${PROJECT_ROOT}/simulator/pawpet.html ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
49-
configure_file(${PROJECT_ROOT}/simulator/case-front-graphic.png ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
50-
51-
else()
52-
find_package(SDL2 REQUIRED)
53-
include_directories(${SDL2_INCLUDE_DIRS})
54-
target_link_libraries(pawpet ${SDL2_LIBRARIES})
55-
target_compile_options(pawpet PRIVATE -W0)
56-
57-
configure_file(${SDL2_DIR}/lib/x64/SDL2.dll ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
58-
endif()
59-
1+
cmake_minimum_required(VERSION 3.7)
2+
3+
project(pawpet)
4+
5+
set(PROJECT_ROOT "../")
6+
7+
set(CORE_SRC
8+
${PROJECT_ROOT}/src/global.cpp
9+
${PROJECT_ROOT}/src/states/gamestate.cpp
10+
${PROJECT_ROOT}/src/graphics/graphics.cpp
11+
)
12+
13+
set(CORE_INC
14+
${PROJECT_ROOT}/src/common.h
15+
${PROJECT_ROOT}/src/config.h
16+
${PROJECT_ROOT}/src/global.h
17+
${PROJECT_ROOT}/src/states/gamestate.h
18+
${PROJECT_ROOT}/src/sounds/pitches.h
19+
${PROJECT_ROOT}/src/graphics/display.h
20+
${PROJECT_ROOT}/src/graphics/graphics.h
21+
${PROJECT_ROOT}/src/graphics/sprites.h
22+
)
23+
24+
set(SIM_SRC
25+
${PROJECT_ROOT}/simulator/fork/Adafruit_GFX.cpp
26+
${PROJECT_ROOT}/simulator/fork/glcdfont.c
27+
${PROJECT_ROOT}/simulator/fork/Print.cpp
28+
${PROJECT_ROOT}/simulator/fork/display.cpp
29+
)
30+
31+
add_executable(pawpet main.cpp pawos.cpp pawos.h ${SIM_SRC} ${SIM_INC} ${CORE_SRC} ${CORE_INC})
32+
33+
target_include_directories(pawpet
34+
PRIVATE ${PROJECT_ROOT}/simulator/fork
35+
)
36+
37+
add_compile_definitions(SIMULATOR)
38+
39+
if (CMAKE_CXX_PLATFORM_ID STREQUAL "emscripten")
40+
set(ASSETS_PATH ${CMAKE_CURRENT_BINARY_DIR}\\..\\assets@)
41+
42+
set(USE_FLAGS "-s USE_SDL=2 --preload-file ${ASSETS_PATH}")
43+
44+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${USE_FLAGS}")
45+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${USE_FLAGS}")
46+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${USE_FLAGS}")
47+
set(CMAKE_EXECUTABLE_SUFFIX .js)
48+
configure_file(${PROJECT_ROOT}/simulator/pawpet.html ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
49+
configure_file(${PROJECT_ROOT}/simulator/case-front-graphic.png ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
50+
51+
else()
52+
find_package(SDL2 REQUIRED)
53+
include_directories(${SDL2_INCLUDE_DIRS})
54+
target_link_libraries(pawpet ${SDL2_LIBRARIES})
55+
target_compile_options(pawpet PRIVATE -W0)
56+
57+
configure_file(${SDL2_DIR}/lib/x64/SDL2.dll ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
58+
endif()
59+

0 commit comments

Comments
 (0)