flags("MultiProcessorCompile") newaction({ trigger = "clean", description = "Remove generated files", execute = function() os.rmdir("bin") os.rmdir("obj") os.remove("Makefile") os.remove("*.make") end }) newoption({ trigger = "enable-poll", description = "Force poll to be used regardless of whether or not it is a system call", category = "IRCd" }) newoption({ trigger = "enable-unixport", description = "Allow usage of UNIX domain sockets on P-lines", category = "IRCd" }) newoption({ trigger = "ipv6", value = "yes/no", description = "Whether to support IPv6 (warning: it will break your configuration file)", allowed = { { "yes", "Use IPv6" }, { "no", "Don't use IPv6" }, }, default = "no" }) newoption({ trigger = "openssl", value = "yes/no", description = "Use OpenSSL or not", allowed = { {"yes", "Use OpenSSL"}, {"no", "Don't use OpenSSL"} }, category = "IRCd", default = "no" }) newoption({ trigger = "ziplinks", value = "yes/no", description = "Whether to use compressed links (this requires zlib)", allowed = { {"yes", "Enable ziplinks"}, {"no", "Don't enable ziplinks"} }, category = "IRCd", default = "no" }) workspace("Koumakan") configurations({ "Debug", "Release" }) platforms({ "Native", "Win32", "Win64" }) defaultplatform("Native") filter("platforms:Win32") system("windows") architecture("x86") gccprefix("i686-w64-mingw32-") filter("platforms:Win64") system("windows") architecture("x86_64") gccprefix("x86_64-w64-mingw32-") filter({}) project("Common") kind("StaticLib") filter({"options:ipv6=yes"}) defines({"INET6"}) filter({"options:openssl=yes"}) defines({"HAVE_OPENSSL"}) links({"ssl", "crypto"}) filter({"options:ziplinks=yes"}) defines({"ZIP_LINKS"}) links({"z"}) filter({}) files("src/common/*.c") includedirs({ "include/common", "include/server", "include" }) filter("configurations:Debug") defines({ "DEBUG" }) symbols("On") filter("configurations:Release") defines({ "NDEBUG" }) optimize("On") filter({}) targetname("Koumakan") project("Server") kind("ConsoleApp") targetname("meiling") filter({"options:ipv6=yes"}) defines({"INET6"}) filter({"options:enable-poll" and "system: not windows"}) defines({"USE_POLL"}) filter({"options:enable-unixport" and "system: not windows"}) defines({"UNIXPORT"}) filter({"options:openssl=yes"}) defines({"HAVE_OPENSSL"}) links({"ssl", "crypto"}) filter({"options:ziplinks=yes"}) defines({"ZIP_LINKS"}) links({"z"}) filter({}) files("src/server/*.c") removefiles({ "src/server/config_read.c", "src/server/fileio.c", }) includedirs({ "include/common", "include/server", "include" }) links("Common") filter("system:windows") links({ "wsock32", "dnsapi" }) filter({}) filter("configurations:Debug") defines({ "DEBUG" }) symbols("On") filter("configurations:Release") defines({ "NDEBUG" }) optimize("On") filter({}) project("Service") kind("ConsoleApp") targetname("sakuya") files("src/service/*.c") includedirs({ "include/common", "include/service", "include" }) links("Common") filter("system:windows") links({ "wsock32" }) filter({}) filter("configurations:Debug") defines({ "DEBUG" }) symbols("On") filter("configurations:Release") defines({ "NDEBUG" }) optimize("On") filter({}) project("mkpasswd") kind("ConsoleApp") targetname("flandre") files("src/mkpasswd/mkpasswd.c") links({ "crypt" })