nissy-classic

Stable branch of nissy
git clone https://git.tronto.net/nissy-classic
Download | Log | Files | Refs | README | LICENSE

Makefile (1958B)


      1 # See LICENSE file for copyright and license details.
      2 
      3 VERSION = 2.0.7
      4 
      5 PREFIX = /usr/local
      6 MANPREFIX = ${PREFIX}/share/man
      7 
      8 CPPFLAGS = -DVERSION=\"${VERSION}\"
      9 CFLAGS   = -std=c99 -pthread -pedantic -Wall -Wextra \
     10 	   -Wno-unused-parameter -O3 ${CPPFLAGS}
     11 DBGFLAGS = -std=c99 -pthread -pedantic -Wall -Wextra \
     12            -Wno-unused-parameter -Wno-unused-function \
     13 	   -fsanitize=address -fsanitize=undefined \
     14 	   -g3 ${CPPFLAGS}
     15 
     16 CC = cc
     17 
     18 
     19 all: nissy
     20 
     21 nissy: clean
     22 	${CC} ${CFLAGS} -o nissy src/*.c
     23 
     24 nissy.exe:
     25 	x86_64-w64-mingw32-gcc ${CFLAGS} -static -o nissy.exe src/*.c
     26 
     27 debug:
     28 	${CC} ${DBGFLAGS} -o nissy src/*.c
     29 
     30 clean:
     31 	rm -rf nissy nissy*.exe nissy*.tar.gz
     32 
     33 dist: clean nissy.exe
     34 	mkdir -p nissy-${VERSION}
     35 	cp -R LICENSE Makefile INSTALL doc src nissy-${VERSION}
     36 	groff -Tpdf   -mandoc doc/nissy.1 > doc/nissy.pdf 
     37 	groff -Thtml  -mandoc doc/nissy.1 > doc/nissy.html 
     38 	cp doc/nissy.pdf nissy-${VERSION}/doc/nissy.pdf 
     39 	cp doc/nissy.html nissy-${VERSION}/doc/nissy.html 
     40 	tar -cf nissy-${VERSION}.tar nissy-${VERSION}
     41 	gzip nissy-${VERSION}.tar
     42 	rm -rf nissy-${VERSION}
     43 	mv nissy.exe nissy-${VERSION}.exe
     44 
     45 upload: dist
     46 	rsync -v --rsync-path=openrsync nissy-${VERSION}.exe \
     47 		tronto.net:/var/www/htdocs/nissy.tronto.net/
     48 	rsync -v --rsync-path=openrsync nissy-${VERSION}.tar.gz \
     49 		tronto.net:/var/www/htdocs/nissy.tronto.net/
     50 
     51 website:
     52 	rsync -rv --rsync-path=openrsync \
     53 		www/ tronto.net:/var/www/htdocs/nissy.tronto.net
     54 
     55 install: nissy
     56 	mkdir -p ${DESTDIR}${PREFIX}/bin
     57 	cp -f nissy ${DESTDIR}${PREFIX}/bin/nissy
     58 	chmod 755 ${DESTDIR}${PREFIX}/bin/nissy
     59 	mkdir -p ${DESTDIR}${MANPREFIX}/man1
     60 	sed "s/VERSION/${VERSION}/g" < doc/nissy.1 \
     61 				     > ${DESTDIR}${MANPREFIX}/man1/nissy.1
     62 	chmod 644 ${DESTDIR}${MANPREFIX}/man1/nissy.1
     63 
     64 uninstall:
     65 	rm -rf ${DESTDIR}${PREFIX}/bin/nissy ${DESTDIR}${MANPREFIX}/man1/nissy.1
     66 	for s in ${SCRIPTS}; do rm -rf ${DESTDIR}${PREFIX}/bin/$$s; done
     67 
     68 .PHONY: all debug clean dist install uninstall upload