Changes: * Split patty_ax25_frame_decode() into the following: - patty_ax25_frame_decode_address() - patty_ax25_frame_decode_control() This allows for look up an established socket for a given address pair, to determine if an SABME session is in progress, necessitating modulo-128 control decoding * Decode I and S N(R), N(S) sequence numbers, poll/final bits properly in both modulo-8 and modulo-128 mode * Perform better frame control validation * Implement the following functions in src/sock.c: - patty_ax25_sock_send_rr() - patty_ax25_sock_send_rnr() - patty_ax25_sock_send_rej() - patty_ax25_sock_send_srej() Corresponding functions have been removed from src/server.c * Implement better functions in src/sock.c for encoding frame control, with send/receive sequences associated with the socket, with modulo-128 encoding for SABME sessions Other changes: * Move or delete macros from include/patty/ax25/macros.h into include/patty/ax25.h and include/patty/ax25/frame.h * Move definitions from include/patty/ax25/proto.h to header file include/patty/ax25.h * Perform better bounds checking while decoding frames * Improve frame control printing in src/print.c; display frame type names, N(R), (NS) sequence numbers, and poll/final bits
59 lines
1.5 KiB
Makefile
59 lines
1.5 KiB
Makefile
include ../mk/build.mk
|
|
|
|
INCLUDE_PATH = ../include
|
|
HEADER_SUBDIR = patty
|
|
|
|
CC = $(CROSS)cc
|
|
CFLAGS = $(CGFLAGS) -fPIC -Wall -O2 -I$(INCLUDE_PATH)
|
|
LDFLAGS =
|
|
|
|
HEADERS = kiss.h ax25.h ax25/if.h ax25/call.h ax25/frame.h ax25/sock.h \
|
|
ax25/route.h ax25/server.h list.h hash.h dict.h print.h
|
|
|
|
OBJS = kiss.o ax25.o if.o call.o frame.o sock.o route.o server.o \
|
|
list.o hash.o dict.o print.o
|
|
|
|
VERSION_MAJOR = 0
|
|
VERSION_MINOR = 0.1
|
|
VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
|
|
|
|
LIBNAME = patty
|
|
|
|
HEADERS_BUILD = $(addprefix $(INCLUDE_PATH)/$(HEADER_SUBDIR)/, $(HEADERS))
|
|
|
|
AR = $(CROSS)ar
|
|
RANLIB = $(CROSS)ranlib
|
|
|
|
RM = /bin/rm
|
|
LN = /bin/ln
|
|
RMDIR = /bin/rmdir
|
|
INSTALL = /usr/bin/install
|
|
|
|
all: $(STATIC) $(SONAME_FULL) $(SONAME) $(SONAME_SHORT)
|
|
|
|
$(STATIC): $(OBJS)
|
|
$(AR) rc $(STATIC) $(OBJS)
|
|
$(RANLIB) $(STATIC)
|
|
|
|
$(SONAME_FULL): $(OBJS)
|
|
$(CC) $(LLFLAGS) $(OBJS) $(LDFLAGS) -o $(SONAME_FULL)
|
|
|
|
$(SONAME): $(SONAME_FULL)
|
|
$(LN) -s $< $@
|
|
|
|
$(SONAME_SHORT): $(SONAME_FULL)
|
|
$(LN) -s $< $@
|
|
|
|
$(OBJS): %.o: %.c $(HEADERS_BUILD)
|
|
$(CC) $(CFLAGS) -c $<
|
|
|
|
install: $(SONAME_FULL) $(STATIC)
|
|
$(INSTALL) -c -m 0644 $(STATIC) $(PREFIX)/lib
|
|
$(INSTALL) -c -m 0755 $(SONAME_FULL) $(PREFIX)/lib
|
|
$(LN) -s -f $(SONAME_FULL) $(PREFIX)/lib/$(SONAME)
|
|
$(LN) -s -f $(SONAME_FULL) $(PREFIX)/lib/$(SONAME_SHORT)
|
|
$(INSTALL) -d -m 0755 $(PREFIX)/include/$(HEADER_SUBDIR)
|
|
$(INSTALL) -c -m 0644 $(HEADERS_BUILD) $(PREFIX)/include/$(HEADER_SUBDIR)
|
|
|
|
clean:
|
|
$(RM) -f $(SONAME_SHORT) $(SONAME) $(SONAME_FULL) $(STATIC) $(OBJS)
|