Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest changes #20

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 24 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,18 @@ IDENTD_OBJS = $(addprefix $(IDENTD_OBJ_DIR)/,$(notdir $(IDENTD_SRC:.c=.o)))
#
# Locations of vendors libraries
#
VENDOR_SDS_SRC_DIR = $(TALKER_SRC_DIR)/vendors/sds
VENDOR_SDS_OBJ_DIR = $(TALKER_OBJ_DIR)
VENDOR_SDS_SRC = $(wildcard $(VENDOR_SDS_SRC_DIR)/*.c)
VENDOR_SDS_OBJS = $(addprefix $(VENDOR_SDS_OBJ_DIR)/,$(notdir $(VENDOR_SDS_SRC:.c=.o)))

# SDS: https://github.com/antirez/sds
VENDOR_SDS_SRC_DIR = $(TALKER_SRC_DIR)/vendors/sds
VENDOR_SDS_OBJ_DIR = $(TALKER_OBJ_DIR)
VENDOR_SDS_SRC = $(wildcard $(VENDOR_SDS_SRC_DIR)/*.c)
VENDOR_SDS_OBJS = $(addprefix $(VENDOR_SDS_OBJ_DIR)/,$(notdir $(VENDOR_SDS_SRC:.c=.o)))

# libtelnet: https://github.com/seanmiddleditch/libtelnet
VENDOR_LIBTELNET_SRC_DIR = $(TALKER_SRC_DIR)/vendors/libtelnet
VENDOR_LIBTELNET_OBJ_DIR = $(TALKER_OBJ_DIR)
VENDOR_LIBTELNET_SRC = $(wildcard $(VENDOR_LIBTELNET_SRC_DIR)/*.c)
VENDOR_LIBTELNET_OBJS = $(addprefix $(VENDOR_LIBTELNET_OBJ_DIR)/,$(notdir $(VENDOR_LIBTELNET_SRC:.c=.o)))

#
# Platform-specific libraries that need to be included
Expand Down Expand Up @@ -79,6 +87,7 @@ distclean: clean
rm -f $(TALKER_SRC_DIR)/*.[ch]~ $(TALKER_SRC_DIR)/*.[ch].bak
rm -f $(IDENTD_SRC_DIR)/*.[ch]~ $(IDENTD_SRC_DIR)/*.[ch].bak
rm -f $(VENDOR_SDS_SRC_DIR)/*.[ch]~ $(VENDOR_SDS_SRC_DIR)/*.[ch].bak
rm -f $(VENDOR_LIBTELNET_SRC_DIR)/*.[ch]~ $(VENDOR_LIBTELNET_SRC_DIR)/*.[ch].bak
rm -f $(TALKER_BIN) $(BINDIR)/$(TALKER_BIN)
rm -f $(IDENTD_BIN) $(BINDIR)/$(IDENTD_BIN)
rm -f $(INCDIR)/*.[ch]~ $(INCDIR)/*.[ch].bak
Expand All @@ -88,27 +97,28 @@ clean:
rm -f $(TALKER_OBJS) $(TALKER_OBJS:.o=.d)
rm -f $(IDENTD_OBJS) $(IDENTD_OBJS:.o=.d)
rm -f $(VENDOR_SDS_OBJS) $(VENDOR_SDS_OBJS:.o=.d)
rm -f $(VENDOR_LIBTELNET_OBJS) $(VENDOR_LIBTELNET_OBJS:.o=.d)

install: $(BINDIR)/$(TALKER_BIN) $(BINDIR)/$(IDENTD_BIN)

build: $(TALKER_BIN) $(IDENTD_BIN)

compile: $(TALKER_OBJS) $(IDENTD_OBJS) $(VENDOR_SDS_OBJS)
compile: $(TALKER_OBJS) $(IDENTD_OBJS) $(VENDOR_SDS_OBJS) $(VENDOR_LIBTELNET_OBJS)

print-%: ; @echo $* = $($*)

vpath %.c $(TALKER_SRC_DIR) $(TALKER_SRC_DIR)/commands $(IDENTD_SRC_DIR) $(VENDOR_SDS_SRC_DIR)
vpath %.c $(TALKER_SRC_DIR) $(TALKER_SRC_DIR)/commands $(IDENTD_SRC_DIR) $(VENDOR_SDS_SRC_DIR) $(VENDOR_LIBTELNET_SRC_DIR)

$(BINDIR)/$(TALKER_BIN) $(BINDIR)/$(IDENTD_BIN): $(BINDIR)/%: %
@echo "Installing $< ..."
chmod $(PERMS) $<
mv $< $(BINDIR)

$(TALKER_BIN): $(TALKER_OBJS) $(VENDOR_SDS_OBJS)
$(TALKER_BIN): $(TALKER_OBJS) $(VENDOR_SDS_OBJS) $(VENDOR_LIBTELNET_OBJS)
@echo "Linking $@ ..."
$(CC) $(LD_FLAGS) $^ $(TALKER_LIBS) -o $@

$(IDENTD_BIN): $(IDENTD_OBJS) $(VENDOR_SDS_OBJS)
$(IDENTD_BIN): $(IDENTD_OBJS) $(VENDOR_SDS_OBJS) $(VENDOR_LIBTELNET_OBJS)
@echo "Linking $@ ..."
$(CC) $(LD_FLAGS) $^ $(IDENTD_LIBS) -o $@

Expand All @@ -127,4 +137,9 @@ $(VENDOR_SDS_OBJS): $(VENDOR_SDS_OBJ_DIR)/%.o: %.c
@test -d $(VENDOR_SDS_OBJ_DIR) || mkdir $(VENDOR_SDS_OBJ_DIR)
$(CC) $(C_FLAGS) $(CC_FLAGS) $(TALKER_FLAGS) -c -o $@ $<

-include $(TALKER_OBJS:.o=.d) $(IDENTD_OBJS:.o=.d) $(VENDOR_SDS_OBJS:.o=.d)
$(VENDOR_LIBTELNET_OBJS): $(VENDOR_LIBTELNET_OBJ_DIR)/%.o: %.c
@echo "Compiling libtelnet library $< ... ($@)"
@test -d $(VENDOR_LIBTELNET_OBJ_DIR) || mkdir $(VENDOR_LIBTELNET_OBJ_DIR)
$(CC) $(C_FLAGS) $(CC_FLAGS) $(TALKER_FLAGS) -c -o $@ $<

-include $(TALKER_OBJS:.o=.d) $(IDENTD_OBJS:.o=.d) $(VENDOR_SDS_OBJS:.o=.d) $(VENDOR_LIBTELNET_OBJS:.o=.d)
18 changes: 18 additions & 0 deletions docs/amnuts_changes
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@
Information on the changes between different version of Amnuts
+------------------------------------------------------------------------------+

2.5.0
-----

Added libtelnet vendor library to help with telnet negotiation
Added workaround to libtelnet to be able to use the '%' symbol in speech :)

Updated the cmdcount command code to make it better

Fixed display bug in the preview command

2.4.0
-----

Almost all of the commands have been moved to their own files, so a fair bit of reworking structure
Added the SDS vendor library to start marking string copying/formatting/sizes a little safer, and made a start on that (long, long) journey
A docker setup has been added for those who want to run or compile Amnuts in a container
Various typos fixed
Some docs updated

2.3.0
-----
Expand Down
Loading