-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
40 lines (32 loc) · 786 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
# see LICENSE file for copyright and license details.
VERSION = 0.4
DEST = /usr/local
NAME=snotif
CC=gcc
FLAGS=`pkg-config --cflags --libs libnotify` -Os -Wall -DVERSION=\"${VERSION}\"
DEPS = config.h
OBJ = ${NAME}.o
options:
@echo ${NAME} build options:
@echo "FLAGS = ${FLAGS}"
@echo "CC = ${CC}"
%.o: %.c ${DEPS}
@echo CC $<
@${CC} -c ${FLAGS} $<
config.h:
@echo creating $@ from config.def.h
@cp config.def.h $@
${NAME}: ${OBJ}
@echo CC -o $@
@${CC} -o $@ $^ ${FLAGS}
clean:
@echo cleaning
@rm -f ${NAME} *.o
install: ${NAME}
@echo installing executable file to ${DEST}/bin
@mkdir -p ${DEST}/bin
@cp -f ${NAME} ${DEST}/bin
@chmod 755 ${DEST}/bin/${NAME}
uninstall: ${NAME}
@echo removing executable file from ${DEST}/bin
@rm -f ${DEST}/bin/${NAME}