From 644678c309771e4b2523e171fbce210fd80d98b6 Mon Sep 17 00:00:00 2001 From: DavesBorges <66228145+DavesBorges@users.noreply.github.com> Date: Thu, 9 Sep 2021 19:01:07 +0100 Subject: [PATCH 1/5] Add LICENSE file --- LICENSE | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5954e1b --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2021 Eric O Meehan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + From 4197105c32112c9ef0587096205c18df1b994efd Mon Sep 17 00:00:00 2001 From: DavesBorges <66228145+DavesBorges@users.noreply.github.com> Date: Thu, 9 Sep 2021 19:16:36 +0100 Subject: [PATCH 2/5] Update .gitignore --- .gitignore | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/.gitignore b/.gitignore index ee28272..d37da5f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,55 @@ *.DS_Store + +# Prerequisites +*.d + +# Object files +*.o +*.ko +*.obj +*.elf + +# Linker output +*.ilk +*.map +*.exp + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.a +*.la +*.lo + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb +*.pdb + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf \ No newline at end of file From 78bf891b5daa7ef1818b7ba590abb7b66d9dce5b Mon Sep 17 00:00:00 2001 From: DavesBorges <66228145+DavesBorges@users.noreply.github.com> Date: Thu, 9 Sep 2021 19:24:13 +0100 Subject: [PATCH 3/5] Add debug target to Makefile --- Makefile | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index a08eba5..2aee6cd 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,12 @@ # Create top level static library and all sub-libraries all: Main DataStructures Networking Systems +############################################################################### +# MARK debug_all +############################################################################### +debug: DEBUG = -g +debug: all ############################################################################### # MARK: MAIN @@ -37,22 +42,22 @@ DataStructures: DataStructuresSub DataStructuresSub: Node LinkedList Queue BinarySearchTree Entry Dictionary Node: - gcc -c DataStructures/Common/Node.c + gcc $(DEBUG) -c DataStructures/Common/Node.c LinkedList: - gcc -c DataStructures/Lists/LinkedList.c + gcc $(DEBUG) -c DataStructures/Lists/LinkedList.c Queue: - gcc -c DataStructures/Lists/Queue.c + gcc $(DEBUG) -c DataStructures/Lists/Queue.c BinarySearchTree: - gcc -c DataStructures/Trees/BinarySearchTree.c + gcc $(DEBUG) -c DataStructures/Trees/BinarySearchTree.c Entry: - gcc -c DataStructures/Dictionary/Entry.c + gcc $(DEBUG) -c DataStructures/Dictionary/Entry.c Dictionary: - gcc -c DataStructures/Dictionary/Dictionary.c + gcc $(DEBUG) -c DataStructures/Dictionary/Dictionary.c @@ -68,19 +73,19 @@ Networking: NetworkingSub NetworkingSub: DataStructuresSub SystemsSub Server Client HTTPRequest HTTPServer PeerToPeer Server: - gcc -c Networking/Nodes/Server.c + gcc $(DEBUG) -c Networking/Nodes/Server.c Client: - gcc -c Networking/Nodes/Client.c + gcc $(DEBUG) -c Networking/Nodes/Client.c PeerToPeer: - gcc -c Networking/Nodes/PeerToPeer.c + gcc $(DEBUG) -c Networking/Nodes/PeerToPeer.c HTTPServer: - gcc -c Networking/Nodes/HTTPServer.c + gcc $(DEBUG) -c Networking/Nodes/HTTPServer.c HTTPRequest: - gcc -c Networking/Protocols/HTTPRequest.c + gcc $(DEBUG) -c Networking/Protocols/HTTPRequest.c @@ -96,10 +101,10 @@ Systems: SystemsSub SystemsSub: ThreadPool Files ThreadPool: - gcc -c Systems/ThreadPool.c + gcc $(DEBUG) -c Systems/ThreadPool.c Files: - gcc -c Systems/Files.c + gcc $(DEBUG) -c Systems/Files.c ############################################################################### From 81c06eef823ac840bc7b554018b7d8903785a1a5 Mon Sep 17 00:00:00 2001 From: DavesBorges <66228145+DavesBorges@users.noreply.github.com> Date: Thu, 9 Sep 2021 19:27:11 +0100 Subject: [PATCH 4/5] Fix bug in Client object --- Networking/Nodes/Client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Networking/Nodes/Client.c b/Networking/Nodes/Client.c index d437e27..89d1e1b 100644 --- a/Networking/Nodes/Client.c +++ b/Networking/Nodes/Client.c @@ -36,6 +36,7 @@ struct Client client_constructor(int domain, int service, int protocol, int port // Instantiate a client object. struct Client client; client.domain = domain; + client.service = service; client.port = port; client.interface = interface; // Establish a socket connection. From ad5632839d1811b9ceced8581d1ecc8057adbba2 Mon Sep 17 00:00:00 2001 From: DavesBorges <66228145+DavesBorges@users.noreply.github.com> Date: Thu, 9 Sep 2021 20:27:53 +0100 Subject: [PATCH 5/5] Update README.md --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e92a9cd..20f0262 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,17 @@ If you save the libeom directory to your default include location, there is no n make ``` -This will generate a static library for libeom as a whole, as well as static libraries for each of the sub-modules individually. If you only wish to compile the top-level static library, use: +This will generate a static library for libeom as a whole, as well as static libraries for each of the sub-modules individually. +If you want to have debug information use: + +``` +make debug +``` + +This is similar to just running ```make``` but all the library and submodules will have debug information. + + +If you only wish to compile the top-level static library, use: ``` make Main