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.
52 lines
1000 B
52 lines
1000 B
VERSION=0.3.1 |
|
#arg Installation prefix |
|
PREFIX=/usr/local |
|
|
|
CC=gcc |
|
CFLAGS=-std=c99 -pedantic -Iinclude -DRPD_VERSION=\"$(VERSION)\" |
|
CXX=c++ |
|
CXXFLAGS=-pedantic -Iinclude |
|
CXXSTD=-ansi |
|
LDFLAGS= |
|
|
|
#flag Debug mode |
|
DEBUG ?= 0 |
|
ifneq ($(DEBUG), 0) |
|
CFLAGS+=-Wall -g -DDEBUG_MODE |
|
CXXFLAGS+=-Wall -g -DDEBUG_MODE |
|
else |
|
CFLAGS+=-O3 |
|
CXXFLAGS+=-O3 |
|
endif |
|
|
|
#flag Add TCP server |
|
TCP_SERVER ?= 1 |
|
ifeq ($(TCP_SERVER), 1) |
|
LDFLAGS += -lmongoose |
|
endif |
|
|
|
#flag Add FastCGI server |
|
FCGI_SERVER ?= 1 |
|
ifeq ($(FCGI_SERVER), 1) |
|
LDFLAGS += -lfcgi |
|
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
|
|
|