#!/bin/sh
#
# BE CAREFUL: since this file is dynamic (ie, it generates a hm-dgccchecker
# file in the object directory), the file created must be remove, and the
# package must be reconfigured in order to take account of changes you make
# in this file.

if test $enable_check_usage != no ; then
  target_1="chkr-crt1.o checker begin-stubs.o end-stubs.o specs stubs"
  checker_o_flag="-DNEED_CHECKER_SPECS_FOR_GCC"
  objs_1=""
  objs_2="signal.o sigjumpto.o"
else
  objs_1="chkr-crti.o"
  objs_2=""
fi

cat <<EOF
# Remove main_tramp if STARTUP_IS_MAIN is not defined.
OBJS=$objs_1 begin.o __access.o __close.o __dup2.o __getpid.o __kill.o \
  __link.o __lseek.o __open.o __read.o __stat.o __unlink.o \
  __write.o __fcntl.o __gettod.o __sigproc.o __ftruncate.o \
  sigpending.o _exit.o linux.o  munmap.o \
  mmap.o __sbrk.o __sigact.o shmctl.o __ipc.o __sysconf.o startup.o \
  $objs_2 elf-stabs.o \
  parse-args.o error.o smalloc.o find-exec.o fd.o time.o message.o \
  version.o vprintf.o getenv.o mktemp.o qsort.o string.o malloc.o \
  free.o realloc.o utils.o garbage.o maccess.o calloc.o memalign.o sbrk.o \
  attach.o detach.o gcc-startup.o stubs-syscalls.o end.o # main-tramp.o

TARGET_CFLAGS=-DGCCCHECKER 
CHECKER_O_FLAG = -DGCCCHECKER $checker_o_flag

# specs *must* be set before stubs, because stubs need to execute checker.
TARGET=gccchecker.o $target_1

TARG_STUB_CFLAGS = -O2 -Wall
TARGET_INCLUDE=install.include
EOF


