added: namespace PT, global Makefile file
git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@374 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
f2ba48a10e
commit
d0ffdd336c
|
@ -0,0 +1,39 @@
|
||||||
|
# Makefile for GNU make
|
||||||
|
|
||||||
|
|
||||||
|
ifndef CXX
|
||||||
|
CXX = g++
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef CXXFLAGS
|
||||||
|
CXXFLAGS = -Wall -pedantic -O2 -I/usr/local/include -I.. -L/usr/local/lib
|
||||||
|
endif
|
||||||
|
|
||||||
|
export CXX
|
||||||
|
export CXXFLAGS
|
||||||
|
|
||||||
|
|
||||||
|
all: confparser mainparser utf8
|
||||||
|
|
||||||
|
confparser: FORCE
|
||||||
|
@cd confparser ; $(MAKE) -e
|
||||||
|
|
||||||
|
mainparser: FORCE
|
||||||
|
@cd mainparser ; $(MAKE) -e
|
||||||
|
|
||||||
|
utf8: FORCE
|
||||||
|
@cd utf8 ; $(MAKE) -e
|
||||||
|
|
||||||
|
|
||||||
|
FORCE:
|
||||||
|
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@cd confparser ; $(MAKE) -e clean
|
||||||
|
@cd mainparser ; $(MAKE) -e clean
|
||||||
|
@cd utf8 ; $(MAKE) -e clean
|
||||||
|
|
||||||
|
depend:
|
||||||
|
@cd confparser ; $(MAKE) -e depend
|
||||||
|
@cd mainparser ; $(MAKE) -e depend
|
||||||
|
@cd utf8 ; $(MAKE) -e depend
|
|
@ -1,29 +1,27 @@
|
||||||
include Makefile.o.dep
|
include Makefile.o.dep
|
||||||
|
|
||||||
libname=confparser.a
|
libname=confparser.a
|
||||||
|
|
||||||
all: $(libname)
|
all: $(libname)
|
||||||
|
|
||||||
$(libname): $(o)
|
$(libname): $(o)
|
||||||
ar rcs $(libname) $(o)
|
ar rcs $(libname) $(o)
|
||||||
|
|
||||||
|
|
||||||
.SUFFIXES: .cpp .o
|
%.o: %.cpp
|
||||||
|
$(CXX) -c $(CXXFLAGS) $<
|
||||||
.cpp.o:
|
|
||||||
$(CXX) -c $(CXXFLAGS) $<
|
|
||||||
|
|
||||||
|
depend:
|
||||||
|
makedepend -Y. -I.. -f- *.cpp > Makefile.dep
|
||||||
depend:
|
echo -n "o = " > Makefile.o.dep
|
||||||
makedepend -Y. -I.. -f- *.cpp > Makefile.dep
|
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
|
||||||
echo -n "o = " > Makefile.o.dep
|
|
||||||
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o
|
||||||
clean:
|
rm -f $(libname)
|
||||||
rm -f *.o
|
|
||||||
rm -f $(libname)
|
|
||||||
|
include Makefile.dep
|
||||||
|
|
||||||
include Makefile.dep
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# DO NOT DELETE
|
# DO NOT DELETE
|
||||||
|
|
||||||
confparser.o: confparser.h ../utf8/utf8.h
|
confparser.o: confparser.h space.h ../utf8/utf8.h
|
||||||
space.o: confparser.h ../utf8/utf8.h
|
space.o: space.h ../utf8/utf8.h
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of PicoTools
|
* This file is a part of PikoTools
|
||||||
* and is distributed under the (new) BSD licence.
|
* and is distributed under the (new) BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of PicoTools
|
* This file is a part of PikoTools
|
||||||
* and is distributed under the (new) BSD licence.
|
* and is distributed under the (new) BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
@ -39,10 +39,6 @@
|
||||||
#define headerfile_picotools_confparser_confparser
|
#define headerfile_picotools_confparser_confparser
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
#include <list>
|
|
||||||
#include <map>
|
|
||||||
#include "space.h"
|
#include "space.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of PicoTools
|
* This file is a part of PikoTools
|
||||||
* and is distributed under the (new) BSD licence.
|
* and is distributed under the (new) BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
@ -35,9 +35,9 @@
|
||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cstdlib>
|
//#include <cstdlib>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#include "confparser.h"
|
#include "space.h"
|
||||||
#include "utf8/utf8.h"
|
#include "utf8/utf8.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of PicoTools
|
* This file is a part of PikoTools
|
||||||
* and is distributed under the (new) BSD licence.
|
* and is distributed under the (new) BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
@ -38,10 +38,8 @@
|
||||||
#ifndef headerfile_picotools_confparser_space
|
#ifndef headerfile_picotools_confparser_space
|
||||||
#define headerfile_picotools_confparser_space
|
#define headerfile_picotools_confparser_space
|
||||||
|
|
||||||
#include <fstream>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <list>
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,29 +1,27 @@
|
||||||
include Makefile.o.dep
|
include Makefile.o.dep
|
||||||
|
|
||||||
libname=mainparser.a
|
libname=mainparser.a
|
||||||
|
|
||||||
all: $(libname)
|
all: $(libname)
|
||||||
|
|
||||||
$(libname): $(o)
|
$(libname): $(o)
|
||||||
ar rcs $(libname) $(o)
|
ar rcs $(libname) $(o)
|
||||||
|
|
||||||
|
|
||||||
.SUFFIXES: .cpp .o
|
%.o: %.cpp
|
||||||
|
$(CXX) -c $(CXXFLAGS) $<
|
||||||
.cpp.o:
|
|
||||||
$(CXX) -c $(CXXFLAGS) $<
|
|
||||||
|
|
||||||
|
depend:
|
||||||
|
makedepend -Y. -I.. -f- *.cpp > Makefile.dep
|
||||||
depend:
|
echo -n "o = " > Makefile.o.dep
|
||||||
makedepend $(CXXFLAGS) -Y. -f- *.cpp > Makefile.dep
|
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
|
||||||
echo -n "o = " > Makefile.o.dep
|
|
||||||
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o
|
||||||
clean:
|
rm -f $(libname)
|
||||||
rm -f *.o
|
|
||||||
rm -f $(libname)
|
|
||||||
|
include Makefile.dep
|
||||||
|
|
||||||
include Makefile.dep
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
o = mainparser.o
|
o = mainparser.o
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of MainParser -- simple parser for main() parameters
|
* This file is a part of PikoTools
|
||||||
* and is distributed under the (new) BSD licence.
|
* and is distributed under the (new) BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2011, Tomasz Sowa
|
* Copyright (c) 2011-2012, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -40,6 +40,9 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
|
namespace PT
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
MainParser::MainParser()
|
MainParser::MainParser()
|
||||||
{
|
{
|
||||||
|
@ -227,3 +230,8 @@ bool was_incremented = false;
|
||||||
|
|
||||||
return was_incremented;
|
return was_incremented;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of MainParser -- simple parser for main() parameters
|
* This file is a part of PikoTools
|
||||||
* and is distributed under the (new) BSD licence.
|
* and is distributed under the (new) BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2011, Tomasz Sowa
|
* Copyright (c) 2011-2012, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -35,8 +35,12 @@
|
||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef headerfile_mainparser_mainparser
|
#ifndef headerfile_picotools_mainparser_mainparser
|
||||||
#define headerfile_mainparser_mainparser
|
#define headerfile_picotools_mainparser_mainparser
|
||||||
|
|
||||||
|
|
||||||
|
namespace PT
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -121,4 +125,8 @@ private:
|
||||||
const char * last_double_param;
|
const char * last_double_param;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
include Makefile.o.dep
|
||||||
|
|
||||||
|
libname=utf8.a
|
||||||
|
|
||||||
|
all: $(libname)
|
||||||
|
|
||||||
|
$(libname): $(o)
|
||||||
|
ar rcs $(libname) $(o)
|
||||||
|
|
||||||
|
|
||||||
|
%.o: %.cpp
|
||||||
|
$(CXX) -c $(CXXFLAGS) $<
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
depend:
|
||||||
|
makedepend -Y. -I.. -f- *.cpp > Makefile.dep
|
||||||
|
echo -n "o = " > Makefile.o.dep
|
||||||
|
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
|
||||||
|
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o
|
||||||
|
rm -f $(libname)
|
||||||
|
|
||||||
|
|
||||||
|
include Makefile.dep
|
|
@ -0,0 +1,3 @@
|
||||||
|
# DO NOT DELETE
|
||||||
|
|
||||||
|
utf8.o: utf8.h
|
|
@ -0,0 +1 @@
|
||||||
|
o = utf8.o
|
|
@ -1,11 +1,11 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of EZC -- Easy templating in C++
|
* This file is a part of PikoTools
|
||||||
* and is distributed under the (new) BSD licence.
|
* and is distributed under the (new) BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2010-2011, Tomasz Sowa
|
* Copyright (c) 2010-2012, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
#include "utf8.h"
|
#include "utf8.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Ezc
|
namespace PT
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
@ -890,7 +890,7 @@ bool WideToUTF8(const std::wstring & wide_string, std::ostream & utf8, int mode)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace Ezc
|
} // namespace
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
12
utf8/utf8.h
12
utf8/utf8.h
|
@ -1,11 +1,11 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of EZC -- Easy templating in C++
|
* This file is a part of PikoTools
|
||||||
* and is distributed under the (new) BSD licence.
|
* and is distributed under the (new) BSD licence.
|
||||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2010-2011, Tomasz Sowa
|
* Copyright (c) 2010-2012, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -35,14 +35,14 @@
|
||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef headerfile_ezc_utf8
|
#ifndef headerfile_picotools_utf8_utf8
|
||||||
#define headerfile_ezc_utf8
|
#define headerfile_picotools_utf8_utf8
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
||||||
namespace Ezc
|
namespace PT
|
||||||
{
|
{
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -104,7 +104,7 @@ bool WideToUTF8(const std::wstring & wide_string, std::ostream & u
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace Ezc
|
} // namespace
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue