diff --git a/Makefile b/Makefile index 3035a72..cb6a3c3 100755 --- a/Makefile +++ b/Makefile @@ -1,26 +1,26 @@ include Makefile.o.dep +libname=tito.a -all: tito.a +all: $(libname) -tito.a: $(o) - ar rcs tito.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/Makefile.dep b/Makefile.dep index 3e30878..27b2876 100755 --- a/Makefile.dep +++ b/Makefile.dep @@ -1,7 +1,6 @@ # DO NOT DELETE -edanticaes.o: aes.h -edanticbase64.o: base64.h -edanticcrypto.o: crypto.h aes.h base64.h /home/tomek/roboczy/ezc/src/utf8.h -edanticcrypto.o: misc.h -edanticmisc.o: misc.h +aes.o: aes.h +base64.o: base64.h +crypto.o: crypto.h aes.h base64.h ../../pikotools/utf8/utf8.h misc.h +misc.o: misc.h diff --git a/crypto.cpp b/crypto.cpp index 15407c5..cf33e27 100755 --- a/crypto.cpp +++ b/crypto.cpp @@ -40,7 +40,7 @@ // !! FIX ME //#include "log.h" -#include "../ezc/src/utf8.h" +#include "utf8/utf8.h" #include "misc.h" @@ -64,7 +64,7 @@ return true; void Crypto::Crypt(const std::wstring & in, std::wstring & out) { - Ezc::WideToUTF8(in, utf8_str); + PT::WideToUTF8(in, utf8_str); aes.Encode((const unsigned char*)utf8_str.c_str(), utf8_str.size(), aes_name, uint8_tab); base64_str.clear(); @@ -99,7 +99,7 @@ bool Crypto::Decrypt(const std::wstring & in, std::wstring & out) if( aes.Decode((const unsigned char *)aes_str.c_str(), aes_str.size(), aes_tmp_name, uint8_tab) ) { if( !uint8_tab.empty() ) - Ezc::UTF8ToWide((const char*)&uint8_tab[0], uint8_tab.size(), out); + PT::UTF8ToWide((const char*)&uint8_tab[0], uint8_tab.size(), out); Clear(); return true;