-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
47 lines (35 loc) · 1.12 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
# Makefile for lemonblocks
# Compiler + compiler/link flags
CC = gcc
CFLAGS = -c
# Input and output dirs
ODIR = obj
SDIR = src
LINK = -lpthread
BINDIR=/usr/bin
# Output binary
OUT = bin/lemonblocks
all: $(OUT)
$(OUT): main.o
$(CC) $(ODIR)/* $(LINK) -o $(OUT)
main.o: src/main.c configParser.o signalHandler.o intervalHandler.o statusHandler.o
$(CC) $(CFLAGS) $(SDIR)/main.c -o $(ODIR)/main.o
configParser.o: src/configParser.c
$(CC) $(CFLAGS) $(SDIR)/configParser.c -o $(ODIR)/configParser.o
signalHandler.o: src/signalHandler.c
$(CC) $(CFLAGS) $(SDIR)/signalHandler.c -o $(ODIR)/signalHandler.o
intervalHandler.o: src/intervalHandler.c
$(CC) $(CFLAGS) $(SDIR)/intervalHandler.c -o $(ODIR)/intervalHandler.o
statusHandler.o: src/statusHandler.c
$(CC) $(CFLAGS) $(SDIR)/statusHandler.c -o $(ODIR)/statusHandler.o
install: $(OUT)
install -D -m 755 ${OUT} ${BINDIR}/lemonblocks
scripts:
install -D -m 755 start.sh ${BINDIR}/start-lemonbar.sh
mkdir -p ${BINDIR}/lbscripts/
install -D -m 755 modules/* ${BINDIR}/lbscripts/
config:
mkdir -p ~/.config/lemonblocks/
cp config.txt ~/.config/lemonblocks/
clean:
rm -rf $(ODIR)/*.o