Optimize Make file
This commit is contained in:
16
Makefile
16
Makefile
@ -8,26 +8,26 @@ INC += -I/usr/include -L/usr/lib
|
|||||||
|
|
||||||
SRCFILES = src/main.cpp
|
SRCFILES = src/main.cpp
|
||||||
|
|
||||||
|
DEF += -DCROW_ENABLE_SSL
|
||||||
|
|
||||||
|
LIBS += -lpqxx -lfmt -l:libsmtpclient.a -lcrypto -lssl -pthread
|
||||||
|
|
||||||
db:
|
db:
|
||||||
sudo -u postgres createuser -P -e cavecommadmin
|
./setupdb.sh
|
||||||
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:
|
dbclean:
|
||||||
sudo -u postgres sh -c 'dropdb cavecomm ; dropuser cavecommadmin'
|
sudo -u postgres sh -c 'dropdb cavecomm ; dropuser cavecommadmin'
|
||||||
|
|
||||||
all:
|
all:
|
||||||
rm -r bin cavecomm
|
rm -r bin cavecomm
|
||||||
g++ $(INC) -o cavecomm $(SRCFILES) -lpqxx -lfmt -pthread
|
g++ $(INC) -o cavecomm $(SRCFILES) $(DEF) $(LIBS)
|
||||||
|
|
||||||
build:
|
build:
|
||||||
g++ $(INC) -o cavecomm $(SRCFILES) -DCROW_ENABLE_SSL -lpqxx -lfmt -l:libsmtpclient.a -lcrypto -lssl -pthread
|
g++ $(INC) -o cavecomm $(SRCFILES) $(DEF) $(LIBS)
|
||||||
|
|
||||||
release:
|
release:
|
||||||
mkdir bin
|
mkdir bin
|
||||||
g++ $(INC) -o bin/cavecomm $(SRCFILES) -lpqxx -lfmt -pthread
|
g++ $(INC) -o bin/cavecomm $(SRCFILES) $(DEF) $(LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -r bin cavecomm
|
rm -r bin cavecomm
|
||||||
|
Reference in New Issue
Block a user