-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
109 changed files
with
20,372 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Object files and libraries | ||
*.o | ||
*.a | ||
*.lib | ||
|
||
# Shared objects (inc. Windows DLLs) | ||
*.dll | ||
*.so | ||
*.so.* | ||
*.dylib | ||
|
||
# Windows executables | ||
*.exe | ||
|
||
# generated by autogen.sh | ||
.deps | ||
Makefile.in | ||
/aclocal.m4 | ||
/ar-lib | ||
/autom4te.cache | ||
/compile | ||
/config.guess | ||
/config.h.in | ||
/config.sub | ||
/configure | ||
/depcomp | ||
/install-sh | ||
/ltmain.sh | ||
/m4 | ||
/missing | ||
/test-driver | ||
|
||
# generated by configure | ||
Makefile | ||
/adflib.pc | ||
/config.h | ||
/config.log | ||
/config.status | ||
/libtool | ||
/stamp-h1 | ||
|
||
# generated by automake builds | ||
.dirstamp | ||
.libs | ||
*.la | ||
*.lo | ||
|
||
# generated by make distcheck | ||
/adflib-*.*.* | ||
|
||
# generated by util/cmake_* scripts | ||
/build | ||
|
||
# generated by cmake . (in-tree build) | ||
CMakeFiles | ||
CTestTestfile.cmake | ||
cmake_install.cmake | ||
/CMakeCache.txt | ||
/Testing | ||
/src/config.h | ||
|
||
# temp / backup files | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
The main developper is | ||
Laurent Clévy | ||
|
||
|
||
Current maintainer (Feb 2023-): | ||
Tomasz Wolak | ||
|
||
|
||
Contributors are: | ||
|
||
Bjarne Viksoe | ||
- C++ wrapper (adfwrapper.h) | ||
- lot of bug fixes | ||
|
||
Gary Harris | ||
- W32 support | ||
- WinNT native driver | ||
- bug fixes | ||
|
||
Dan Sutherland | ||
- W32 support | ||
- WinNT native driver | ||
- bug fixes | ||
|
||
Stuart Caie | ||
- utilities: unadf | ||
- autotools conf. | ||
- improvements and bug fixes | ||
|
||
Tomasz Wolak (github.com/t-w) | ||
- file write support (and improvements in read support) | ||
- hard- and softlinks support | ||
- linux native device | ||
- utilities: adf_floppy_create/format, adf_show_metadata | ||
- improvements and bug fixes | ||
- unit tests (ie. for file read/write support) | ||
- CMake conf. with support for Linux, Windows (Visual Studio and CygWin) and MacOs | ||
|
||
|
||
(See git log for detailed contributions). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
|
||
cmake_minimum_required ( VERSION 3.11 ) | ||
|
||
# version details - use utils/bump-version to update it | ||
set ( ADFLIB_VERSION 0.8.0 ) | ||
set ( ADFLIB_DATE 2023-06-26 ) | ||
|
||
project ( adflib | ||
VERSION ${ADFLIB_VERSION} | ||
DESCRIPTION "A free, portable and open implementation of the Amiga filesystem" | ||
HOMEPAGE_URL "https://gitlab.com/lclevy/ADFlib" | ||
LANGUAGES C | ||
) | ||
|
||
message ( STATUS "Building version: ${PROJECT_VERSION}, ${ADFLIB_DATE}" ) | ||
|
||
set ( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ) | ||
|
||
# setting NDEBUG | ||
# ( https://lists.debian.org/debian-mentors/2018/04/msg00244.html ) | ||
#set ( CMAKE_BUILD_TYPE Release ) | ||
|
||
message ( STATUS "Compiler ID: ${CMAKE_C_COMPILER_ID}" ) | ||
|
||
add_compile_options ( | ||
-Wall | ||
$<$<CONFIG:RELEASE>:-O3> | ||
# -DADFLIB_VERSION="${ADFLIB_VERSION}" | ||
# -DADFLIB_DATE="${ADFLIB_DATE}" | ||
) | ||
|
||
if ( NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" ) | ||
message ( STATUS "Setting additional compiler options/checks (mainly for gcc and clang)" ) | ||
add_compile_options ( | ||
-Wextra | ||
-Wconversion | ||
-Werror-implicit-function-declaration | ||
-Werror=format-security | ||
-Wno-unused-parameter | ||
-Wno-enum-int-mismatch | ||
-Wno-sign-conversion | ||
# -pedantic-errors | ||
# $<$<CONFIG:DEBUG>:-g3> | ||
# $<$<CONFIG:DEBUG>:-Og> | ||
$<$<CONFIG:DEBUG>:-ggdb> | ||
# $<$<CONFIG:DEBUG>:-pg> | ||
) | ||
endif() | ||
|
||
|
||
option ( ADFLIB_ENABLE_ADDRESS_SANITIZER "Enable address sanitizer" OFF ) | ||
|
||
if ( ADFLIB_ENABLE_ADDRESS_SANITIZER ) | ||
|
||
if ( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" AND NOT MINGW AND NOT CYGWIN ) | ||
message ( STATUS "Enabling GNU address sanitizer" ) | ||
add_compile_options ( -fsanitize=address ) | ||
add_link_options ( | ||
-fsanitize=address | ||
# for library need either this or LD_PRELOAD (-lasan does not work ) | ||
-static-libasan | ||
) | ||
endif() | ||
|
||
if ( MINGW OR CYGWIN ) | ||
message ( STATUS "No address sanitizer for CygWin or MinGW (not available)") | ||
endif() | ||
|
||
if ( "${CMAKE_C_COMPILER_ID}" MATCHES ".*Clang" ) | ||
message ( STATUS "Enabling Clang address sanitizer" ) | ||
# https://releases.llvm.org/10.0.0/tools/clang/docs/AddressSanitizer.html | ||
add_compile_options ( -fsanitize=address ) | ||
add_link_options ( -fsanitize=address ) | ||
endif() | ||
|
||
if ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" ) | ||
# https://learn.microsoft.com/en-us/cpp/sanitizers/asan?view=msvc-170 | ||
message ( STATUS "Enabling MSVC address sanitizer" ) | ||
add_compile_options ( /fsanitize=address /Zi ) | ||
add_link_options ( /fsanitize=address /Zi) | ||
endif() | ||
|
||
else() | ||
message ( STATUS "Address sanitizer disabled - not configuring" ) | ||
endif() | ||
|
||
|
||
option ( ADFLIB_BUILD_DLL "Build Windows DLL" OFF ) | ||
if ( ADFLIB_BUILD_DLL ) | ||
#if(BUILD_SHARED_LIBS) | ||
message ( STATUS "Building a Windows DLL" ) | ||
add_definitions ( -DBUILD_DLL ) | ||
endif ( ADFLIB_BUILD_DLL ) | ||
|
||
include ( CheckFunctionExists ) | ||
check_function_exists ( backtrace HAVE_BACKTRACE ) | ||
check_function_exists ( backtrace_symbols HAVE_BACKTRACE_SYMBOLS ) | ||
#include(CheckCXXSymbolExists) | ||
#check_cxx_symbol_exists(backtrace features HAVE_BACKTRACE) | ||
#check_cxx_symbol_exists(backtrace_symbols features HAVE_BACKTRACE_SYMBOLS) | ||
#message ( STATUS "HAVE_BACKTRACE: ${HAVE_BACKTRACE}" ) | ||
#message ( STATUS "HAVE_BACKTRACE_SYMBOLS: ${HAVE_BACKTRACE_SYMBOLS}" ) | ||
if ( ${HAVE_BACKTRACE} ) | ||
message ( STATUS "backtrace_symbols() available") | ||
add_link_options ( $<$<CONFIG:DEBUG>:-rdynamic> ) # for backtrace_symbols() | ||
endif() | ||
|
||
option ( ADFLIB_ENABLE_NATIVE_DEV "Enable real native devices" OFF ) | ||
|
||
add_subdirectory ( src ) | ||
|
||
option ( ADFLIB_ENABLE_TESTS "Enable tests" OFF ) | ||
option ( ADFLIB_ENABLE_UNIT_TESTS "Enable units tests (require Check framework >= 0.11" OFF ) | ||
|
||
if ( ADFLIB_ENABLE_TESTS ) | ||
message ( STATUS "Testing enabled" ) | ||
enable_testing() | ||
add_subdirectory ( regtests/Test ) | ||
if ( ADFLIB_ENABLE_UNIT_TESTS AND | ||
NOT ( UNIX AND MINGW ) ) # cannot build tests (ie. Check) cross-compiling | ||
message ( STATUS "Unit tests (in tests/) enabled." ) | ||
add_subdirectory ( tests ) | ||
else() | ||
message ( STATUS "Unit tests (in tests/) disabled." ) | ||
endif() | ||
else() | ||
message ( STATUS "Testing disabled" ) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "x64-Debug-Static", | ||
"generator": "Ninja", | ||
"configurationType": "DEBUG", | ||
"inheritEnvironments": [ "msvc_x64_x64" ], | ||
"buildRoot": "${projectDir}\\out\\build\\${name}", | ||
"installRoot": "${projectDir}\\out\\install\\${name}", | ||
"cmakeCommandArgs": "", | ||
"buildCommandArgs": "", | ||
"ctestCommandArgs": "" | ||
}, | ||
{ | ||
"name": "x64-Debug-Shared", | ||
"generator": "Ninja", | ||
"configurationType": "DEBUG", | ||
"buildRoot": "${projectDir}\\out\\build\\${name}", | ||
"installRoot": "${projectDir}\\out\\install\\${name}", | ||
"cmakeCommandArgs": "-DBUILD_SHARED_LIBS:BOOL=ON -DADFLIB_BUILD_DLL=ON", | ||
"buildCommandArgs": "", | ||
"ctestCommandArgs": "", | ||
"inheritEnvironments": [ "msvc_x64_x64" ] | ||
}, | ||
{ | ||
"name": "x64-Release-Static", | ||
"generator": "Ninja", | ||
"configurationType": "Release", | ||
"buildRoot": "${projectDir}\\out\\build\\${name}", | ||
"installRoot": "${projectDir}\\out\\install\\${name}", | ||
"cmakeCommandArgs": "", | ||
"buildCommandArgs": "", | ||
"ctestCommandArgs": "", | ||
"inheritEnvironments": [ "msvc_x64_x64" ], | ||
"variables": [] | ||
}, | ||
{ | ||
"name": "x64-Release-Shared", | ||
"generator": "Ninja", | ||
"configurationType": "Release", | ||
"buildRoot": "${projectDir}\\out\\build\\${name}", | ||
"installRoot": "${projectDir}\\out\\install\\${name}", | ||
"cmakeCommandArgs": "-DBUILD_SHARED_LIBS:BOOL=ON -DADFLIB_BUILD_DLL=ON", | ||
"buildCommandArgs": "", | ||
"ctestCommandArgs": "", | ||
"inheritEnvironments": [ "msvc_x64_x64" ], | ||
"variables": [] | ||
} | ||
] | ||
} |
Oops, something went wrong.