34 lines
1.5 KiB
Makefile
34 lines
1.5 KiB
Makefile
.POSIX:
|
|
# Include path for Boost 1.81.0 and its libraries
|
|
INC += -I/home/user/project/resources/boost_1_81_0 -L/home/user/project/resources/boost_1_81_0/stage/lib
|
|
# Include path for CPP-SMTPClient and its libraries
|
|
INC += -I/home/user/project/resources/CPP-SMTPClient-library/src -L/home/user/project/resources/CPP-SMTPClient-library
|
|
# User include paths
|
|
INC += -I/usr/include -L/usr/lib
|
|
|
|
SRCFILES = src/main.cpp
|
|
|
|
db:
|
|
sudo -u postgres createuser -P -e cavecommadmin
|
|
sudo -u postgres createdb --owner=cavecommadmin cavecomm 'contains all the information for the cavecomm instance on this device'
|
|
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE cavecomm TO cavecommadmin;"
|
|
sudo -u postgres psql -c "CREATE TABLE requests( id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY, customerEmailAddress text, freelancer text, templateName text, currencyPreference varchar(6), priceUpFront decimal, priceOnDeliver decimal, requestDescription text, accepted boolean, upFrontInvoiceID text, onDeliverInvoiceID text, upFrontPaid boolean, onDeliverPaid boolean); " cavecomm
|
|
sudo -u postgres psql -c "ALTER TABLE requests OWNER TO cavecommadmin" cavecomm
|
|
|
|
dbclean:
|
|
sudo -u postgres sh -c 'dropdb cavecomm ; dropuser cavecommadmin'
|
|
|
|
all:
|
|
rm -r bin cavecomm
|
|
g++ $(INC) -o cavecomm $(SRCFILES) -lpqxx -lfmt -pthread
|
|
|
|
build:
|
|
g++ $(INC) -o cavecomm $(SRCFILES) -DCROW_ENABLE_SSL -lpqxx -lfmt -l:libsmtpclient.a -lcrypto -lssl -pthread
|
|
|
|
release:
|
|
mkdir bin
|
|
g++ $(INC) -o bin/cavecomm $(SRCFILES) -lpqxx -lfmt -pthread
|
|
|
|
clean:
|
|
rm -r bin cavecomm
|