diff --git a/.gitignore b/.gitignore index e5a021f..5292175 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ Release/ *~ *.mk libCoreUtils.a +CoreUtils.mk diff --git a/CoreUtils.mk b/CoreUtils.mk deleted file mode 100644 index ccaf744..0000000 --- a/CoreUtils.mk +++ /dev/null @@ -1,193 +0,0 @@ -## -## Auto Generated makefile by CodeLite IDE -## any manual changes will be erased -## -## Debug -ProjectName :=CoreUtils -ConfigurationName :=Debug -WorkspacePath :=/home/bradarant/barant -ProjectPath :=/home/bradarant/barant/CoreUtils -IntermediateDirectory :=./Debug -OutDir := $(IntermediateDirectory) -CurrentFileName := -CurrentFilePath := -CurrentFileFullPath := -User :=Brad Arant -Date :=12/09/19 -CodeLitePath :=/home/bradarant/.codelite -LinkerName :=/usr/bin/x86_64-linux-gnu-g++ -SharedObjectLinkerName :=/usr/bin/x86_64-linux-gnu-g++ -shared -fPIC -ObjectSuffix :=.o -DependSuffix :=.o.d -PreprocessSuffix :=.i -DebugSwitch :=-g -IncludeSwitch :=-I -LibrarySwitch :=-l -OutputSwitch :=-o -LibraryPathSwitch :=-L -PreprocessorSwitch :=-D -SourceSwitch :=-c -OutputFile :=$(IntermediateDirectory)/lib$(ProjectName).a -Preprocessors := -ObjectSwitch :=-o -ArchiveOutputSwitch := -PreprocessOnlySwitch :=-E -ObjectsFileList :="CoreUtils.txt" -PCHCompileFlags := -MakeDirCommand :=mkdir -p -LinkOptions := -IncludePath := $(IncludeSwitch). $(IncludeSwitch). $(IncludeSwitch)../ServerCore -IncludePCH := -RcIncludePath := -Libs := -ArLibs := -LibPath := $(LibraryPathSwitch). - -## -## Common variables -## AR, CXX, CC, AS, CXXFLAGS and CFLAGS can be overriden using an environment variables -## -AR := /usr/bin/x86_64-linux-gnu-ar rcu -CXX := /usr/bin/x86_64-linux-gnu-g++ -CC := /usr/bin/x86_64-linux-gnu-gcc -CXXFLAGS := -g $(Preprocessors) -CFLAGS := -g $(Preprocessors) -ASFLAGS := -AS := /usr/bin/x86_64-linux-gnu-as - - -## -## User defined environment variables -## -CodeLiteDir:=/usr/share/codelite -Objects0=$(IntermediateDirectory)/IMFHeader.cpp$(ObjectSuffix) $(IntermediateDirectory)/PString.cpp$(ObjectSuffix) $(IntermediateDirectory)/IMFMultipart.cpp$(ObjectSuffix) $(IntermediateDirectory)/IMFMessage.cpp$(ObjectSuffix) $(IntermediateDirectory)/IMFRequest.cpp$(ObjectSuffix) $(IntermediateDirectory)/IMFResponse.cpp$(ObjectSuffix) $(IntermediateDirectory)/IMFFormData.cpp$(ObjectSuffix) $(IntermediateDirectory)/IMFPlainText.cpp$(ObjectSuffix) $(IntermediateDirectory)/File.cpp$(ObjectSuffix) $(IntermediateDirectory)/Log.cpp$(ObjectSuffix) \ - $(IntermediateDirectory)/Exception.cpp$(ObjectSuffix) - - - -Objects=$(Objects0) - -## -## Main Build Targets -## -.PHONY: all clean PreBuild PrePreBuild PostBuild MakeIntermediateDirs -all: $(IntermediateDirectory) $(OutputFile) - -$(OutputFile): $(Objects) - @$(MakeDirCommand) $(@D) - @echo "" > $(IntermediateDirectory)/.d - @echo $(Objects0) > $(ObjectsFileList) - $(AR) $(ArchiveOutputSwitch)$(OutputFile) @$(ObjectsFileList) $(ArLibs) - @$(MakeDirCommand) "/home/bradarant/barant/.build-debug" - @echo rebuilt > "/home/bradarant/barant/.build-debug/CoreUtils" - -MakeIntermediateDirs: - @test -d ./Debug || $(MakeDirCommand) ./Debug - - -./Debug: - @test -d ./Debug || $(MakeDirCommand) ./Debug - -PreBuild: - - -## -## Objects -## -$(IntermediateDirectory)/IMFHeader.cpp$(ObjectSuffix): IMFHeader.cpp $(IntermediateDirectory)/IMFHeader.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "/home/bradarant/barant/CoreUtils/IMFHeader.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IMFHeader.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/IMFHeader.cpp$(DependSuffix): IMFHeader.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IMFHeader.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IMFHeader.cpp$(DependSuffix) -MM IMFHeader.cpp - -$(IntermediateDirectory)/IMFHeader.cpp$(PreprocessSuffix): IMFHeader.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IMFHeader.cpp$(PreprocessSuffix) IMFHeader.cpp - -$(IntermediateDirectory)/PString.cpp$(ObjectSuffix): PString.cpp $(IntermediateDirectory)/PString.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "/home/bradarant/barant/CoreUtils/PString.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/PString.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/PString.cpp$(DependSuffix): PString.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/PString.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/PString.cpp$(DependSuffix) -MM PString.cpp - -$(IntermediateDirectory)/PString.cpp$(PreprocessSuffix): PString.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/PString.cpp$(PreprocessSuffix) PString.cpp - -$(IntermediateDirectory)/IMFMultipart.cpp$(ObjectSuffix): IMFMultipart.cpp $(IntermediateDirectory)/IMFMultipart.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "/home/bradarant/barant/CoreUtils/IMFMultipart.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IMFMultipart.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/IMFMultipart.cpp$(DependSuffix): IMFMultipart.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IMFMultipart.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IMFMultipart.cpp$(DependSuffix) -MM IMFMultipart.cpp - -$(IntermediateDirectory)/IMFMultipart.cpp$(PreprocessSuffix): IMFMultipart.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IMFMultipart.cpp$(PreprocessSuffix) IMFMultipart.cpp - -$(IntermediateDirectory)/IMFMessage.cpp$(ObjectSuffix): IMFMessage.cpp $(IntermediateDirectory)/IMFMessage.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "/home/bradarant/barant/CoreUtils/IMFMessage.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IMFMessage.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/IMFMessage.cpp$(DependSuffix): IMFMessage.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IMFMessage.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IMFMessage.cpp$(DependSuffix) -MM IMFMessage.cpp - -$(IntermediateDirectory)/IMFMessage.cpp$(PreprocessSuffix): IMFMessage.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IMFMessage.cpp$(PreprocessSuffix) IMFMessage.cpp - -$(IntermediateDirectory)/IMFRequest.cpp$(ObjectSuffix): IMFRequest.cpp $(IntermediateDirectory)/IMFRequest.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "/home/bradarant/barant/CoreUtils/IMFRequest.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IMFRequest.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/IMFRequest.cpp$(DependSuffix): IMFRequest.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IMFRequest.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IMFRequest.cpp$(DependSuffix) -MM IMFRequest.cpp - -$(IntermediateDirectory)/IMFRequest.cpp$(PreprocessSuffix): IMFRequest.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IMFRequest.cpp$(PreprocessSuffix) IMFRequest.cpp - -$(IntermediateDirectory)/IMFResponse.cpp$(ObjectSuffix): IMFResponse.cpp $(IntermediateDirectory)/IMFResponse.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "/home/bradarant/barant/CoreUtils/IMFResponse.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IMFResponse.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/IMFResponse.cpp$(DependSuffix): IMFResponse.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IMFResponse.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IMFResponse.cpp$(DependSuffix) -MM IMFResponse.cpp - -$(IntermediateDirectory)/IMFResponse.cpp$(PreprocessSuffix): IMFResponse.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IMFResponse.cpp$(PreprocessSuffix) IMFResponse.cpp - -$(IntermediateDirectory)/IMFFormData.cpp$(ObjectSuffix): IMFFormData.cpp $(IntermediateDirectory)/IMFFormData.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "/home/bradarant/barant/CoreUtils/IMFFormData.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IMFFormData.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/IMFFormData.cpp$(DependSuffix): IMFFormData.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IMFFormData.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IMFFormData.cpp$(DependSuffix) -MM IMFFormData.cpp - -$(IntermediateDirectory)/IMFFormData.cpp$(PreprocessSuffix): IMFFormData.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IMFFormData.cpp$(PreprocessSuffix) IMFFormData.cpp - -$(IntermediateDirectory)/IMFPlainText.cpp$(ObjectSuffix): IMFPlainText.cpp $(IntermediateDirectory)/IMFPlainText.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "/home/bradarant/barant/CoreUtils/IMFPlainText.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IMFPlainText.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/IMFPlainText.cpp$(DependSuffix): IMFPlainText.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IMFPlainText.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IMFPlainText.cpp$(DependSuffix) -MM IMFPlainText.cpp - -$(IntermediateDirectory)/IMFPlainText.cpp$(PreprocessSuffix): IMFPlainText.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IMFPlainText.cpp$(PreprocessSuffix) IMFPlainText.cpp - -$(IntermediateDirectory)/File.cpp$(ObjectSuffix): File.cpp $(IntermediateDirectory)/File.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "/home/bradarant/barant/CoreUtils/File.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/File.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/File.cpp$(DependSuffix): File.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/File.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/File.cpp$(DependSuffix) -MM File.cpp - -$(IntermediateDirectory)/File.cpp$(PreprocessSuffix): File.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/File.cpp$(PreprocessSuffix) File.cpp - -$(IntermediateDirectory)/Log.cpp$(ObjectSuffix): Log.cpp $(IntermediateDirectory)/Log.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "/home/bradarant/barant/CoreUtils/Log.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Log.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Log.cpp$(DependSuffix): Log.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Log.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Log.cpp$(DependSuffix) -MM Log.cpp - -$(IntermediateDirectory)/Log.cpp$(PreprocessSuffix): Log.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Log.cpp$(PreprocessSuffix) Log.cpp - -$(IntermediateDirectory)/Exception.cpp$(ObjectSuffix): Exception.cpp $(IntermediateDirectory)/Exception.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "/home/bradarant/barant/CoreUtils/Exception.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Exception.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Exception.cpp$(DependSuffix): Exception.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Exception.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Exception.cpp$(DependSuffix) -MM Exception.cpp - -$(IntermediateDirectory)/Exception.cpp$(PreprocessSuffix): Exception.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Exception.cpp$(PreprocessSuffix) Exception.cpp - - --include $(IntermediateDirectory)/*$(DependSuffix) -## -## Clean -## -clean: - $(RM) -r ./Debug/ - - diff --git a/CoreUtils.project b/CoreUtils.project deleted file mode 100644 index 966d781..0000000 --- a/CoreUtils.project +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/CoreUtils.txt b/CoreUtils.txt deleted file mode 100644 index 25e747c..0000000 --- a/CoreUtils.txt +++ /dev/null @@ -1 +0,0 @@ -./Debug/IMFHeader.cpp.o ./Debug/PString.cpp.o ./Debug/IMFMultipart.cpp.o ./Debug/IMFMessage.cpp.o ./Debug/IMFRequest.cpp.o ./Debug/IMFResponse.cpp.o ./Debug/IMFFormData.cpp.o ./Debug/IMFPlainText.cpp.o ./Debug/File.cpp.o ./Debug/Log.cpp.o ./Debug/Exception.cpp.o diff --git a/Debug/IMFHeader.cpp.o b/Debug/IMFHeader.cpp.o index 543ffbe..de9ad16 100644 Binary files a/Debug/IMFHeader.cpp.o and b/Debug/IMFHeader.cpp.o differ diff --git a/Debug/IMFMessage.cpp.o b/Debug/IMFMessage.cpp.o index 628a6ec..9f781c1 100644 Binary files a/Debug/IMFMessage.cpp.o and b/Debug/IMFMessage.cpp.o differ diff --git a/Debug/IMFMultipart.cpp.o b/Debug/IMFMultipart.cpp.o index 705b349..a9660e4 100644 Binary files a/Debug/IMFMultipart.cpp.o and b/Debug/IMFMultipart.cpp.o differ diff --git a/Debug/IMFRequest.cpp.o b/Debug/IMFRequest.cpp.o index 0268a2e..82d2ddf 100644 Binary files a/Debug/IMFRequest.cpp.o and b/Debug/IMFRequest.cpp.o differ diff --git a/Debug/IMFResponse.cpp.o b/Debug/IMFResponse.cpp.o index 2b823bf..1a2eb0b 100644 Binary files a/Debug/IMFResponse.cpp.o and b/Debug/IMFResponse.cpp.o differ diff --git a/Debug/PString.cpp.o b/Debug/PString.cpp.o index 3d0e1dc..327ad94 100644 Binary files a/Debug/PString.cpp.o and b/Debug/PString.cpp.o differ diff --git a/Debug/libCoreUtils.a b/Debug/libCoreUtils.a index 2548683..0d8db77 100644 Binary files a/Debug/libCoreUtils.a and b/Debug/libCoreUtils.a differ diff --git a/Log.cpp b/Log.cpp index b7a9404..4031ab9 100644 --- a/Log.cpp +++ b/Log.cpp @@ -1,7 +1,5 @@ -#include "ConsoleSession.h" #include "Log.h" #include "LogListener.h" -#include "ConsoleServer.h" namespace coreutils { diff --git a/Log.h b/Log.h index 8b19879..801ebce 100644 --- a/Log.h +++ b/Log.h @@ -3,11 +3,10 @@ #include "includes" #include "File.h" -#include "Object.h" #include "LogListener.h" namespace coreutils { - + class ConsoleServer; static const int LOG_NONE = 0; diff --git a/compile b/compile new file mode 100755 index 0000000..c8e34b9 --- /dev/null +++ b/compile @@ -0,0 +1,30 @@ +#!/bin/bash + +for file in *.cpp +do + filename="${file%.*}" + list="$list $filename.o" + echo -n "Compiling $filename..." + g++ -c $file & + if [ $? = '0' ] + then + echo "OK" + else + echo "ERROR" + exit -1 + fi + +done + +wait +echo -n "Building static library libCoreUtils.a..." +ar rcs libCoreUtils.a $list +if [ $? = '0' ] +then + echo "OK" +else + echo "ERROR" + exit -1 +fi + +