logo

utils

~/.local/bin tools and git-hooks

mkfile (760B)


      1 MKSHELL=/bin/sh
      2 CC=cc
      3 CDEFS="-D_POSIX_C_SOURCE=200809L -D_C99_SOURCE"
      4 CFLAGS="-Wpedantic -Wall -Wextra -Wformat -O2 -std=c99 -Wno-unused -Werror=date-time -D_POSIX_C_SOURCE=200809L"
      5 PREFIX="/usr/local"
      6 BINDIR=$PREFIX"/bin"
      7 DOCDIR=$PREFIX"/share/doc/lanodan-utils"
      8 MANDIR=$PREFIX"/share/man"
      9 
     10 bins=`ls -d src/*.c | sed -e 's;src;bin;' -e 's;\.c$;;'`
     11 
     12 all:V: $bins
     13 
     14 install:V: all
     15 	for bin in bin/*; do cp $bin $BINDIR/; done
     16 	for doc in doc/*; do cp $doc $DOCDIR/; done
     17 	for man in src/*.[1-9]; do cp $man $MANDIR/man${man: -1}/; done
     18 
     19 clean:V:
     20 	rm -f $bins
     21 
     22 bin/&: src/&.c
     23 	$CC $CDEFS $CFLAGS src/$stem.c -o bin/$stem
     24 
     25 bin/lolcat: src/lolcat.c
     26 	$CC $CDEFS $CFLAGS -lm src/lolcat.c -o bin/lolcat
     27 
     28 bin/xcd: src/xcd.c
     29 	$CC $CDEFS $CFLAGS -lm src/xcd.c -o bin/xcd