check token file
This commit is contained in:
parent
d9fa698632
commit
89031562c6
16
makefile
16
makefile
@ -15,9 +15,8 @@ ifeq ($(strip $(DPP_VERSION)),) # Check if DPP_VERSION is empty (no version foun
|
|||||||
# Define include directories for headers
|
# Define include directories for headers
|
||||||
# -I<path> tells the compiler where to look for #include <file.h> or #include <dir/file.h>
|
# -I<path> tells the compiler where to look for #include <file.h> or #include <dir/file.h>
|
||||||
# We assume:
|
# We assume:
|
||||||
# - Your own headers (like ImageProcessor.h) are in 'include/'
|
# - STB headers are in the root project folder
|
||||||
# - STB headers are in 'include/stb/'
|
# - D++ headers are in 'dpp/' (so dpp.h is found via include/dpp/dpp.h)
|
||||||
# - D++ headers are in 'include/dpp/' (so dpp.h is found via include/dpp/dpp.h)
|
|
||||||
INC_DIRS = -Iinclude -Idpp/
|
INC_DIRS = -Iinclude -Idpp/
|
||||||
LIB_PATHS = $(DPP_PATH)
|
LIB_PATHS = $(DPP_PATH)
|
||||||
else
|
else
|
||||||
@ -63,7 +62,7 @@ OBJECTS = $(OBJ_DIR)/discord-bot.o
|
|||||||
# 'all' is the default target that builds your executable
|
# 'all' is the default target that builds your executable
|
||||||
all: $(OUTPUT_FILE)
|
all: $(OUTPUT_FILE)
|
||||||
@echo "DPP_PATH: "$(DPP_PATH)
|
@echo "DPP_PATH: "$(DPP_PATH)
|
||||||
@echo "Build complete."
|
@echo "Build complete."
|
||||||
|
|
||||||
# Rule to link the executable:
|
# Rule to link the executable:
|
||||||
# It depends on the object files and uses CXX to link them with specified libraries.
|
# It depends on the object files and uses CXX to link them with specified libraries.
|
||||||
@ -72,7 +71,14 @@ $(OUTPUT_FILE): $(OBJECTS)
|
|||||||
@echo "LDFLAGS: $(LDFLAGS)"
|
@echo "LDFLAGS: $(LDFLAGS)"
|
||||||
@mkdir -p $(@D) # Ensure the output binary directory exists (e.g., bin/Linux/release/)
|
@mkdir -p $(@D) # Ensure the output binary directory exists (e.g., bin/Linux/release/)
|
||||||
$(CXX) -o $@ $(OBJECTS) $(LDFLAGS)
|
$(CXX) -o $@ $(OBJECTS) $(LDFLAGS)
|
||||||
cp token.txt $(@D)
|
@if test -f token.txt; then \
|
||||||
|
echo "Copying token.txt to $(@D)"; \
|
||||||
|
cp token.txt $(@D); \
|
||||||
|
else \
|
||||||
|
echo "Error: token.txt not found! Please create it in the project root. Copy the token when you create your discord bot and paste it in token.txt"; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Rule to compile the object file:
|
# Rule to compile the object file:
|
||||||
# This takes your .cpp source file and compiles it into an object file (.o).
|
# This takes your .cpp source file and compiles it into an object file (.o).
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user