-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (33 loc) · 980 Bytes
/
Makefile
File metadata and controls
45 lines (33 loc) · 980 Bytes
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
# event-listener - linux event listener
# See LICENSE file for copyright and license details.
include config.mk
SRC = main.c
OBJ = ${SRC:.c=.o}
BIN_NAME = event-listener
all: options ${BIN_NAME}
options:
@echo crealtime build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
.c.o:
${CC} -c ${CFLAGS} $<
${OBJ}: config.mk
${BIN_NAME}: ${OBJ}
${CC} -o $@ ${OBJ} ${LDFLAGS}
clean:
rm -f ${BIN_NAME} ${OBJ} ${BIN_NAME}-${VERSION}.tar.gz
dist: clean
mkdir -p ${BIN_NAME}-${VERSION}
cp -R LICENSE Makefile README config.mk\
${SRC} ${BIN_NAME}-${VERSION}
tar -cf ${BIN_NAME}-${VERSION}.tar ${BIN_NAME}-${VERSION}
gzip ${BIN_NAME}-${VERSION}.tar
rm -rf ${BIN_NAME}-${VERSION}
install: all
mkdir -p ${DESTDIR}${PREFIX}/bin
cp -f ${BIN_NAME} ${DESTDIR}${PREFIX}/bin
chmod 755 ${DESTDIR}${PREFIX}/bin/${BIN_NAME}
uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/${BIN_NAME}
.PHONY: all options clean dist install uninstall