diff --git a/tests/Makefile.am b/tests/Makefile.am index 7b24087f5..2659e5cd2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -62,8 +62,12 @@ ETCP_CORE_OBJS = \ if OS_WINDOWS TUN_PLATFORM_OBJ = $(top_builddir)/src/utun-tun_windows.o else +if OS_FREEBSD +TUN_PLATFORM_OBJ = $(top_builddir)/src/utun-tun_freebsd.o +else TUN_PLATFORM_OBJ = $(top_builddir)/src/utun-tun_linux.o endif +endif # Full ETCP objects ETCP_FULL_OBJS = \ @@ -105,7 +109,9 @@ TESTS = $(check_PROGRAMS) tinycrypt-objects: $(TINYCRYPT_OBJS) # Ensure TinyCrypt objects are built before tests that need them -$(TINYCRYPT_OBJS): +BUILT_SOURCES = $(TINYCRYPT_OBJS) + +$(TINYCRYPT_OBJS): $(top_builddir)/src/utun @$(MAKE) -C $(top_builddir)/src tinycrypt-objects # Test definitions