This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
magicka/deps/cutest-1.5/Makefile
Dan Cross 33beceadd3 CuTest: add Makefile, remove unsafe string operations
Replace unsafe string operations (strcpy, strcat,
sprintf, vsprintf) with safe equivalents:

1. The one use of strcpy into an allocated buffer was
   replaced with strdup.
2. The one use of strcat was replaced with a call to
   memmove and explicitly setting the NUL terminating
   byte.
3. sprintf()/vsprintf() calls were replaced with calls
   to snprintf()/vsnprintf(), respectively.

Added a Makefile to build the library as, er, a library
and run the test suite.

Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
2018-10-11 21:36:23 +10:00

17 lines
226 B
Makefile

LIB= libcutest.a
OBJS= CuTest.o
$(LIB): $(OBJS)
ar ru $(LIB) $(OBJS)
ranlib $(LIB)
$(OBJS): CuTest.h
test: $(LIB)
$(CC) -o AllTests AllTests.c CuTestTest.c $(LIB)
./AllTests
clean:
rm -f AllTests *.o $(LIB)