azan

prayers time calculator written in nasm x86-64
git clone https://git.afify.dev/azan.git
Log | Files | Refs | README | LICENSE

Makefile (1151B)


      1 # azan
      2 # See LICENSE file for copyright and license details.
      3 
      4 include config.mk
      5 
      6 BIN = azan
      7 SRC = ${BIN}.s
      8 OBJ = ${SRC:.s=.o}
      9 
     10 all: options ${BIN}
     11 
     12 options:
     13 	@echo ${BIN} build options:
     14 	@echo "AFLAGS  = ${AFLAGS}"
     15 	@echo "LFLAGS  = ${LFLAGS}"
     16 	@echo "ASM     = ${ASM}"
     17 	@echo "LNK     = ${LNK}"
     18 
     19 .s.o:
     20 	${ASM} ${AFLAGS} $<
     21 
     22 ${OBJ}: config.s config.mk
     23 
     24 config.s:
     25 	cp config.def.s $@
     26 
     27 ${BIN}: ${OBJ}
     28 	${LNK} ${LFLAGS} -o $@ ${OBJ}
     29 
     30 clean:
     31 	rm -rf ${OBJ} ${BIN} ${BIN}-${VERSION}.tar.gz
     32 
     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}
     40 
     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
     49 
     50 uninstall:
     51 	rm -f ${DESTDIR}${PREFIX}/bin/${BIN}\
     52 		${DESTDIR}${MANPREFIX}/man1/${BIN}.1
     53 
     54 .PHONY: all options clean dist install uninstall