C and C++ web framework. http://rapida.vilor.one/docs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

48 lines
891 B

VERSION=0.2.1
#arg Installation prefix
PREFIX=/usr/local
CC=gcc
CFLAGS=-std=gnu99 -pedantic -Iinclude
CXX=c++
CXXFLAGS=-pedantic -Iinclude
CXXSTD=-ansi
LDFLAGS=-lfcgi
#flag Debug mode
DEBUG ?= 0
ifneq ($(DEBUG), 0)
CFLAGS+=-Wall -g -DDEBUG_MODE
CXXFLAGS+=-Wall -g -DDEBUG_MODE
else
CFLAGS+=-O3
CXXFLAGS+=-O3
endif
#arg Additional CXX flags
ADD_CXXFLAGS =
ifdef ADD_CXXFLAGS
CXXFLAGS+=$(ADD_CXXFLAGS)
endif
#flag Enable inja extension
EXTENSIONS_INJA ?= 0
#arg Dist path. Needed only if inja is enabled.
DIST_PATH = /var/www/html
ifneq ($(EXTENSIONS_INJA), 0)
CXXFLAGS+=-DEXTENSIONS_INJA -DDIST_PATH=\"$(DIST_PATH)\"
CXXSTD=-std=c++17
endif
#flag Multithread support
MT_ENABLED ?= 0
#arg Number of threads. 8 by default.
NTHREADS = 8
ifneq ($(MT_ENABLED), 0)
CXXFLAGS+=-DMT_ENABLED -DNTHREADS=$(NTHREADS)
CFLAGS+=-DMT_ENABLED -DNTHREADS=$(NTHREADS)
LDFLAGS+=-lpthread
endif