Import('env') env_n2nvpn = env.Clone() # Bindings. env_n2nvpn.add_source_files(env.modules_sources, "*.cpp") # These paths are relative to modules/n2nvpn/ env_n2nvpn.Append(CPPPATH=[".", "n2n", "n2n/include"]) # libn2n. n2n_dir = "#../modules/n2nvpn/n2n/src/" n2n_src = [ "aes.c", "auth.c", "cc20.c", "curve25519.c", "edge_management.c", "edge_utils.c", "header_encryption.c", "hexdump.c", "json.c", "management.c", "minilzo.c", "n2n.c", "n2n_port_mapping.c", "n2n_regex.c", "network_traffic_filter.c", "pearson.c", "random_numbers.c", "sn_management.c", "sn_selection.c", "sn_utils.c", "speck.c", "tf.c", "transform_aes.c", "transform_cc20.c", "transform_lzo.c", "transform_null.c", "transform_speck.c", "transform_tf.c", "transform_zstd.c", "tuntap_freebsd.c", "tuntap_linux.c", "tuntap_netbsd.c", "tuntap_osx.c", "wire.c" ] n2n_src = [n2n_dir + file for file in n2n_src] env_n2nvpn.add_source_files(env.modules_sources, n2n_src) if env["platform"] == "windows": n2n_dir_win = "#n2n/src/win32/" n2n_src_win = [ "edge_utils_win32.c", "getopt1.c", "getopt.c", "wintap.c" ] n2n_src_win = [n2n_dir_win + file for file in n2n_src_win] env_n2nvpn.add_source_files(env.modules_sources, n2n_src_win) env_n2nvpn.Append(CPPPATH=["n2n/src"]) # Append CCFLAGS flags for both C and C++ code. # If you need to, you can: # - Append CFLAGS for C code only. # - Append CXXFLAGS for C++ code only. env_n2nvpn.Append(CCFLAGS=['-g', '-O2']) # LIBPATH and LIBS need to be set on the real "env" (not the clone) # to link the specified libraries to the Godot executable. # This is a path relative to /modules/module/ where your .a libraries reside. # If you are compiling the module externally (not in the godot source tree), # these will need to be full paths. #env.Append(LIBPATH=['/home/gamer/godot/modules/n2nvpn/n2n/src']) #env.Append(LIBPATH=['#modules/n2nvpn/n2n/src']) # Check with the documentation of the external library to see which library # files should be included/linked. env.Append(LIBS=['pthread'])