-
Notifications
You must be signed in to change notification settings - Fork 12
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
17 changed files
with
2,203 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "Win32", | ||
"includePath": [ | ||
"${workspaceFolder}/**" | ||
], | ||
"defines": [ | ||
"_DEBUG", | ||
"UNICODE", | ||
"_UNICODE" | ||
], | ||
"compilerPath": "C:\\Toolchains\\mingw32\bin\\gcc.exe", | ||
"cStandard": "c11", | ||
"cppStandard": "c++17", | ||
"intelliSenseMode": "gcc-x64" | ||
} | ||
], | ||
"version": 4 | ||
} |
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,49 @@ | ||
cmake_minimum_required(VERSION 3.13.0) | ||
project(udslin) | ||
|
||
# Specify build paths | ||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | ||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) | ||
|
||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) | ||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
|
||
option(COLOR_OUTPUT "Use color ouput in terminal" ON) | ||
|
||
if(COLOR_OUTPUT) | ||
add_definitions(-DCOLOR_OUTPUT=1) | ||
endif(COLOR_OUTPUT) | ||
|
||
# Add a _d to debug binaries | ||
set(CMAKE_DEBUG_POSTFIX "_d") | ||
|
||
set(SRC_FILES | ||
src/LinDrv.cpp | ||
src/LinTp.cpp | ||
src/LUDS.cpp | ||
) | ||
|
||
set(HEADER_FILES | ||
src/RingBuffer.h | ||
src/LinDrv.h | ||
src/LinTp.h | ||
src/LUDS.h | ||
) | ||
|
||
if(MSVC) | ||
set(SRC_FILES ${SRC_FILES} UDSLIN.def) | ||
endif() | ||
|
||
if(MINGW) | ||
set(CMAKE_CXX_FLAGS "-std=c++11") | ||
add_definitions(-DUSE_UDSLIN_EXPORTS) | ||
endif() | ||
|
||
add_library(${PROJECT_NAME} SHARED | ||
${SRC_FILES} | ||
${HEADER_FILES} | ||
resources/winres.rc | ||
) | ||
|
||
target_link_libraries(${PROJECT_NAME} Winmm) |
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,9 @@ | ||
@echo off | ||
cd %~dp0 | ||
|
||
set OUT_DIR="./VS2017_Prj" | ||
if not exist %OUT_DIR% ( | ||
md %OUT_DIR% | ||
) | ||
cd %OUT_DIR% | ||
cmake ..\..\.. -G"Visual Studio 15 2017" |
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,7 @@ | ||
@echo off | ||
cd %~dp0 | ||
|
||
::set PATH=C:\MinGW\i686-8.1.0-release-posix-dwarf-rt_v6-rev0\mingw32\bin | ||
|
||
cd .\Debug | ||
mingw32-make |
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,7 @@ | ||
@echo off | ||
cd %~dp0 | ||
|
||
::set PATH=C:\MinGW\i686-8.1.0-release-posix-dwarf-rt_v6-rev0\mingw32\bin | ||
|
||
cd .\Release | ||
mingw32-make |
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,11 @@ | ||
@echo off | ||
cd %~dp0 | ||
|
||
::set PATH=C:\Program Files\CMake\bin;C:\MinGW\i686-8.1.0-release-posix-dwarf-rt_v6-rev0\mingw32\bin | ||
|
||
set OUT_DIR=".\Debug" | ||
if not exist %OUT_DIR% ( | ||
md %OUT_DIR% | ||
) | ||
cd %OUT_DIR% | ||
cmake ..\..\.. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug |
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,11 @@ | ||
@echo off | ||
cd %~dp0 | ||
|
||
::set PATH=C:\Program Files\CMake\bin;C:\MinGW\i686-8.1.0-release-posix-dwarf-rt_v6-rev0\mingw32\bin | ||
|
||
set OUT_DIR=.\Release | ||
if not exist %OUT_DIR% ( | ||
md %OUT_DIR% | ||
) | ||
cd %OUT_DIR% | ||
cmake ..\..\.. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release |
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,44 @@ | ||
#include <windows.h> | ||
|
||
#define VER_FILEVERSION 0,3,1,0 | ||
#define VER_FILEVERSION_STR "0.3.1.0\0" | ||
|
||
#define VER_PRODUCTVERSION 0,3,1,0 | ||
#define VER_PRODUCTVERSION_STR "0.3.1.0\0" | ||
|
||
#define VER_COMPANYNAME_STR "Shawn Xiao\0" | ||
#define VER_FILEDESCRIPTION_STR "UDS protocol stack on LIN\0" | ||
#define VER_INTERNALNAME_STR "libudslin\0" | ||
#define VER_LEGALCOPYRIGHT_STR "Copyright (C) 2020 Shawn Xiao, [email protected].\0" | ||
#define VER_ORIGINALFILENAME_STR "libudslin\0" | ||
#define VER_PRODUCTNAME_STR "libudslin\0" | ||
|
||
VS_VERSION_INFO VERSIONINFO | ||
FILEVERSION VER_FILEVERSION | ||
PRODUCTVERSION VER_PRODUCTVERSION | ||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK | ||
FILEFLAGS 0 | ||
FILEOS VOS__WINDOWS32 | ||
FILETYPE VFT_DLL | ||
FILESUBTYPE VFT2_UNKNOWN | ||
BEGIN | ||
BLOCK "StringFileInfo" | ||
BEGIN | ||
BLOCK "040904B0" | ||
BEGIN | ||
VALUE "CompanyName", VER_COMPANYNAME_STR | ||
VALUE "FileDescription", VER_FILEDESCRIPTION_STR | ||
VALUE "FileVersion", VER_FILEVERSION_STR | ||
VALUE "InternalName", VER_INTERNALNAME_STR | ||
VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR | ||
VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR | ||
VALUE "ProductName", VER_PRODUCTNAME_STR | ||
VALUE "ProductVersion", VER_PRODUCTVERSION_STR | ||
END | ||
END | ||
|
||
BLOCK "VarFileInfo" | ||
BEGIN | ||
VALUE "Translation", 0x0409, 1200 | ||
END | ||
END |
Oops, something went wrong.