Skip to content

Commit

Permalink
Merge pull request #959 from UncleGrumpy/rename_version.h
Browse files Browse the repository at this point in the history
Rename version.h to avm_version.h

In order to allow building Zepher OS ports the `version.h` file needs to be
renamed to avoid a collision with the `version.h` header file that part of the
zepher core libraries included in all zephyr builds.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
  • Loading branch information
bettio committed Nov 25, 2023
2 parents e114d31 + 9c84f05 commit b5dcc8c
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/libAtomVM/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ set(HEADER_FILES
trace.h
utils.h
valueshashtable.h
${CMAKE_CURRENT_BINARY_DIR}/version.h
${CMAKE_CURRENT_BINARY_DIR}/avm_version.h
)

set(SOURCE_FILES
Expand Down Expand Up @@ -226,10 +226,10 @@ else()
set(ATOMVM_VERSION ${ATOMVM_BASE_VERSION})
endif()

# Add include to directory where version.h is generated so targets linking
# Add include to directory where avm_version.h is generated so targets linking
# libAtomVM can access it
target_include_directories(libAtomVM PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/avm_version.h)

if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Generic")
target_link_libraries(libAtomVM PUBLIC libAtomVM${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
Expand Down
2 changes: 1 addition & 1 deletion src/libAtomVM/nifs.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <time.h>

#include "atomshashtable.h"
#include "avm_version.h"
#include "avmpack.h"
#include "bif.h"
#include "context.h"
Expand All @@ -51,7 +52,6 @@
#include "sys.h"
#include "term.h"
#include "utils.h"
#include "version.h"

#define MAX_NIF_NAME_LEN 260
#define FLOAT_BUF_SIZE 64
Expand Down
2 changes: 1 addition & 1 deletion src/platforms/emscripten/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
#include <stdio.h>
#include <unistd.h>

#include <avm_version.h>
#include <avmpack.h>
#include <context.h>
#include <defaultatoms.h>
#include <globalcontext.h>
#include <iff.h>
#include <module.h>
#include <sys.h>
#include <version.h>

#include <emscripten.h>
#include <emscripten/promise.h>
Expand Down
2 changes: 1 addition & 1 deletion src/platforms/esp32/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <stdbool.h>

#include <atom.h>
#include <avm_version.h>
#include <avmpack.h>
#include <bif.h>
#include <context.h>
Expand All @@ -35,7 +36,6 @@
#include <module.h>
#include <term.h>
#include <utils.h>
#include <version.h>

#include "esp32_sys.h"

Expand Down
2 changes: 1 addition & 1 deletion src/platforms/generic_unix/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <unistd.h>

#include "atom.h"
#include "avm_version.h"
#include "avmpack.h"
#include "bif.h"
#include "context.h"
Expand All @@ -38,7 +39,6 @@
#include "sys.h"
#include "term.h"
#include "utils.h"
#include "version.h"

void print_help(const char *program_name)
{
Expand Down
2 changes: 1 addition & 1 deletion src/platforms/rp2040/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@

#pragma GCC diagnostic pop

#include <avm_version.h>
#include <avmpack.h>
#include <context.h>
#include <defaultatoms.h>
#include <globalcontext.h>
#include <iff.h>
#include <module.h>
#include <version.h>

#include "rp2040_sys.h"

Expand Down
2 changes: 1 addition & 1 deletion src/platforms/stm32/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/usart.h>

#include <avm_version.h>
#include <avmpack.h>
#include <context.h>
#include <defaultatoms.h>
#include <globalcontext.h>
#include <module.h>
#include <utils.h>
#include <version.h>

#include "lib/avm_devcfg.h"
#include "lib/avm_log.h"
Expand Down

0 comments on commit b5dcc8c

Please sign in to comment.