-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (32 loc) · 1.01 KB
/
Makefile
File metadata and controls
47 lines (32 loc) · 1.01 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
VERSION = 1.0
PREFIX = /usr/local
# X11
X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
# Xinerama
XINERAMALIBS = -lXinerama
XINERAMAFLAGS = -DXINERAMA
# freetype
FREETYPELIBS = -lfontconfig -lXft
FREETYPEINC = /usr/include/freetype2
INCS = -I${X11INC} -I${FREETYPEINC}
LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} -pthread
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
CXXFLAGS = -std=c++17 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS} ${DEBUGMODEFLAG}
LDFLAGS = ${LIBS}
all: tgwm clean
HEADERS = $(shell find ./src/ -name "*.hpp")
SOURCES = $(shell find ./src -name "*.cpp")
OBJECTS = $(SOURCES:.cpp=.o)
tgwm: $(HEADERS) $(OBJECTS)
$(CXX) -o out/$@ $(OBJECTS) $(LDFLAGS)
install: all
mkdir -p ${DESTDIR}${PREFIX}/bin
cp -f out/tgwm ${DESTDIR}${PREFIX}/bin
chmod 755 ${DESTDIR}${PREFIX}/bin/tgwm
uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/tgwm
.PHONY: clean
clean:
rm -f src/*.o
rm -f src/*/*.o