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:
2012-01-12 02:46:16 +00:00
parent f2ba48a10e
commit d0ffdd336c
16 changed files with 165 additions and 89 deletions

View File

@@ -1,29 +1,27 @@
include Makefile.o.dep
libname=mainparser.a
all: $(libname)
$(libname): $(o)
ar rcs $(libname) $(o)
.SUFFIXES: .cpp .o
.cpp.o:
$(CXX) -c $(CXXFLAGS) $<
depend:
makedepend $(CXXFLAGS) -Y. -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
include Makefile.o.dep
libname=mainparser.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

View File

@@ -1 +1 @@
o = mainparser.o
o = mainparser.o

View File

@@ -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.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2011, Tomasz Sowa
* Copyright (c) 2011-2012, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -40,6 +40,9 @@
#include <string.h>
namespace PT
{
MainParser::MainParser()
{
@@ -227,3 +230,8 @@ bool was_incremented = false;
return was_incremented;
}
} // namespace

View File

@@ -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.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2011, Tomasz Sowa
* Copyright (c) 2011-2012, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -35,8 +35,12 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef headerfile_mainparser_mainparser
#define headerfile_mainparser_mainparser
#ifndef headerfile_picotools_mainparser_mainparser
#define headerfile_picotools_mainparser_mainparser
namespace PT
{
/*
@@ -121,4 +125,8 @@ private:
const char * last_double_param;
};
} // namespace
#endif