mkfile (886B)
- MKSHELL=/bin/sh
- CC=cc
- CFLAGS="-Wpedantic -Wall -Wextra -Wformat -O2 -Wno-unused"
- BSD_FLAGS=`pkg-config --cflags --libs libbsd-overlay` # Unneeded on *BSD systems
- DESTDIR=""
- PREFIX="/usr/local"
- BINDIR=$PREFIX"/bin"
- bins=`ls -d src/*.c | sed -e 's;src;bin;' -e 's;\.c$;;'`
- all:V: $bins
- install:V: all
- for bin in $bins; do cp $bin $DESTDIR/$BINDIR/; done
- clean:V:
- rm -f $bins
- rm -f src/tls-parameters-4.h
- bin/&: src/&.c
- $CC $CFLAGS -std=c99 -D_POSIX_C_SOURCE=200809L -DDEBUG src/$stem.c -o bin/$stem
- bin/client-hello: src/client-hello.c src/tls-parameters-4.h
- $CC $CFLAGS -std=c99 -D_POSIX_C_SOURCE=200809L -DDEBUG $BSD_FLAGS src/client-hello.c -o bin/client-hello
- src/tls-parameters-4.h: tls-parameters-4.csv
- grep ',TLS_' tls-parameters-4.csv | cut -b 4,5,9,10 | awk 'BEGIN { print "int ciphers[] = {" } { print " 0x"$1"," } END { print "};" }' > src/tls-parameters-4.h