diff --git a/src/Makefile b/src/Makefile index 482f78f..9690400 100755 --- a/src/Makefile +++ b/src/Makefile @@ -1,26 +1,26 @@ include Makefile.o.dep +libname=ezc.a -all: ezc.a +all: $(libname) -ezc.a: $(o) - ar rcs ezc.a $(o) +$(libname): $(o) + ar rcs $(libname) $(o) %.o: %.cpp $(CXX) -c $(CXXFLAGS) $< - depend: - makedepend $(CXXFLAGS) -Y. -f- *.cpp > Makefile.dep + makedepend -Y. -I../pikotools -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 *.a + rm -f $(libname) include Makefile.dep diff --git a/src/Makefile.dep b/src/Makefile.dep index 27225f9..5a73711 100755 --- a/src/Makefile.dep +++ b/src/Makefile.dep @@ -1,28 +1,5 @@ # DO NOT DELETE -edanticitem.o: item.h funinfo.h -edanticpattern.o: pattern.h item.h funinfo.h functions.h stringconv.h utf8.h -edanticpattern.o: /home/tomek/roboczy/winix/core/log.h -edanticpattern.o: /home/tomek/roboczy/winix/core/textstream.h -edanticpattern.o: /home/tomek/roboczy/winix/core/misc.h -edanticpattern.o: /home/tomek/roboczy/winix/core/requesttypes.h -edanticpattern.o: /home/tomek/roboczy/winix/core/logmanipulators.h -edanticpattern.o: /home/tomek/roboczy/winix/core/slog.h -edanticpattern.o: /home/tomek/roboczy/winix/core/cur.h -edanticpattern.o: /home/tomek/roboczy/winix/core/request.h -edanticpattern.o: /usr/local/include/fcgiapp.h -edanticpattern.o: /home/tomek/roboczy/winix/core/error.h -edanticpattern.o: /home/tomek/roboczy/winix/core/config.h -edanticpattern.o: /home/tomek/roboczy/winix/core/confparser.h -edanticpattern.o: /home/tomek/roboczy/winix/core/htmlfilter.h -edanticpattern.o: /home/tomek/roboczy/winix/templates/htmltextstream.h -edanticpattern.o: /home/tomek/roboczy/winix/core/textstream.h -edanticpattern.o: /home/tomek/roboczy/winix/core/session.h -edanticpattern.o: /home/tomek/roboczy/winix/core/user.h -edanticpattern.o: /home/tomek/roboczy/winix/core/plugindata.h -edanticpattern.o: /home/tomek/roboczy/winix/core/rebus.h -edanticpattern.o: /home/tomek/roboczy/winix/core/mount.h -edanticpattern.o: /home/tomek/roboczy/winix/templates/locale.h -edanticpattern.o: /home/tomek/roboczy/winix/core/confparser.h -edanticstringconv.o: stringconv.h -edanticutf8.o: utf8.h +item.o: item.h funinfo.h +pattern.o: pattern.h item.h funinfo.h functions.h stringconv.h +stringconv.o: stringconv.h diff --git a/src/Makefile.o.dep b/src/Makefile.o.dep index babaa59..2268750 100755 --- a/src/Makefile.o.dep +++ b/src/Makefile.o.dep @@ -1 +1 @@ -o = item.o pattern.o stringconv.o utf8.o +o = item.o pattern.o stringconv.o diff --git a/src/ezc.h b/src/ezc.h index dfb6772..dab47b4 100644 --- a/src/ezc.h +++ b/src/ezc.h @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2007-2010, Tomasz Sowa + * Copyright (c) 2007-2012, Tomasz Sowa * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,9 +39,6 @@ #ifndef headerfile_ezc_ezc #define headerfile_ezc_ezc - -#include "utf8.h" #include "generator.h" - #endif diff --git a/src/pattern.cpp b/src/pattern.cpp index bd59b86..5b5aa37 100755 --- a/src/pattern.cpp +++ b/src/pattern.cpp @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2007-2011, Tomasz Sowa + * Copyright (c) 2007-2012, Tomasz Sowa * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -90,17 +90,17 @@ void Pattern::Directory(const char * dir, const char * dir2) directory2.clear(); if( dir ) - UTF8ToWide(dir, directory); + PT::UTF8ToWide(dir, directory); if( dir2 ) - UTF8ToWide(dir2, directory2); + PT::UTF8ToWide(dir2, directory2); } void Pattern::Directory(const std::string & dir) { - UTF8ToWide(dir, directory); + PT::UTF8ToWide(dir, directory); directory2.clear(); } @@ -108,8 +108,8 @@ void Pattern::Directory(const std::string & dir) void Pattern::Directory(const std::string & dir, const std::string & dir2) { - UTF8ToWide(dir, directory); - UTF8ToWide(dir2, directory2); + PT::UTF8ToWide(dir, directory); + PT::UTF8ToWide(dir2, directory2); } @@ -154,7 +154,7 @@ void Pattern::ParseFile(const std::string & file_name) void Pattern::ParseFile(const char * file_name) { - UTF8ToWide(file_name, item_root.file_name); + PT::UTF8ToWide(file_name, item_root.file_name); include_level = 0; CreateTreeReadIncludeSkipAllowFlag(item_root); } @@ -183,7 +183,7 @@ void Pattern::ParseFile(const wchar_t * file_name) void Pattern::ParseString(const char * str) { if( input_as_utf8 ) - UTF8ToWide(str, string_content); + PT::UTF8ToWide(str, string_content); else AssignString(str, string_content); @@ -260,16 +260,16 @@ void Pattern::UTF8(bool utf8) void Pattern::SetCommentary(const char * com_start, const char * com_stop) { - UTF8ToWide(com_start, commentary_start); - UTF8ToWide(com_stop, commentary_stop); + PT::UTF8ToWide(com_start, commentary_start); + PT::UTF8ToWide(com_stop, commentary_stop); } void Pattern::SetCommentary(const std::string & com_start, const std::string & com_stop) { - UTF8ToWide(com_start, commentary_start); - UTF8ToWide(com_stop, commentary_stop); + PT::UTF8ToWide(com_start, commentary_start); + PT::UTF8ToWide(com_stop, commentary_stop); } @@ -396,7 +396,7 @@ bool Pattern::ReadFileFromDir(const std::wstring & dir, const wchar_t * name, st file_name = dir; file_name += '/'; file_name += name; - WideToUTF8(file_name, afile_name); + PT::WideToUTF8(file_name, afile_name); std::ifstream file(afile_name.c_str()); @@ -429,7 +429,7 @@ void Pattern::ReadFile(std::ifstream & file, std::wstring & result) { if( input_as_utf8 ) { - UTF8ToWide(file, result); + PT::UTF8ToWide(file, result); } else { diff --git a/src/pattern.h b/src/pattern.h index 1a50414..001dbc9 100755 --- a/src/pattern.h +++ b/src/pattern.h @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2007-2011, Tomasz Sowa + * Copyright (c) 2007-2012, Tomasz Sowa * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,7 +43,7 @@ #include "item.h" #include "functions.h" #include "stringconv.h" -#include "utf8.h" +#include "utf8/utf8.h" #ifdef EZC_USE_WINIX_LOGGER #include "core/log.h"