Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
GANILAnalysis
MFMlib
Commits
077a5146
Commit
077a5146
authored
Jul 13, 2021
by
LEGEARD Luc
☢
Browse files
add simpler debug mode in sources/CMakeLists.txt
parent
fdee31a3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
23 deletions
+32
-23
README.txt
README.txt
+18
-19
sources/CMakeLists.txt
sources/CMakeLists.txt
+11
-3
sources/addaframe.txt
sources/addaframe.txt
+3
-1
No files found.
README.txt
View file @
077a5146
Author : Luc Legeard
Information
-----------
This package MFMlib is a complete C++ library to decode or encode MFM frame.
It generates a libMFM.a which can be linked to your own code
A usefull executable "MFMtest.exe" can test you MFM run files or generate MFM frames in a file with random data
Do a MFMtest.exe -h for more information
Build and Installation
-------------------------------------------------------------------------------------------------
Build and Installation (options are in brackets)
-----------------------
cd build ( if build isn't created , make it! (in this case, beside source directory))
cmake -DCMAKE_INSTALL_PREFIX=../ ../sources/
cmake -DCMAKE_INSTALL_PREFIX=../ ../sources/
[-DDEBUG=YES] [-DNO_MFMNXML=YES] [-DMYTINYXMLDIR=/the/directory/where/libtinyxml.so/is/]
make
make install
make install-DDEBUG=YES
-------------------------------------------------------------------------------------------------
If tinyxml library is not installed
MFM can be compiled without tinyxml
cmake -DNO_MFMNXML=YES -DCMAKE_INSTALL_PREFIX=../ ../sources/
or download tynixml from http://www.grinninglizard.com/tinyxml/.
Options :
- add "-DDEBUG=YES" to activate debug compilation mode
- If tinyxml library is not installed or not necessary MFM can be compiled without tinyxml add option "-DNO_MFMNXML=YES"
- to add your own tynixml library
download tynixml from http://www.grinninglizard.com/tinyxml/.
In tinyxml directory
edit Makefile and for adding -fPIC option change lines
-----------------------------------------------------------
/////////////////////////////////////////////////////////////
# Rules for compiling source files to object files
%.o : %.cpp
${CXX} -c ${CXXFLAGS} ${INCS} $< -o $@
%.o : %.c
${CC} -c ${CFLAGS} ${INCS} $< -o $@
----------------------------------------------------------------
/////////////////////////////////////////////////////////////
to
-----------------------------------------------------------
/////////////////////////////////////////////////////////////
# Rules for compiling source files to object files
%.o : %.cpp
${CXX} -fPIC -c ${CXXFLAGS} ${INCS} $< -o $@
...
...
@@ -46,15 +45,15 @@ to
lib: tinyxml.o tinyxmlparser.o tinyxmlerror.o tinystr.o
${CC} -shared -fPIC ${CFLAGS} ${INCS} tinyxml.o tinyxmlparser.o tinyxmlerror.o tinystr.o -o libtinyxml.so
----------------------------------------------------------------
/////////////////////////////////////////////////////////////
compile with a "make lib" tynixml
to produce tynixml.so
The new cmake command become
cmake -DMYTINYXMLDIR=/the/directory/where/libtinyxml.so/is/ -DCMAKE_INSTALL_PREFIX=../ ../sources/
-------------------------------------------------------------------------------------------------
Usage
-----
...
...
@@ -62,7 +61,7 @@ Usage
In a tuto directory, you have a example usage of MFMlib for you own C++ code
-------------------------------------------------------------------------------------------------
...
...
sources/CMakeLists.txt
View file @
077a5146
...
...
@@ -2,8 +2,16 @@
cmake_minimum_required
(
VERSION 2.8.12
)
project
(
MFMlib
)
if
(
DEBUG
)
set
(
CMAKE_BUILD_TYPE Debug
)
message
(
STATUS
"CMake in DEBUG mode"
)
else
()
set
(
CMAKE_BUILD_TYPE Release
)
message
(
STATUS
"CMake in RELEASE mode"
)
endif
()
#set(CMAKE_BUILD_TYPE Release)
set
(
CMAKE_BUILD_TYPE Debug
)
#
set(CMAKE_BUILD_TYPE Debug)
macro
(
DATE RESULT
)
if
(
UNIX
)
...
...
@@ -66,8 +74,8 @@ endif()
include_directories
(
${
CMAKE_BINARY_DIR
}
)
include_directories
(
${
CMAKE_SOURCE_DIR
}
/GanTape/
)
message
(
"-- CMAKE_CXX_FLAGS_RELEASE =
${
CMAKE_CXX_FLAGS_RELEASE
}
"
)
message
(
"-- CMAKE_CXX_FLAGS_DEBUG =
${
CMAKE_CXX_FLAGS_DEBUG
}
"
)
#
message("-- CMAKE_CXX_FLAGS_RELEASE = ${CMAKE_CXX_FLAGS_RELEASE}")
#
message("-- CMAKE_CXX_FLAGS_DEBUG = ${CMAKE_CXX_FLAGS_DEBUG}")
# Créé des variables avec les fichiers à compiler
set
(
SRCSlib
...
...
sources/addaframe.txt
View file @
077a5146
...
...
@@ -7,7 +7,9 @@ the heritage came from a other Frame which elseself inherits from MFMBasicFrame
- Introduce the new Frame id in MFMTypes.h
- Add MFMMyNewFrame in CMakeLists.txt
- Add MFMMyNewFrame.h in MFMAllFrames.h
- Complete GetShiftEN(), GetShiftTS() and GetShiftLocation() in MFMCommonFrame
- Add tests in MFMtest.cc to test read and write frames tests
-
in GRU
...
...
@@ -23,7 +25,7 @@ in GRU
-> in GetEventNumber(), add if ((fFrameType == MFM_MYNEW_FRAME_TYPE)) { ...
-> in MakeEventHeader, add if ((fFrameType == MFM_MYNEW_FRAME_TYPE)) { ...
-> in FillEvent(int enventtype, long long timestamp, int number) if (enventtype == MFM_MYNEW_FRAME_TYPE)) { ...
-> in Reame add infomation about GRU evolution
.
-> in Reame add infomation about GRU evolution
( Now in git message)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment