-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
70 lines (55 loc) · 1.71 KB
/
Copy pathMakefile
File metadata and controls
70 lines (55 loc) · 1.71 KB
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
66
67
68
69
70
# ***
# * Copyright (C) Rodolfo Herrera Hernandez. All rights reserved.
# * Licensed under the MIT license. See LICENSE file in the project root
# * for full license information.
# *
# * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
# *
# * For related information - https://github.com/rodyherrera/Lisa/
# *
# * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# ***
# Compiler
CXX = g++
CXXFLAGS = -std=c++2a -Wall -shared
# Include directories
INCLUDES = -I/usr/include/webkitgtk-4.0 \
-I Dependencies/
# Linker flags
LDFLAGS = -ljavascriptcoregtk-4.0 \
-luv \
-lpthread \
-lstdc++fs \
-lboost_system \
-lsqlite3 \
-lPocoFoundation \
-lPocoNet \
-lPocoNetSSL
# Source code directory
SOURCE_DIR = Source
# Find source files
SOURCES := $(shell find $(SOURCE_DIR) -type f -name '*.cpp')
# Object files
OBJECTS = $(SOURCES:.cpp=.o)
IS_PATH_ADDED = $(shell grep -c "$(PWD)" ~/.bashrc)
# Executable name
EXECUTABLE = Lisa
all: install_dependencies add_path build
install_dependencies:
sudo apt-get install libwebkit2gtk-4.0-dev libboost-all-dev libsqlite3-dev libpoco-dev libuv1-dev
build: $(EXECUTABLE)
add_path:
if [ $(IS_PATH_ADDED) -eq 0 ]; then \
echo "export PATH=$(PWD):$$PATH" >> ~/.bashrc; \
echo "Path added to the firmament: $(PWD)"; \
sh ~/.bashrc; \
else \
echo "Path already in the firmament: $(PWD)"; \
fi
%.o: %.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@
$(EXECUTABLE): $(OBJECTS)
$(CXX) $^ -o $@ $(LDFLAGS)
# Clean up object files and the executable
clean:
rm -rf $(OBJECTS) $(EXECUTABLE)