From 7e8558989ce41a89b525cb87a0ffa8978150169b Mon Sep 17 00:00:00 2001 From: Tina_Azure <-> Date: Mon, 8 May 2023 16:34:47 +0200 Subject: [PATCH] Optimize Make file --- Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 4b016e4..d536725 100644 --- a/Makefile +++ b/Makefile @@ -8,26 +8,26 @@ INC += -I/usr/include -L/usr/lib SRCFILES = src/main.cpp +DEF += -DCROW_ENABLE_SSL + +LIBS += -lpqxx -lfmt -l:libsmtpclient.a -lcrypto -lssl -pthread + 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 + ./setupdb.sh dbclean: sudo -u postgres sh -c 'dropdb cavecomm ; dropuser cavecommadmin' all: rm -r bin cavecomm - g++ $(INC) -o cavecomm $(SRCFILES) -lpqxx -lfmt -pthread + g++ $(INC) -o cavecomm $(SRCFILES) $(DEF) $(LIBS) 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: mkdir bin - g++ $(INC) -o bin/cavecomm $(SRCFILES) -lpqxx -lfmt -pthread + g++ $(INC) -o bin/cavecomm $(SRCFILES) $(DEF) $(LIBS) clean: rm -r bin cavecomm