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.
 
 
 

42 lines
762 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 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