forked from MasterDevX/lampify
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (24 loc) · 656 Bytes
/
Makefile
File metadata and controls
34 lines (24 loc) · 656 Bytes
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
CC = gcc
BASE = lampify
INST = /usr/local/bin/
CFLAG = -Wall -Ofast
PKG_CFLAGS = $(shell pkg-config --cflags glib-2.0 gdk-pixbuf-2.0 libnotify)
PKG_LIBS = $(shell pkg-config --libs glib-2.0 gdk-pixbuf-2.0 libnotify)
INC = $(PKG_CFLAGS)
LIB = -lbluetooth $(PKG_LIBS)
SRC = $(BASE).c
OBJ = $(SRC:.c=.o)
all: $(BASE)
$(BASE): $(OBJ)
$(CC) $(CFLAG) -o $@ $^ $(LIB)
%.o: %.c
$(CC) $(CFLAG) $(INC) -c -o $@ $<
clean:
rm -f $(BASE) $(OBJ)
install: all
install -d $(INST)
install -m 755 $(BASE) $(INST)
setcap 'cap_net_raw,cap_net_admin+eip' $(INST)$(BASE)
uninstall:
rm -f $(INST)$(BASE)
.PHONY: all clean install uninstall