diff --git a/Makefile b/Makefile index 3bbb130..519219c 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ else endif # Common include and library paths -INCLUDE_PATHS = -I$(DPP_PATH)/include +INCLUDE_PATHS = -I$(DPP_PATH)/include -I../sqlite3 DPP_BUILD_DIR = $(DPP_PATH)/build/library # Platform-specific versioned library filename @@ -59,7 +59,7 @@ else endif # Library flags -LIB_PATHS = -L$(DPP_BUILD_DIR) +LIB_PATHS = -L$(DPP_BUILD_DIR) -L../sqlite3 LIBRARIES = -ldpp -lsqlite3 # Build type specific flags @@ -76,7 +76,7 @@ C_FLAGS = $(COMMON_FLAGS) -std=c17 CXX_FLAGS = $(COMMON_FLAGS) -std=c++17 -Wno-deprecated-declarations # Objects -OBJECTS = $(EXECUTABLE_NAME).o +OBJECTS = $(EXECUTABLE_NAME).o OBJECT_FILES = $(patsubst %,$(OBJ_DIR)/%,$(OBJECTS)) # Build rules diff --git a/README.md b/README.md index c5f6e92..3599734 100644 --- a/README.md +++ b/README.md @@ -17,32 +17,37 @@ Prototype C++ Discord bot, that supports 2 features ## Build -### Ubuntu 24.04 LTS +### Ubuntu Linux ``` -sudo apt update -sudo apt upgrade -y -sudo apt install build-essential curl git cmake zlib1g-dev libssl-dev -y -mkdir workdir -cd workdir -git clone https://github.com/brainboxdotcc/DPP.git -cd DPP -cmake -B ./build -cmake --build ./build -j8 -cd .. -git clone https://git.indoodle.com/oomer/poomer-discord.git -cd poomer-discord -curl -LO https://raw.githubusercontent.com/nothings/stb/master/stb_image.h -curl -LO https://raw.githubusercontent.com/nothings/stb/master/stb_image_write.h +sudo apt install build-essential git cmake -y +mkdir workdir && cd workdir +mkdir zlib libssl DPP poomer-discord sqlite3 && cd zlib +git clone https://github.com/madler/zlib.git . +./configure --static +make -j4 +cd ../libssl && git clone https://github.com/openssl/openssl.git . +./Configure linux-x86_64 no-shared +make -j4 +cd ../DPP && git clone https://github.com/brainboxdotcc/DPP.git . +#zlib wants an absolute path to help cmake find_package work, ssl requires explicit vars +cmake -B ./build \ + -DCMAKE_PREFIX_PATH="$PWD/../zlib;$PWD/../libssl" +cmake --build ./build -j4 +cd ../sqlite3 +wget https://www.sqlite.org/2025/sqlite-autoconf-3510100.tar.gz +tar xzf sqlite-autoconf-3510100.tar.gz --strip-components=1 +./configure --enable-static --disable-shared && make -j4 +cd ../poomer-discord && git clone https://git.indoodle.com/oomer/poomer-discord.git . +wget https://raw.githubusercontent.com/nothings/stb/master/stb_image.h +wget https://raw.githubusercontent.com/nothings/stb/master/stb_image_write.h make all -j4 ``` - ### MacOS ``` -mkdir workdir -cd workdir +mkdir workdir && cd workdir mkdir homebrew curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip-components 1 -C homebrew eval "$(homebrew/bin/brew shellenv)"