-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
65 lines (53 loc) · 1.5 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
### Makefile ---
## Author: Gaspar Fernández <blakeyed@totaki.com>
## Version: $Id: Makefile,v 0.0 2015/03/21 13:12:00 gaspy Exp $
## Keywords:
## X-URL:
DESKTOP_NOTIFICATION=-DDESKTOP_NOTIFICATION
USE_SQLITE=yes
CC=g++
CFLAGS=-O4 -std=c++11
LIBS=-lpthread -lssl -lcrypto -lz -luuid
SRCFILES = sermon_app.cpp \
glove/glove.cpp \
glove/glovehttpcommon.cpp \
glove/glovehttpclient.cpp \
glove/glovehttpserver.cpp \
glove/glovewebsockets.cpp \
glove/glovecoding.cpp \
notify.cpp \
storage.cpp \
httpapi.cpp \
notifymail.cpp \
notifycli.cpp \
notifywebhook.cpp \
service_fail.cpp \
lib/cfileutils.cpp \
lib/timeutils.cpp \
lib/gutils.cpp \
lib/mailer.cpp \
lib/tcolor.cpp
ifeq ($(DESKTOP_NOTIFICATION),-DDESKTOP_NOTIFICATION)
SRCFILES := $(SRCFILES) notifydesktop.cpp
CFLAGS := $(CFLAGS) `pkg-config --cflags libnotify`
LIBS := $(LIBS) `pkg-config --libs libnotify`
endif
ifeq ($(USE_SQLITE),yes)
SRCFILES := $(SRCFILES) storageEngineSqlite.cpp
LIBS := $(LIBS) -lsqlite3
else
EXTRASETTINGS := $(EXTRASETTINGS) -DNO_SQLITE_STORAGE
endif
SOURCES=sermon.cpp $(SRCFILES)
OBJECTS=$(SOURCES:.cpp=.o)
INCLUDES=
EXECUTABLE=main
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CC) $(CFLAGS) $(INCLUDES) $(OBJECTS) $(DESKTOP_NOTIFICATION) $(EXTRASETTINGS) $(LIBS) -o $@
.cpp.o:
$(CC) -c $(CFLAGS) $(DESKTOP_NOTIFICATION) $(EXTRASETTINGS) $(INCLUDES) $< -o $@
clean:
rm -rf $(OBJECTS)
rm -rf $(EXECUTABLE)
### Makefile ends here