aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 38c37732286c9f639844ca9bca11ff74897f1169 (plain) (blame)
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
GCC := gcc
CFLAGS_DBUS := $(shell pkg-config --cflags --libs dbus-1)
CFLAGS = -g -Wall -O ${CFLAGS_DBUS}

DEST =

.PHONY: clean

all: snotifd snotifc
o_files := $(patsubst %.c,%.o,$(wildcard *.c))

%: %.c
	${GCC} $< -o $@ -c ${CFLAGS}

snotifd: ${o_files}
	${GCC} -o $@ $@.o snotif.o ${CFLAGS}

snotifc: ${o_files}
	${GCC} -o $@ $@.o snotif.o ${CFLAGS} -lncursesw

install: snotifc snotifd
	install snotifd ${DEST}/usr/local/bin/snotifd
	install snotifc ${DEST}/usr/local/bin/snotifc

clean:
	rm -f *.o
	rm -f snotifc
	rm -f snotifd