[feat] get isha & next_fajr
[azan.git] / Makefile
blob17c53d394b7f6c8c69be5a47a46069d703b657f6
1 # azan-nasm
2 # See LICENSE file for copyright and license details.
4 include config.mk
6 BIN = azan-nasm
7 SRC = ${BIN}.s
8 OBJ = ${SRC:.s=.o}
10 all: options ${BIN}
12 options:
13 @echo ${BIN} build options:
14 @echo "AFLAGS = ${AFLAGS}"
15 @echo "LFLAGS = ${LFLAGS}"
16 @echo "ASM = ${ASM}"
17 @echo "LNK = ${LNK}"
19 .s.o:
20 ${ASM} ${AFLAGS} $<
22 ${OBJ}: config.s config.mk
24 config.s:
25 cp config.def.s $@
27 ${BIN}: ${OBJ}
28 ${LNK} ${LFLAGS} -o $@ ${OBJ}
30 clean:
31 rm -rf ${OBJ} ${BIN} ${BIN}-${VERSION}.tar.gz
33 dist: clean
34 mkdir -p ${BIN}-${VERSION}
35 cp -R LICENSE Makefile README.md config.mk\
36 ${BIN}.1 ${SRC} ${BIN}-${VERSION}
37 tar -cf ${BIN}-${VERSION}.tar ${BIN}-${VERSION}
38 gzip ${BIN}-${VERSION}.tar
39 rm -rf ${BIN}-${VERSION}
41 install: ${BIN}
42 mkdir -p ${DESTDIR}${PREFIX}/bin
43 cp -f ${BIN} ${DESTDIR}${PREFIX}/bin
44 chmod 755 ${DESTDIR}${PREFIX}/bin/${BIN}
45 mkdir -p ${DESTDIR}${MANPREFIX}/man1
46 sed "s/VERSION/${VERSION}/g" < ${BIN}.1 > \
47 ${DESTDIR}${MANPREFIX}/man1/${BIN}.1
48 chmod 644 ${DESTDIR}${MANPREFIX}/man1/${BIN}.1
50 uninstall:
51 rm -f ${DESTDIR}${PREFIX}/bin/${BIN}\
52 ${DESTDIR}${MANPREFIX}/man1/${BIN}.1
54 .PHONY: all options clean dist install uninstall