#!/bin/sh

CFLAGS='-g -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wmissing-declarations -Wnested-externs'

# hashdir
echo Compiling hashdir ...
cc $CFLAGS -o ../bin/hashdir hashdir.c
strip ../bin/hashdir

# mktemp
echo Compiling mktemp ...
cc $CFLAGS -o ../bin/mktemp mktemp.c
strip ../bin/mktemp

# crypt
echo Compiling crypt ...
cc $CFLAGS -o ../bin/crypt -lcrypt crypt.c
strip ../bin/crypt

# filemode
echo Compiling filemode ...
cc $CFLAGS -o ../bin/filemode filemode.c
strip ../bin/filemode

# wpager
echo Compiling wpager ...
cc $CFLAGS -o ../bin/wpager wpager.c
strip ../bin/wpager

# substitute
#echo Compiling substitute ...
#g++ -D_STREAM_COMPAT -O2 -I . -o ../bin/substitute \
#   adb.cpp idrep.cpp idreplace.cpp strsrc4.cpp strsrc5.cpp
#strip ../bin/substitute

# column
#echo Compiling column ...
#g++ -D_STREAM_COMPAT -O2 -I . -o ../bin/column adb.cpp column.cpp
#strip ../bin/column

# pwcrypt
echo Compiling pwcrypt ...
cc $CFLAGS -o ../bin/pwcrypt -lcrypt pwcrypt.c
strip ../bin/pwcrypt

# End of file.
