Commit 077a5146 authored by LEGEARD Luc's avatar LEGEARD Luc
Browse files

add simpler debug mode in sources/CMakeLists.txt

parent fdee31a3
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
-------------------------------------------------------------------------------------------------
......
......@@ -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
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment