diff --git a/LICENSE b/LICENSE index c9634a4..ae3132f 100644 --- a/LICENSE +++ b/LICENSE @@ -58,7 +58,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2024 Jackrabbit-Labs-LLC +Copyright 2024 Jackrabbit-Founders-LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/Makefile b/Makefile index e5aea94..34a367f 100644 --- a/Makefile +++ b/Makefile @@ -13,16 +13,16 @@ # ****************************************************************************** CC=gcc -CFLAGS= -g3 -O0 -Wall -Wextra -MACROS=-D MCTP_VERBOSE -INCLUDE_DIR=/usr/local/include -LIB_DIR=/usr/local/lib +CFLAGS?= -g3 -O0 -Wall -Wextra +MACROS?=-D MCTP_VERBOSE +INCLUDE_DIR?=/usr/local/include +LIB_DIR?=/usr/local/lib INCLUDE_PATH=-I $(INCLUDE_DIR) LIB_PATH=-L $(LIB_DIR) LIBS=-l uuid -l ptrqueue -l arrayutils -l fmapi -l emapi -l timeutils TARGET=mctp -all: server client lib$(TARGET).a +all: lib$(TARGET).a client: client.c main.o threads.o ctrl.o $(CC) $^ $(CFLAGS) $(MACROS) $(INCLUDE_PATH) $(LIB_PATH) $(LIBS) -o $@ @@ -52,8 +52,12 @@ install: lib$(TARGET).a main.h sudo cp lib$(TARGET).a $(LIB_DIR)/ sudo cp main.h $(INCLUDE_DIR)/$(TARGET).h +uninstall: + sudo rm $(LIB_DIR)/lib$(TARGET).a + sudo rm $(INCLUDE_DIR)/$(TARGET).h + # List all non file name targets as PHONY -.PHONY: all clean doc install +.PHONY: all clean doc install uninstall # Variables # $^ Will expand to be all the sensitivity list diff --git a/README.md b/README.md index 0d8101a..163dd76 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,55 @@ -# MCTP +# Overview + +This is a C library that provides a multithreaded MCTP based message passing +framework. + +# Supported Operating System Versions + +- Ubuntu 23.10 +- Fedora 38, 39 + +# Building + +1. Install OS libraries + +Install the following build packages to compile the software on the following +operating systems. + +**Ubuntu:** + +```bash +apt install build-essential +``` + +**Fedora:** + +```bash +``` + +2. Build Dependencies + +This library is dependent upon the following projects. + +- [array_utils](https://github.com/JackrabbitLabs/array_utils) +- [time_utils](https://github.com/JackrabbitLabs/time_utils) +- [ptr_queue](https://github.com/JackrabbitLabs/ptr_queue) +- [emapi](https://github.com/JackrabbitLabs/emapi) +- [fmapi](https://github.com/JackrabbitLabs/fmapi) + +For each of these repositories, in the order listed, clone and execute: + +```bash +make install +``` + +This will install a library (.a) and header file to the standard os location +(e.g. /usr/local/include, /usr/local/lib) + +3. Build + +After building the required dependencies run: + +```bash +make +``` diff --git a/client.c b/client.c index 57623de..9e605a2 100644 --- a/client.c +++ b/client.c @@ -29,7 +29,7 @@ #include -#include "mctp.h" +#include "main.h" /* MACROS ====================================================================*/ diff --git a/ctrl.c b/ctrl.c index beeb45d..2465347 100644 --- a/ctrl.c +++ b/ctrl.c @@ -57,7 +57,7 @@ #include #include -#include "mctp.h" +#include "main.h" /* MACROS ====================================================================*/ diff --git a/server.c b/server.c index 8dfca82..fe572dc 100644 --- a/server.c +++ b/server.c @@ -38,7 +38,7 @@ #include -#include "mctp.h" +#include "main.h" /* MACROS ====================================================================*/ diff --git a/threads.c b/threads.c index ff7cf87..16e0541 100644 --- a/threads.c +++ b/threads.c @@ -97,7 +97,7 @@ #include #include -#include "mctp.h" +#include "main.h" /* MACROS ====================================================================*/