mirror of
https://github.com/mfontanini/libtins
synced 2026-01-26 20:01:35 +01:00
Added test suite makefile.
This commit is contained in:
23
tests/Makefile.in
Normal file
23
tests/Makefile.in
Normal file
@@ -0,0 +1,23 @@
|
||||
CXX=@CXX@
|
||||
CFLAGS=-c -Wall @CFLAGS@ -DTINS_VERSION=@PACKAGE_VERSION@
|
||||
LDFLAGS=-lpcap -lgtest -lpthread
|
||||
SOURCES=$(wildcard src/*.cpp ../src/*.cpp)
|
||||
|
||||
OBJECTS=$(SOURCES:.cpp=.o)
|
||||
INCLUDE=-Iinclude/ -I../include
|
||||
EXECUTABLE=test
|
||||
|
||||
all: $(SOURCES) $(EXECUTABLE)
|
||||
|
||||
compile: $(OBJECTS)
|
||||
|
||||
recompile: clean all
|
||||
|
||||
$(EXECUTABLE): $(OBJECTS)
|
||||
$(CXX) $(OBJECTS) $(LDFLAGS) -o $@
|
||||
|
||||
.cpp.o:
|
||||
$(CXX) $(CFLAGS) $(INCLUDE) $< -o $@
|
||||
|
||||
clean:
|
||||
rm $(OBJECTS) $(EXECUTABLE)
|
||||
4113
tests/configure
vendored
Executable file
4113
tests/configure
vendored
Executable file
File diff suppressed because it is too large
Load Diff
12
tests/configure.ac
Normal file
12
tests/configure.ac
Normal file
@@ -0,0 +1,12 @@
|
||||
AC_INIT(myconfig, 0.1)
|
||||
|
||||
AC_PROG_CXX()
|
||||
AC_LANG(C++)
|
||||
|
||||
CFLAGS="-DDEBUG -g"
|
||||
|
||||
AC_CHECK_HEADERS([pcap.h gtest/gtest.h])
|
||||
AC_CHECK_LIB(pcap, pcap_loop, [], [AC_MSG_ERROR([pcap library is needed!])])
|
||||
#AC_CHECK_LIB([gtest_main], [main], [], [AC_MSG_ERROR([gtest library is needed!])])
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_OUTPUT(Makefile)
|
||||
Reference in New Issue
Block a user