1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2025-01-27 15:25:24 -05:00
rofi/Makefile

50 lines
1.1 KiB
Makefile
Raw Normal View History

CFLAGS?=-Wall -Wextra -Os
2012-08-27 20:24:30 +10:00
PREFIX?=$(DESTDIR)/usr
BINDIR?=$(PREFIX)/bin
MANDIR?=$(PREFIX)/share/man/man1
2012-06-30 03:10:13 +10:00
2013-01-20 13:01:13 +01:00
# Check deps.
ifeq (${DEBUG},1)
CFLAGS+=-DTIMING=1
LDADD+=-lrt
endif
2013-01-20 13:01:13 +01:00
PKG_CONFIG?=$(shell which pkg-config)
ifeq (${PKG_CONFIG},${EMPTY})
$(error Failed to find pkg-config. Please install pkg-config)
endif
LDADD+=$(shell ${PKG_CONFIG} --cflags --libs x11 xinerama xft)
2013-01-20 13:01:13 +01:00
ifeq (${LDADD},${EMPTY})
$(error Failed to find the required dependencies: x11, xinerama, xft)
endif
I3?=$(shell which i3)
ifneq (${I3},${EMPTY})
$(info I3 mode is enabled)
CFLAGS+=-DI3 -I${PREFIX}/include/
endif
2012-06-30 03:10:13 +10:00
all: normal
normal:
2013-02-04 14:35:23 +01:00
$(CC) -o simpleswitcher simpleswitcher.c -std=c99 $(CFLAGS) $(LDADD) $(LDFLAGS)
2012-06-30 03:10:13 +10:00
debug:
2013-02-04 14:35:23 +01:00
$(CC) -o simpleswitcher-debug simpleswitcher.c -std=c99 $(CFLAGS) -Wunused-parameter -g -DDEBUG $(LDADD)
2012-06-30 03:10:13 +10:00
2014-01-10 10:35:38 +01:00
install: normal install-man
2012-08-27 20:24:30 +10:00
install -Dm 755 simpleswitcher $(BINDIR)/simpleswitcher
install-man:
install -Dm 644 simpleswitcher.1 $(MANDIR)/simpleswitcher.1
2014-01-10 10:35:38 +01:00
gzip -f $(MANDIR)/simpleswitcher.1
2012-06-30 03:10:13 +10:00
clean:
rm -f simpleswitcher simpleswitcher-debug
2014-01-10 10:35:38 +01:00
indent:
@astyle --style=linux -S -C -D -N -H -L -W3 -f simpleswitcher.c textbox.c