bin_PROGRAMS = utun # Sources that are always compiled utun_CORE_SOURCES = \ utun.c \ utun_instance.c \ config_parser.c \ config_updater.c \ route_lib.c \ route6_lib.c \ route_bgp.c \ route_ping.c \ route_node.c \ route_connectivity.c \ routing.c \ tun_if.c \ tun_route.c \ tun_linux.c \ tun_freebsd.c \ tun_windows.c \ etcp.c \ etcp_connections.c \ etcp_bbr.c \ etcp_loadbalancer.c \ etcp_debug.c \ etcp_dump.c \ secure_channel.c \ crc32.c \ stcp_link.c \ stcp.c \ stcp_server.c \ stcp_client.c \ pkt_normalizer.c \ packet_dump.c \ etcp_api.c \ control_server.c \ firewall.c \ eim_nat.c \ nat_transport.c \ dummynet.c \ proxy/tcp_proxy_client.c \ etcp_router.c \ proxy/tcp_proxy_server.c \ proxy/udp_proxy.c \ proxy/icmp_proxy.c \ lwip_tcp/lwip_pbuf.c \ lwip_tcp/lwip_tcp.c \ lwip_tcp/lwip_tcp_in.c \ lwip_tcp/lwip_tcp_out.c # Platform-specific TUN libs (Windows only) utun_TUN_LIBS = @TUN_LIBS@ utun_SOURCES = $(utun_CORE_SOURCES) $(utun_TUN_SOURCES) # Include paths utun_CFLAGS = \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src/uip \ -g \ $(DEBUG_FLAGS) # Libraries utun_LDADD = \ $(top_builddir)/lib/libuasync.a \ -lpthread \ -lm \ -lcrypto \ $(utun_TUN_LIBS) # Copy binary to project root after building all-local: copy-to-root copy-to-root: utun$(EXEEXT) @cp -f utun$(EXEEXT) $(top_srcdir)/ @cp -f $(top_srcdir)/lib/wintun.dll $(top_srcdir)/ 2>/dev/null || echo "Warning: wintun.dll not found in lib/" if OS_WINDOWS @cp -f $(srcdir)/utun.manifest $(top_srcdir)/utun.exe.manifest 2>/dev/null || true endif # Clean clean-local: @true # Install directories install-exec-hook: $(MKDIR_P) $(DESTDIR)$(bindir) $(MKDIR_P) $(DESTDIR)$(sysconfdir)/utun