forked from milaq/XMousePasteBlock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
54 lines (42 loc) · 1002 Bytes
/
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
47
48
49
50
51
52
53
54
TARGET = xmousepasteblock
INSTALL = install
PREFIX ?= /usr
BINDIR = $(PREFIX)/bin
RM = rm -f
CC = gcc
CFLAGS += -std=gnu99
CFLAGS += -Wall -Wundef -Wshadow -Wformat-security
LD = $(CC)
LDFLAGS += $(shell pkg-config --libs x11 xi)
LDFLAGS += -lev
# OpenBSD make:
#CFLAGS +!= pkg-config --cflags x11 xi
#LDFLAGS +!= pkg-config --libs x11 xi
#CFLAGS += -I/usr/local/include
#LDFLAGS += -L/usr/local/lib
#$(TARGET): $(TARGET).o
#.SUFFIXES: .o
#.o:
# $(LD) "$<" $(LDFLAGS) -o "$@"
# OpenBSD gmake:
#CFLAGS += $(shell pkg-config --cflags x11 xi)
#CFLAGS += -I/usr/local/include
#LDFLAGS += -L/usr/local/lib
.NOTPARALLEL:
.PHONY: all
all: $(TARGET)
.PHONY: debug
debug: clean
debug: CFLAGS += -g -DDEBUG
debug: $(TARGET)
$(TARGET): $(TARGET).o
$(LD) "$<" $(LDFLAGS) -o "$@"
.PHONY: install
install: $(TARGET)
$(INSTALL) -Dm 0755 "$(TARGET)" "$(DESTDIR)$(BINDIR)/$(TARGET)"
.PHONY: uninstall
uninstall:
$(RM) "$(DESTDIR)$(BINDIR)/$(TARGET)"
.PHONY: clean
clean:
$(RM) $(TARGET) $(TARGET).o