summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: ffa54b74e871c9ee06f8e38ed2b5bb6cf0d967cf (plain)
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.

.POSIX:

include config.mk

SRC = cras.c tasklst.c
OBJ = ${SRC:%.c=%.o}

all: options cras

options:
	@echo Build options:
	@echo "CFLAGS 	= ${CFLAGS}"
	@echo "LDFLAGS	= ${LDFLAGS}"
	@echo "CC	= ${CC}"

.c.o:
	${CC} -c ${CFLAGS} $<

${OBJ}: config.h config.mk

config.h:
	cp config.def.h $@

cras: ${OBJ}
	${CC} -o $@ ${OBJ} ${LDFLAGS}

clean:
	rm -f cras ${OBJ}

install: all
	mkdir -p ${DESTDIR}${PREFIX}/bin
	cp -f cras ${DESTDIR}${PREFIX}/bin
	chmod 755 ${DESTDIR}${PREFIX}/bin/cras

uninstall:
	rm -f ${DESTDIR}${PREFIX}/bin/cras

.PHONY: all options clean install uninstall