implement basic unit testing
This commit is contained in:
7
Makefile
7
Makefile
@@ -5,6 +5,7 @@
|
||||
IDIR = ./include
|
||||
BDIR = ./build
|
||||
SDIR = ./src
|
||||
TDIR = ./tests
|
||||
|
||||
include config.mk
|
||||
|
||||
@@ -34,6 +35,9 @@ lib: $(SDIR)/libglacier.c
|
||||
$(CC) $(SDIR)/libglacier.c -c $(LIBFLAGS) -o $(BDIR)/lib/libglacier.o
|
||||
$(AR) -rc $(BDIR)/lib/libglacier.a build/lib/libglacier.o
|
||||
|
||||
test: $(BDIR) $(TDIR)/Makefile
|
||||
make -f tests/Makefile
|
||||
|
||||
install_lib: $(BDIR)/lib/libglacier.a
|
||||
@echo "[INFO]"
|
||||
@echo "[INFO] Installing library to PREFIX/lib..."
|
||||
@@ -59,3 +63,6 @@ install: install_lib install_head
|
||||
|
||||
clean:
|
||||
rm -rf $(BDIR)
|
||||
|
||||
distclean: $(BDIR) $(TDIR)/test-suite
|
||||
rm -rf $(BDIR) $(TDIR)/test-suite
|
||||
|
||||
Reference in New Issue
Block a user