Divide telnet sources into two segments.

At this point, telnet will build and run, although it doesn't work properly.
This commit is contained in:
Stephen Heumann 2015-05-31 23:44:46 -05:00
parent 46f340c657
commit aeddbd055f
2 changed files with 10 additions and 3 deletions

View File

@ -2,17 +2,19 @@ LIBTELNET_SRCS = \
libtelnet/getaddrinfo.c \
libtelnet/strlcpy.c
TELNET_SRCS = \
TELNET_SRCS_A = \
libtelnet/genget.c \
libtelnet/inet_ntop.c \
telnet/commands.c \
telnet/main.c \
telnet/network.c \
telnet/ring.c \
telnet/sys_bsd.c \
telnet/sys_bsd.c
TELNET_SRCS_B = \
telnet/telnet.c \
telnet/terminal.c \
telnet/utilities.c
TELNET_SRCS = $(TELNET_SRCS_A) $(TELNET_SRCS_B)
TELNETD_SRCS = \
libtelnet/getent.c \

View File

@ -8,9 +8,14 @@ LIBS = -l/usr/lib/libtermcap.204 -l/usr/lib/libnetdb
CFLAGS = -i -w
TELNET_A_SPECIFIC = $(TELNET_SPECIFIC) -STELNET_A__
TELNET_B_SPECIFIC = $(TELNET_SPECIFIC) -STELNET_B__
TELNETD_SPECIFIC += -STELNETD___
$(OBJS): $(HEADERS)
%.o: %.c
$(CC) $(INCLUDES) \
$(!eq,$(TELNET_SRCS:s/$<//),$(TELNET_SRCS) $(TELNET_SPECIFIC)) \
$(!eq,$(TELNET_SRCS_A:s/$<//),$(TELNET_SRCS_A) $(TELNET_A_SPECIFIC)) \
$(!eq,$(TELNET_SRCS_B:s/$<//),$(TELNET_SRCS_B) $(TELNET_B_SPECIFIC)) \
$(!eq,$(TELNETD_SRCS:s/$<//),$(TELNETD_SRCS) $(TELNETD_SPECIFIC)) \
$(CFLAGS) -c $< -o $@