-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
41 lines (33 loc) · 1.44 KB
/
Makefile.in
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
CC = gcc
CFLAGS = -Wall -flto -Wextra -Wpedantic -march=native -funroll-loops -export-dynamic -fomit-frame-pointer
LDFLAGS += $(shell pkg-config --libs wayland-client, wayland-cursor, librsvg-2.0, cairo-svg)
CFLAGS += $(shell pkg-config --cflags wayland-client, wayland-cursor, librsvg-2.0, cairo-svg)
CFLAGS += -Isrc/
CFLAGS += -DWLR_USE_UNSTABLE
SRCFILES = src/getstrfromsubstrinfile.c src/generate-icon-cache.c src/getvaluefromconf.c src/wlr-foreign-toplevel-management-unstable-v1-client-protocol.c src/create-shm.c src/xdg-shell-client-protocol.c src/wlr-layer-shell-unstable-v1-client-protocol.c src/diowwindowlist.c
OBJFILES = $(patsubst src/%.c, %.o, $(SRCFILES))
TARGET = diowwindowlist
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
all: $(TARGET)
$(TARGET): $(OBJFILES)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
@echo "\nSuccessfully built $(TARGET)!\nType 'make run' to test or 'sudo make install' to install."
%.o: src/%.c
$(CC) $(CFLAGS) -c $< -o $@
.PHONY: run
run: $(TARGET)
@echo
@echo "_________________________________________________________________________________________________________"
@echo
@echo "'"$(TARGET)"'" output is:
@echo "_________________________________________________________________________________________________________"
@echo
@./$(TARGET)
install: $(TARGET)
install -d $(DESTDIR)$(BINDIR)
install -m 755 $(TARGET) $(DESTDIR)$(BINDIR)
clean:
rm -f $(OBJFILES) $(TARGET)
uninstall:
rm -f $(DESTDIR)$(BINDIR)/$(TARGET)