- Add test framework (test.h) with assertion macros and test runner - Add comprehensive unit tests (test_network.c) covering: - Packet parsing and error handling - User registration and authentication - Room operations (create, join, leave, delete, list) - Direct messaging functionality - Message broadcasting - Password hashing - Update Makefile with 'make test' target - Rewrite PROTOCOL file with complete specification: - All 14 packet types with data layouts - All error codes with descriptions - Typical usage flows
26 lines
485 B
Makefile
26 lines
485 B
Makefile
# asfur version
|
|
VERSION = 0.1
|
|
|
|
# Customize below to fit your system
|
|
|
|
# paths
|
|
PREFIX = /usr
|
|
MANPREFIX = ${PREFIX}/share/man
|
|
|
|
# OpenBSD (uncomment)
|
|
#MANPREFIX = ${PREFIX}/man
|
|
|
|
# includes and libs
|
|
INCS = -I.
|
|
LIBS = -lssl -lcrypto -lcrypt -luv -lsqlite3
|
|
# flags
|
|
CFLAGS := -std=c11 -pedantic -Wall -O0 ${INCS} -DVERSION=\"${VERSION}\"
|
|
CFLAGS := ${CFLAGS} -g
|
|
LDFLAGS = ${LIBS}
|
|
|
|
# Solaris
|
|
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
|
|
#LDFLAGS = ${LIBS}
|
|
|
|
# compiler and linker
|
|
CC = cc
|