UNIT TESTING WORKS
This commit is contained in:
parent
7258ef5810
commit
923df644a0
7
Makefile
7
Makefile
@ -35,8 +35,9 @@ lib: $(SDIR)/libglacier.c
|
|||||||
$(CC) $(SDIR)/libglacier.c -c $(LIBFLAGS) -o $(BDIR)/lib/libglacier.o
|
$(CC) $(SDIR)/libglacier.c -c $(LIBFLAGS) -o $(BDIR)/lib/libglacier.o
|
||||||
$(AR) -rc $(BDIR)/lib/libglacier.a build/lib/libglacier.o
|
$(AR) -rc $(BDIR)/lib/libglacier.a build/lib/libglacier.o
|
||||||
|
|
||||||
test: $(BDIR) $(TDIR)/Makefile
|
check: $(BDIR) $(TDIR)/unit-tests.c
|
||||||
make -f tests/Makefile
|
$(CC) tests/unit-tests.c -o tests/test-suite -lcunit -Wall -Wextra build/lib/libglacier.a $(LIBFLAGS)
|
||||||
|
tests/test-suite
|
||||||
|
|
||||||
install_lib: $(BDIR)/lib/libglacier.a
|
install_lib: $(BDIR)/lib/libglacier.a
|
||||||
@echo "[INFO]"
|
@echo "[INFO]"
|
||||||
@ -64,5 +65,5 @@ install: install_lib install_head
|
|||||||
clean:
|
clean:
|
||||||
rm -rf $(BDIR)
|
rm -rf $(BDIR)
|
||||||
|
|
||||||
distclean: $(BDIR) $(TDIR)/test-suite
|
distclean:
|
||||||
rm -rf $(BDIR) $(TDIR)/test-suite
|
rm -rf $(BDIR) $(TDIR)/test-suite
|
||||||
|
@ -5,6 +5,6 @@
|
|||||||
CC = /bin/gcc
|
CC = /bin/gcc
|
||||||
AR = /bin/ar
|
AR = /bin/ar
|
||||||
|
|
||||||
LIBFLAGS = -lconfig
|
LIBFLAGS = -lconfig -lcrypto
|
||||||
|
|
||||||
PREFIX = /usr
|
PREFIX = /usr
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
#
|
|
||||||
# Makefile
|
|
||||||
#
|
|
||||||
|
|
||||||
include ../config.mk
|
|
||||||
|
|
||||||
all: unit-tests.c
|
|
||||||
$(CC) unit-tests.c -o test-suite -lcunit -lconfig ../build/libglacier.a -Wall -Wextra
|
|
||||||
./test-suite
|
|
Loading…
Reference in New Issue
Block a user