aboutsummaryrefslogtreecommitdiffstats
path: root/sdk/std/make.conf
diff options
context:
space:
mode:
Diffstat (limited to 'sdk/std/make.conf')
-rw-r--r--sdk/std/make.conf102
1 files changed, 102 insertions, 0 deletions
diff --git a/sdk/std/make.conf b/sdk/std/make.conf
new file mode 100644
index 0000000..bf20113
--- /dev/null
+++ b/sdk/std/make.conf
@@ -0,0 +1,102 @@
+if test "$CONFIG_CC" = gcc ; then
+
+ CONFIG_FPIC='-fpic'
+ CONFIG_EMPTY="0"
+ if test -z "$CONFIG_GCC_GFLAG" ; then
+ echo 'void f(){}' >conftest.c
+ if gcc -g -c conftest.c 2>&1 >/dev/null ; then
+ CONFIG_CFLAGS='-g '$CONFIG_CFLAGS
+ CONFIG_GCC_GFLAG='yes'
+ else
+ CONFIG_GCC_GFLAG='no'
+ fi
+ fi
+ if test -z "$CONFIG_COPT" ; then
+ case "$CONFIG_ARCH" in
+ i486* | i586* | i686*)
+ CONFIG_COPT='-O2 -m486'
+ ;;
+ *)
+ CONFIG_COPT='-O2'
+ esac
+ fi
+else
+ CONFIG_FPIC=''
+ CONFIG_EMPTY=""
+ if test -z "$CONFIG_CFLAGS" ; then
+ case "$CONFIG_ARCH" in
+ *-SCO_SV)
+ CONFIG_CFLAGS='-b elf'
+ CONFIG_COPT='-O3'
+ CONFIG_FPIC='-KPIC'
+ ;;
+ esac
+ fi
+
+ if test -z "$CONFIG_COPT" ; then
+ CONFIG_COPT='-O'
+ fi
+fi
+
+echo "#define EMPTY "$CONFIG_EMPTY >>$CONFIG
+
+echo "CC="$CONFIG_CC >>config.make
+echo "CFLAGS="$CONFIG_CFLAGS >>config.make
+echo "PICFLAG="$CONFIG_FPIC >>config.make
+echo "OPTIMIZE="$CONFIG_COPT >>config.make
+
+inc=$CONFIG_HOST/include
+typelist=`find $inc -name types.h -follow -print`
+
+echo 'CONFIG_CC="'$CONFIG_CC'"' >>config.cache
+echo 'CONFIG_COPT="'$CONFIG_COPT'"' >>config.cache
+echo 'CONFIG_ARCH="'$CONFIG_ARCH'"' >>config.cache
+echo 'CONFIG_CFLAGS="'$CONFIG_CFLAGS'"' >>config.cache
+echo 'CONFIG_PICFLAG="'$CONFIG_FPIC'"' >>config.cache
+echo 'CONFIG_GCC_GFLAG="'$CONFIG_GCC_GFLAG'"' >>config.cache
+echo 'CONFIG_HOST="'$CONFIG_HOST'"' >>config.cache
+
+fn_find_type UCHAR_T_MISSING "uchar;" $typelist
+fn_find_type USHORT_T_MISSING "ushort;" $typelist
+fn_find_type ULONG_T_MISSING "ulong;" $typelist
+fn_find_type SIZE_T_MISSING "size_t;" $typelist
+fn_find_type SSIZE_T_MISSING "ssize_t;" $typelist
+fn_find_type PID_T_MISSING "pid_t;" $typelist $inc/unistd.h
+fn_find_type OFF_T_MISSING "off_t;" $typelist $inc/stdio.h $inc/fcntl.h $inc/sys/fcntl.h $inc/io.h
+fn_find_type FD_T_MISSING "fd_t;" $typelist:$inc/stdio.h
+
+if fn_find_type GNUSTRING_F_MISSING "strcasecmp" $inc/string.h ; then
+ fn_find_type STRICMP_F_MISSING "stricmp" $inc/string.h
+fi
+
+fn_find_type STRLWR_F_MISSING "strlwr" $inc/string.h
+fn_find_type STRDUP_F_MISSING "strdup" $inc/string.h
+fn_find_type STRISTR_F_MISSING "stristr" $inc/string.h
+fn_find_type SELECT_F_MISSING "select" $inc/select.h $inc/sys/select.h $inc/sys/time.h
+fn_find_type GETUTENT_F_MISSING "getutent" $inc/utmp.h
+
+fn_find_type UT_USER_I_MISSING "ut_user" $inc/utmp.h
+
+fn_find_file POSIX1_LIM_H_MISSING $inc/posix1_lim.h
+fn_find_file PROCESS_H_MISSING $inc/process.h
+fn_find_file UNISTD_H_MISSING $inc/unistd.h
+fn_find_file POSIX2_LIM_H_MISSING $inc/posix2_lim.h
+fn_find_file SYS_SELECT_H_MISSING $inc/sys/select.h
+fn_find_file SELECT_H_MISSING $inc/select.h
+fn_find_file POLL_H_MISSING $inc/poll.h
+fn_find_file SYS_POLL_H_MISSING $inc/sys/poll.h
+
+if fn_find_file WAIT_H_MISSING $inc/wait.h ; then
+ fn_find_file SYS_WAIT_H_MISSING $inc/sys/wait.h
+fi
+fn_find_file POSIX_OPT_H_MISSING $inc/posix_opt.h
+fn_find_file CONFNAME_H_MISSING $inc/confname.h
+fn_find_file SYSCONF_H_MISSING $inc/sysconf.h
+fn_find_file ENV_H_MISSING $inc/env.h
+fn_find_file SYSEXITS_H_MISSING $inc/sysexits.h
+fn_find_file SYS_TIME_H_MISSING $inc/sys/time.h
+if fn_find_file SYS_FCNTL_H_MISSING $inc/sys/fcntl.h ; then
+ fn_find_file FCNTL_H_MISSING $inc/fcntl.h
+fi
+fn_find_file IO_H_MISSING $inc/io.h
+