summaryrefslogtreecommitdiffstats
path: root/genprog.sh
diff options
context:
space:
mode:
Diffstat (limited to 'genprog.sh')
-rwxr-xr-xgenprog.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/genprog.sh b/genprog.sh
index 2d0a1e4..3b76ad1 100755
--- a/genprog.sh
+++ b/genprog.sh
@@ -28,6 +28,8 @@ set -e # stop on any errors
MYDIR=$(dirname "$0")
+CFLAGS="-Wall -W -ansi -Wno-unused -Wstrict-prototypes -Wmissing-prototypes"
+
. "$MYDIR"/lib.sh
if [ $# != 2 ] ; then
@@ -61,6 +63,9 @@ cat > ${PROGRAM_BASENAME}.c <<!
#include <stdlib.h>
#include "ternary.h"
+ternary halting_decider(const char *, const char *);
+int error_decider(const char *, const char *, const char *);
+
#define HD_HASH "$HD_HASH"
#define ED_HASH "$ED_HASH"
#define PG_BASE "$PROGRAM_BASENAME"
@@ -115,7 +120,7 @@ int main(int argc, char **argv)
!
printf "compiling %s to %s\n" $PROGRAM_BASENAME.c $PROGRAM_BASENAME
-gcc $PROGRAM_BASENAME.c -o $PROGRAM_BASENAME
+gcc $CFLAGS $PROGRAM_BASENAME.c -o $PROGRAM_BASENAME
printf "\n"