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_src = [ "n2n/src/aes.c", "n2n/src/auth.c", "n2n/src/cc20.c", "n2n/src/curve25519.c", "n2n/src/edge_management.c", "n2n/src/edge_utils.c", "n2n/src/header_encryption.c", "n2n/src/hexdump.c", "n2n/src/json.c", "n2n/src/management.c", "n2n/src/minilzo.c", "n2n/src/n2n.c", "n2n/src/n2n_port_mapping.c", "n2n/src/n2n_regex.c", "n2n/src/network_traffic_filter.c", "n2n/src/pearson.c", "n2n/src/random_numbers.c", "n2n/src/sn_management.c", "n2n/src/sn_selection.c", "n2n/src/sn_utils.c", "n2n/src/speck.c", "n2n/src/tf.c", "n2n/src/transform_aes.c", "n2n/src/transform_cc20.c", "n2n/src/transform_lzo.c", "n2n/src/transform_null.c", "n2n/src/transform_speck.c", "n2n/src/transform_tf.c", "n2n/src/transform_zstd.c", "n2n/src/tuntap_freebsd.c", "n2n/src/tuntap_linux.c", "n2n/src/tuntap_netbsd.c", "n2n/src/tuntap_osx.c", "n2n/src/wire.c" ] env_n2nvpn.add_source_files(env.modules_sources, n2n_src) if env["platform"] == "windows": n2n_src_win = [ "n2n/src/win32/edge_utils_win32.c", "n2n/src/win32/getopt1.c", "n2n/src/win32/getopt.c", "n2n/src/win32/wintap.c" ] 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=['lib1', 'lib2'])