Finish premake transition

FossilOrigin-Name: 30676561791954ccd8a2d8cb627fdb74b0cd38780ffa3b17a9aae4719a26e3fe
This commit is contained in:
nekobit 2023-03-27 03:36:57 +00:00
parent 7634b3df93
commit 78c09fd7dc
4 changed files with 23 additions and 9 deletions

View file

@ -15,3 +15,4 @@ templates/*.ctt
test/unit/*.bin
compile_commands.json
build/
obj/

View file

@ -77,8 +77,21 @@ files(pages);
includedirs { "include/" };
defines(definitions);
configuration { "linux", "bsd", "gmake" };
linkoptions { "`pkg-config --libs mastodont`" };
-- For some reason this one doesn't have a pkg-config file
local libfcgi = os.findlib("libfcgi");
if not libfcgi then
print("Couldn't find libfcgi (aka fcgi-devkit). Probably gonna need that.\n");
os.exit(1);
end
configuration { "gmake" };
linkoptions{ "`pkg-config --libs mastodont` `perl -MExtUtils::Embed -e ldopts`" };
buildoptions{ "`pkg-config --cflags mastodont` `perl -MExtUtils::Embed -e ccopts`" };
links{"fcgi"};
if premake.gcc.cc ~= 'clang' then
buildoptions{"-Wno-compound-token-split-by-macro"};
end
-- TODO figure out perl...
configuration { "Debug" };

View file

@ -7,7 +7,7 @@
#ifndef GLOBAL_PERL_H
#define GLOBAL_PERL_H
// Hack on my system... if this breaks anything, plz dig deeper
/* Libperl has lots of warnings... */
#include <EXTERN.h>
#include <perl.h>
#include "memory.h"

View file

@ -26,12 +26,12 @@ ifeq ($(config),debug)
DEFINES += -DCMP_ENABLE_ABOUT -DCMP_ENABLE_ACCOUNT -DCMP_ENABLE_APPLICATIONS -DCMP_ENABLE_ATTACHMENTS -DCMP_ENABLE_BASE_PAGE -DCMP_ENABLE_CONVERSATIONS -DCMP_ENABLE_EMOJI -DCMP_ENABLE_EMOJI_REACTION -DCMP_ENABLE_GLOBAL_CACHE -DCMP_ENABLE_GLOBAL_PERL -DCMP_ENABLE_HASHTAG -DCMP_ENABLE_HTTP -DCMP_ENABLE_INDEX -DCMP_ENABLE_LISTS -DDEBUG
INCLUDES += -Iinclude
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -g
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -g `pkg-config --cflags mastodont` `perl -MExtUtils::Embed -e ccopts` -Wno-compound-token-split-by-macro
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
ALL_LDFLAGS += $(LDFLAGS)
ALL_LDFLAGS += $(LDFLAGS) -L. `pkg-config --libs mastodont` `perl -MExtUtils::Embed -e ldopts`
LDDEPS +=
LIBS += $(LDDEPS)
LIBS += $(LDDEPS) -lfcgi
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
define PREBUILDCMDS
endef
@ -48,12 +48,12 @@ ifeq ($(config),release)
DEFINES += -DCMP_ENABLE_ABOUT -DCMP_ENABLE_ACCOUNT -DCMP_ENABLE_APPLICATIONS -DCMP_ENABLE_ATTACHMENTS -DCMP_ENABLE_BASE_PAGE -DCMP_ENABLE_CONVERSATIONS -DCMP_ENABLE_EMOJI -DCMP_ENABLE_EMOJI_REACTION -DCMP_ENABLE_GLOBAL_CACHE -DCMP_ENABLE_GLOBAL_PERL -DCMP_ENABLE_HASHTAG -DCMP_ENABLE_HTTP -DCMP_ENABLE_INDEX -DCMP_ENABLE_LISTS -DNDEBUG
INCLUDES += -Iinclude
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -O2
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -O2 `pkg-config --cflags mastodont` `perl -MExtUtils::Embed -e ccopts` -Wno-compound-token-split-by-macro
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS)
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
ALL_LDFLAGS += $(LDFLAGS) -s
ALL_LDFLAGS += $(LDFLAGS) -L. -s `pkg-config --libs mastodont` `perl -MExtUtils::Embed -e ldopts`
LDDEPS +=
LIBS += $(LDDEPS)
LIBS += $(LDDEPS) -lfcgi
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
define PREBUILDCMDS
endef