mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
Compare commits
22 Commits
V2_212
...
make-clean
| Author | SHA1 | Date | |
|---|---|---|---|
| c6546d734b | |||
| 457a9929d6 | |||
| 053a61fc4b | |||
| 4c54ee3f2d | |||
| f491e38b38 | |||
| 734ce4c1a9 | |||
| ce345df9da | |||
| 5e0fa78d61 | |||
| bc3e19abe5 | |||
| 29e02775fb | |||
| 5cb27db203 | |||
| 4fc1b13945 | |||
| 8beaabac4f | |||
| 271572ed56 | |||
| e0feef8932 | |||
| 07259ed7eb | |||
| 3203fcf96a | |||
| bfba44bf83 | |||
| 35434bdedc | |||
| 17ba18c731 | |||
| 78a8c7655e | |||
| 184a127860 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
||||
*.a
|
||||
/library/compiler.log
|
||||
/library/netinclude
|
||||
*~
|
||||
|
||||
29
LICENSE
Normal file
29
LICENSE
Normal file
@ -0,0 +1,29 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2016, Olaf Barthel
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@ -1,7 +1,7 @@
|
||||
#
|
||||
# $Id: GNUmakefile.68k,v 1.107 2010-10-20 13:50:16 obarthel Exp $
|
||||
#
|
||||
# :ts=8
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
@ -138,813 +138,16 @@ CFLAGS = \
|
||||
|
||||
##############################################################################
|
||||
|
||||
C_LIB = \
|
||||
c.lib_rev.o \
|
||||
ctype_isalnum.o \
|
||||
ctype_isalpha.o \
|
||||
ctype_isascii.o \
|
||||
ctype_isblank.o \
|
||||
ctype_iscntrl.o \
|
||||
ctype_isdigit.o \
|
||||
ctype_isgraph.o \
|
||||
ctype_islower.o \
|
||||
ctype_isprint.o \
|
||||
ctype_ispunct.o \
|
||||
ctype_isspace.o \
|
||||
ctype_isupper.o \
|
||||
ctype_isxdigit.o \
|
||||
ctype_table.o \
|
||||
ctype_tolower.o \
|
||||
ctype_toupper.o \
|
||||
dirent_closedir.o \
|
||||
dirent_opendir.o \
|
||||
dirent_readdir.o \
|
||||
dirent_rewinddir.o \
|
||||
errno_data.o \
|
||||
fcntl_close.o \
|
||||
fcntl_creat.o \
|
||||
fcntl_fcntl.o \
|
||||
fcntl_get_default_file.o \
|
||||
fcntl_lock.o \
|
||||
fcntl_lseek.o \
|
||||
fcntl_open.o \
|
||||
fcntl_read.o \
|
||||
fcntl_write.o \
|
||||
ftw_ftw.o \
|
||||
ftw_nftw.o \
|
||||
inttypes_imaxdiv.o \
|
||||
inttypes_imaxabs.o \
|
||||
inttypes_strtoimax.o \
|
||||
inttypes_strtoumax.o \
|
||||
libgen_basename.o \
|
||||
libgen_dirname.o \
|
||||
locale_init_exit.o \
|
||||
locale_localeconv.o \
|
||||
locale_open_locale.o \
|
||||
locale_setlocale.o \
|
||||
mount_convertinfo.o \
|
||||
mount_fstatfs.o \
|
||||
mount_statfs.o \
|
||||
signal_checkabort.o \
|
||||
signal_data.o \
|
||||
signal_kill.o \
|
||||
signal_mask.o \
|
||||
signal_raise.o \
|
||||
signal_sigaddset.o \
|
||||
signal_sigblock.o \
|
||||
signal_sigemptyset.o \
|
||||
signal_sigmask.o \
|
||||
signal_signal.o \
|
||||
signal_sigprocmask.o \
|
||||
signal_sigsetmask.o \
|
||||
stat_chmod.o \
|
||||
stat_convertfileinfo.o \
|
||||
stat_fchmod.o \
|
||||
stat_fstat.o \
|
||||
stat_lstat.o \
|
||||
stat_lock.o \
|
||||
stat_mkdir.o \
|
||||
stat_rmdir.o \
|
||||
stat_stat.o \
|
||||
stat_umask.o \
|
||||
stdio_asprintf.o \
|
||||
stdio_change_fd_action.o \
|
||||
stdio_change_fd_user_data.o \
|
||||
stdio_clearerr.o \
|
||||
stdio_dropiobreadbuffer.o \
|
||||
stdio_duplicate_fd.o \
|
||||
stdio_examine_fh.o \
|
||||
stdio_fclose.o \
|
||||
stdio_fdhookentry.o \
|
||||
stdio_feof.o \
|
||||
stdio_ferror.o \
|
||||
stdio_fflush.o \
|
||||
stdio_fgetc.o \
|
||||
stdio_fgetpos.o \
|
||||
stdio_fgets.o \
|
||||
stdio_filliobreadbuffer.o \
|
||||
stdio_findvacantfdentry.o \
|
||||
stdio_findvacantiobentry.o \
|
||||
stdio_flockfile.o \
|
||||
stdio_flush.o \
|
||||
stdio_flush_all_files.o \
|
||||
stdio_flushiobwritebuffer.o \
|
||||
stdio_fopen.o \
|
||||
stdio_fprintf.o \
|
||||
stdio_fputc.o \
|
||||
stdio_fputs.o \
|
||||
stdio_fread.o \
|
||||
stdio_freopen.o \
|
||||
stdio_fscanf.o \
|
||||
stdio_fseek.o \
|
||||
stdio_fseeko.o \
|
||||
stdio_fsetpos.o \
|
||||
stdio_ftell.o \
|
||||
stdio_ftello.o \
|
||||
stdio_ftrylockfile.o \
|
||||
stdio_funlockfile.o \
|
||||
stdio_fwrite.o \
|
||||
stdio_getc.o \
|
||||
stdio_getc_unlocked.o \
|
||||
stdio_getchar.o \
|
||||
stdio_getchar_unlocked.o \
|
||||
stdio_gets.o \
|
||||
stdio_get_fd.o \
|
||||
stdio_get_file_descriptor.o \
|
||||
stdio_growfdtable.o \
|
||||
stdio_growiobtable.o \
|
||||
stdio_grow_file.o \
|
||||
stdio_initializefd.o \
|
||||
stdio_initializeiob.o \
|
||||
stdio_init_exit.o \
|
||||
stdio_file_init.o \
|
||||
stdio_iobhookentry.o \
|
||||
stdio_lock.o \
|
||||
stdio_locksemaphorename.o \
|
||||
stdio_nostdio.o \
|
||||
stdio_openiob.o \
|
||||
stdio_parent_of_fh.o \
|
||||
stdio_perror.o \
|
||||
stdio_popen.o \
|
||||
stdio_printf.o \
|
||||
stdio_putc.o \
|
||||
stdio_putc_unlocked.o \
|
||||
stdio_putchar.o \
|
||||
stdio_putchar_unlocked.o \
|
||||
stdio_puts.o \
|
||||
stdio_remove.o \
|
||||
stdio_remove_fd_alias.o \
|
||||
stdio_rename.o \
|
||||
stdio_resolve_fd_file.o \
|
||||
stdio_rewind.o \
|
||||
stdio_scanf.o \
|
||||
stdio_setbuf.o \
|
||||
stdio_setvbuf.o \
|
||||
stdio_snprintf.o \
|
||||
stdio_sprintf.o \
|
||||
stdio_sscanf.o \
|
||||
stdio_sscanf_hook_entry.o \
|
||||
stdio_tmpfile.o \
|
||||
stdio_tmpnam.o \
|
||||
stdio_translateioerror.o \
|
||||
stdio_ungetc.o \
|
||||
stdio_unlockfile.o \
|
||||
stdio_vasprintf.o \
|
||||
stdio_vasprintf_hook_entry.o \
|
||||
stdio_vfprintf.o \
|
||||
stdio_vfscanf.o \
|
||||
stdio_vprintf.o \
|
||||
stdio_vsnprintf.o \
|
||||
stdio_vsnprintf_hook_entry.o \
|
||||
stdio_vsprintf.o \
|
||||
stdio_vsprintf_hook_entry.o \
|
||||
stdio_vsscanf.o \
|
||||
stdio_vscanf.o \
|
||||
stdlib_abort.o \
|
||||
stdlib_abs.o \
|
||||
stdlib_alloca.o \
|
||||
stdlib_alloca_cleanup.o \
|
||||
stdlib_alloca_trap.o \
|
||||
stdlib_assertion_failure.o \
|
||||
stdlib_atexit.o \
|
||||
stdlib_atoi.o \
|
||||
stdlib_atol.o \
|
||||
stdlib_atoll.o \
|
||||
stdlib_bsearch.o \
|
||||
stdlib_calloc.o \
|
||||
stdlib_checkdetach.o \
|
||||
stdlib_constructor.o \
|
||||
stdlib_constructor_begin.o \
|
||||
stdlib_default_pool_size.o \
|
||||
stdlib_default_puddle_size.o \
|
||||
stdlib_destructor.o \
|
||||
stdlib_detach.o \
|
||||
stdlib_disablerequesters.o \
|
||||
stdlib_div.o \
|
||||
stdlib_divsi3.o \
|
||||
stdlib_divsi4.o \
|
||||
stdlib_dosbase.o \
|
||||
stdlib_exit.o \
|
||||
stdlib_free.o \
|
||||
stdlib_free_unused_slabs.o \
|
||||
stdlib_getdefstacksize.o \
|
||||
stdlib_getenv.o \
|
||||
stdlib_getmemstats.o \
|
||||
stdlib_getsp.o \
|
||||
stdlib_get_errno.o \
|
||||
stdlib_get_slab_usage.o \
|
||||
stdlib_get_slab_allocations.o \
|
||||
stdlib_get_slab_stats.o \
|
||||
stdlib_isresident.o \
|
||||
stdlib_labs.o \
|
||||
stdlib_llabs.o \
|
||||
stdlib_ldiv.o \
|
||||
stdlib_lldiv.o \
|
||||
stdlib_lib_main.o \
|
||||
stdlib_lib_startup.o \
|
||||
stdlib_machine_test.o \
|
||||
stdlib_main.o \
|
||||
stdlib_main_stub.o \
|
||||
stdlib_malloc.o \
|
||||
stdlib_math.o \
|
||||
stdlib_mkdtemp.o \
|
||||
stdlib_mkstemp.o \
|
||||
stdlib_mktemp.o \
|
||||
stdlib_modsi3.o \
|
||||
stdlib_mulsi3.o \
|
||||
stdlib_never_free.o \
|
||||
stdlib_osliberror.o \
|
||||
stdlib_oslibversion.o \
|
||||
stdlib_priority.o \
|
||||
stdlib_process_name.o \
|
||||
stdlib_program_name.o \
|
||||
stdlib_putenv.o \
|
||||
stdlib_qsort.o \
|
||||
stdlib_rand.o \
|
||||
stdlib_rand_r.o \
|
||||
stdlib_realloc.o \
|
||||
stdlib_red_black.o \
|
||||
stdlib_resetmemstats.o \
|
||||
stdlib_semaphore.o \
|
||||
stdlib_setenv.o \
|
||||
stdlib_setjmp.o \
|
||||
stdlib_set_errno.o \
|
||||
stdlib_set_process_window.o \
|
||||
stdlib_shell_escape.o \
|
||||
stdlib_showerror.o \
|
||||
stdlib_slab.o \
|
||||
stdlib_slab_max_size.o \
|
||||
stdlib_slab_purge_threshold.o \
|
||||
stdlib_srand.o \
|
||||
stdlib_stacksize.o \
|
||||
stdlib_stack_usage.o \
|
||||
stdlib_arg.o \
|
||||
stdlib_stdio_window_spec.o \
|
||||
stdlib_strtol.o \
|
||||
stdlib_strtoll.o \
|
||||
stdlib_strtoul.o \
|
||||
stdlib_strtoull.o \
|
||||
stdlib_swapstack.o \
|
||||
stdlib_sysbase.o \
|
||||
stdlib_system.o \
|
||||
stdlib_termination_message.o \
|
||||
stdlib_threshold.o \
|
||||
stdlib_utilitybase.o \
|
||||
stdlib_udivsi3.o \
|
||||
stdlib_udivsi4.o \
|
||||
stdlib_umodsi3.o \
|
||||
stdlib_unsetenv.o \
|
||||
strings_ffs.o \
|
||||
strings_strcasecmp.o \
|
||||
strings_strncasecmp.o \
|
||||
string_bcmp.o \
|
||||
string_bcopy.o \
|
||||
string_bzero.o \
|
||||
string_index.o \
|
||||
string_memchr.o \
|
||||
string_memcmp.o \
|
||||
string_memcpy.o \
|
||||
string_memmove.o \
|
||||
string_memset.o \
|
||||
string_rindex.o \
|
||||
string_strcat.o \
|
||||
string_strchr.o \
|
||||
string_strcmp.o \
|
||||
string_strcoll.o \
|
||||
string_strcpy.o \
|
||||
string_strcspn.o \
|
||||
string_strdup.o \
|
||||
string_strerror.o \
|
||||
string_strerror_r.o \
|
||||
string_strlcat.o \
|
||||
string_strlcpy.o \
|
||||
string_strlen.o \
|
||||
string_strncat.o \
|
||||
string_strncmp.o \
|
||||
string_strncpy.o \
|
||||
string_strpbrk.o \
|
||||
string_strrchr.o \
|
||||
string_strspn.o \
|
||||
string_strstr.o \
|
||||
string_strtok.o \
|
||||
string_strtok_r.o \
|
||||
string_strxfrm.o \
|
||||
time_asctime.o \
|
||||
time_asctime_r.o \
|
||||
time_clock.o \
|
||||
time_converttime.o \
|
||||
time_convert_datestamp.o \
|
||||
time_convert_time.o \
|
||||
time_ctime.o \
|
||||
time_ctime_r.o \
|
||||
time_data.o \
|
||||
time_days_per_date.o \
|
||||
time_gettimeofday.o \
|
||||
time_gmtime.o \
|
||||
time_gmtime_r.o \
|
||||
time_localtime.o \
|
||||
time_localtime_r.o \
|
||||
time_mktime.o \
|
||||
time_numbertostring.o \
|
||||
time_strftime.o \
|
||||
time_time.o \
|
||||
time_weekday.o \
|
||||
uio_readv.o \
|
||||
uio_writev.o \
|
||||
ulimit_ulimit.o \
|
||||
unistd_access.o \
|
||||
unistd_chdir.o \
|
||||
unistd_chdir_exit.o \
|
||||
unistd_chown.o \
|
||||
unistd_currentpathname.o \
|
||||
unistd_dup.o \
|
||||
unistd_dup2.o \
|
||||
unistd_fchown.o \
|
||||
unistd_fdatasync.o \
|
||||
unistd_fdopen.o \
|
||||
unistd_fileno.o \
|
||||
unistd_fsync.o \
|
||||
unistd_ftruncate.o \
|
||||
unistd_getcwd.o \
|
||||
unistd_getopt.o \
|
||||
unistd_getpid.o \
|
||||
unistd_init_exit.o \
|
||||
unistd_isatty.o \
|
||||
unistd_lchown.o \
|
||||
unistd_link.o \
|
||||
unistd_lockf.o \
|
||||
unistd_readlink.o \
|
||||
unistd_realpath.o \
|
||||
unistd_sleep.o \
|
||||
unistd_symlink.o \
|
||||
unistd_sync_fd.o \
|
||||
unistd_timer.o \
|
||||
unistd_time_delay.o \
|
||||
unistd_truncate.o \
|
||||
unistd_unlink.o \
|
||||
unistd_unlink_retries.o \
|
||||
unistd_usleep.o \
|
||||
utime_utime.o \
|
||||
utsname_uname.o
|
||||
include libamiga.obj.gmk
|
||||
include libc.obj.gmk
|
||||
include libdebug.obj.gmk
|
||||
include libm.obj.gmk
|
||||
include libnet.obj.gmk
|
||||
include libunix.obj.gmk
|
||||
|
||||
UNIX_LIB = \
|
||||
unix.lib_rev.o \
|
||||
dirent_closedir.o \
|
||||
dirent_rewinddir.o \
|
||||
dirent_opendir.o \
|
||||
dirent_readdir.o \
|
||||
fcntl_creat.o \
|
||||
fcntl_fcntl.o \
|
||||
fcntl_open.o \
|
||||
fcntl_get_default_file.o \
|
||||
getopt_getopt_long.o \
|
||||
mount_convertinfo.o \
|
||||
mount_statfs.o \
|
||||
resource_getrlimit.o \
|
||||
resource_setrlimit.o \
|
||||
stat_chmod.o \
|
||||
stat_fstat.o \
|
||||
stat_lstat.o \
|
||||
stat_lock.o \
|
||||
stat_mkdir.o \
|
||||
stat_rmdir.o \
|
||||
stat_stat.o \
|
||||
stdio_ctermid.o \
|
||||
stdio_fdhookentry.o \
|
||||
stdio_fflush.o \
|
||||
stdio_fopen.o \
|
||||
stdio_init_exit.o \
|
||||
stdio_file_init.o \
|
||||
stdio_locksemaphorename.o \
|
||||
stdio_openiob.o \
|
||||
stdio_popen.o \
|
||||
stdio_record_locking.o \
|
||||
stdio_remove.o \
|
||||
stdio_rename.o \
|
||||
stdlib_alloca.o \
|
||||
stdlib_alloca_cleanup.o \
|
||||
stdlib_alloca_trap.o \
|
||||
stdlib_arg.o \
|
||||
stdlib_expand_wildcard.o \
|
||||
stdlib_expand_wildcard_check.o \
|
||||
stdlib_getmemstats.o \
|
||||
stdlib_main.o \
|
||||
stdlib_main_stub.o \
|
||||
stdlib_mkdtemp.o \
|
||||
stdlib_mkstemp.o \
|
||||
stdlib_mktemp.o \
|
||||
stdlib_malloc.o \
|
||||
stdlib_realloc.o \
|
||||
stdlib_resetmemstats.o \
|
||||
stdlib_system.o \
|
||||
systeminfo_sysinfo.o \
|
||||
termios_cfgetispeed.o \
|
||||
termios_cfgetospeed.o \
|
||||
termios_cfmakeraw.o \
|
||||
termios_cfsetispeed.o \
|
||||
termios_cfsetospeed.o \
|
||||
termios_console_fdhookentry.o \
|
||||
termios_tcdrain.o \
|
||||
termios_tcflow.o \
|
||||
termios_tcflush.o \
|
||||
termios_tcgetattr.o \
|
||||
termios_tcsendbreak.o \
|
||||
termios_tcsetattr.o \
|
||||
timeb_ftime.o \
|
||||
uio_readv.o \
|
||||
uio_writev.o \
|
||||
unistd_access.o \
|
||||
unistd_chdir.o \
|
||||
unistd_chdir_exit.o \
|
||||
unistd_chown.o \
|
||||
unistd_common_pathconf.o \
|
||||
unistd_def_path.o \
|
||||
unistd_def_path_delimiter.o \
|
||||
unistd_environ.o \
|
||||
unistd_execl.o \
|
||||
unistd_execle.o \
|
||||
unistd_execlp.o \
|
||||
unistd_execv.o \
|
||||
unistd_execve.o \
|
||||
unistd_execve_env_exit.o \
|
||||
unistd_execve_env_init.o \
|
||||
unistd_execve_exit.o \
|
||||
unistd_execvp.o \
|
||||
unistd_fpathconf.o \
|
||||
unistd_getcwd.o \
|
||||
unistd_lchown.o \
|
||||
unistd_link.o \
|
||||
unistd_lockf.o \
|
||||
unistd_pathconf.o \
|
||||
unistd_readlink.o \
|
||||
unistd_realpath.o \
|
||||
unistd_restorepathname.o \
|
||||
unistd_setcurrentpath.o \
|
||||
unistd_strip_double_slash.o \
|
||||
unistd_symlink.o \
|
||||
unistd_translatea2u.o \
|
||||
unistd_translaterel.o \
|
||||
unistd_translateu2a.o \
|
||||
unistd_truncate.o \
|
||||
unistd_ttyname.o \
|
||||
unistd_ttyname_r.o \
|
||||
unistd_unix_path_semantics.o \
|
||||
unistd_unlink.o \
|
||||
unistd_wildcard_expand.o \
|
||||
utime_utime.o
|
||||
|
||||
MATH_LIB = \
|
||||
complex_carg.o \
|
||||
complex_cargf.o \
|
||||
complex_cargl.o \
|
||||
complex_cimag.o \
|
||||
complex_cimagf.o \
|
||||
complex_cimagl.o \
|
||||
complex_conj.o \
|
||||
complex_conjf.o \
|
||||
complex_conjl.o \
|
||||
complex_creal.o \
|
||||
complex_crealf.o \
|
||||
complex_creall.o \
|
||||
fenv_feclearexcept.o \
|
||||
fenv_fegetenv.o \
|
||||
fenv_fegetexceptflag.o \
|
||||
fenv_fegetround.o \
|
||||
fenv_feholdexcept.o \
|
||||
fenv_feraiseexcept.o \
|
||||
fenv_fesetenv.o \
|
||||
fenv_fesetexceptflag.o \
|
||||
fenv_fetestexcept.o \
|
||||
fenv_fetestround.o \
|
||||
fenv_feupdateenv.o \
|
||||
math_acos.o \
|
||||
math_acosf.o \
|
||||
math_acosh.o \
|
||||
math_acoshf.o \
|
||||
math_asin.o \
|
||||
math_asinf.o \
|
||||
math_asinh.o \
|
||||
math_asinhf.o \
|
||||
math_atan.o \
|
||||
math_atan2.o \
|
||||
math_atan2f.o \
|
||||
math_atanf.o \
|
||||
math_atanh.o \
|
||||
math_atanhf.o \
|
||||
math_cbrt.o \
|
||||
math_cbrtf.o \
|
||||
math_ceil.o \
|
||||
math_ceilf.o \
|
||||
math_copysign.o \
|
||||
math_copysignf.o \
|
||||
math_cos.o \
|
||||
math_cosf.o \
|
||||
math_cosh.o \
|
||||
math_coshf.o \
|
||||
math_erf.o \
|
||||
math_erfc.o \
|
||||
math_erfcf.o \
|
||||
math_erff.o \
|
||||
math_exp.o \
|
||||
math_exp2.o \
|
||||
math_exp2f.o \
|
||||
math_expf.o \
|
||||
math_expm1.o \
|
||||
math_expm1f.o \
|
||||
math_fabs.o \
|
||||
math_fabsf.o \
|
||||
math_fdim.o \
|
||||
math_fdimf.o \
|
||||
math_floor.o \
|
||||
math_floorf.o \
|
||||
math_fma.o \
|
||||
math_fmaf.o \
|
||||
math_fmax.o \
|
||||
math_fmaxf.o \
|
||||
math_fmin.o \
|
||||
math_fminf.o \
|
||||
math_fmod.o \
|
||||
math_fmodf.o \
|
||||
math_fpclassify.o \
|
||||
math_frexp.o \
|
||||
math_frexpf.o \
|
||||
math_huge_val.o \
|
||||
math_huge_valf.o \
|
||||
math_hypot.o \
|
||||
math_hypotf.o \
|
||||
math_ilogb.o \
|
||||
math_ilogbf.o \
|
||||
math_inf.o \
|
||||
math_inff.o \
|
||||
math_init_exit.o \
|
||||
math_isfinite.o \
|
||||
math_isunordered.o \
|
||||
math_kernel_cosf.o \
|
||||
math_kernel_sinf.o \
|
||||
math_kernel_tanf.o \
|
||||
math_ldexp.o \
|
||||
math_ldexpf.o \
|
||||
math_lgamma.o \
|
||||
math_lgammaf.o \
|
||||
math_llrint.o \
|
||||
math_log.o \
|
||||
math_log10.o \
|
||||
math_log10f.o \
|
||||
math_log1p.o \
|
||||
math_log1pf.o \
|
||||
math_log2.o \
|
||||
math_log2f.o \
|
||||
math_logb.o \
|
||||
math_logbf.o \
|
||||
math_logf.o \
|
||||
math_lrint.o \
|
||||
math_lrintf.o \
|
||||
math_lround.o \
|
||||
math_lroundf.o \
|
||||
math_modf.o \
|
||||
math_modff.o \
|
||||
math_nan.o \
|
||||
math_nanf.o \
|
||||
math_nearbyint.o \
|
||||
math_nearbyintf.o \
|
||||
math_nextafter.o \
|
||||
math_nextafterf.o \
|
||||
math_pow.o \
|
||||
math_powf.o \
|
||||
math_remainder.o \
|
||||
math_remainderf.o \
|
||||
math_remquo.o \
|
||||
math_remquof.o \
|
||||
math_rem_pio2f.o \
|
||||
math_rint.o \
|
||||
math_rintf.o \
|
||||
math_round.o \
|
||||
math_roundf.o \
|
||||
math_scalbn.o \
|
||||
math_scalbnf.o \
|
||||
math_signbit.o \
|
||||
math_sin.o \
|
||||
math_sinf.o \
|
||||
math_sinh.o \
|
||||
math_sinhf.o \
|
||||
math_sqrt.o \
|
||||
math_sqrtf.o \
|
||||
math_tan.o \
|
||||
math_tanf.o \
|
||||
math_tanh.o \
|
||||
math_tanhf.o \
|
||||
math_tgamma.o \
|
||||
math_tgammaf.o \
|
||||
math_trunc.o \
|
||||
math_truncf.o \
|
||||
stdio_asprintf.o \
|
||||
stdio_flush.o \
|
||||
stdio_flush_all_files.o \
|
||||
stdio_fprintf.o \
|
||||
stdio_fscanf.o \
|
||||
stdio_printf.o \
|
||||
stdio_scanf.o \
|
||||
stdio_snprintf.o \
|
||||
stdio_sprintf.o \
|
||||
stdio_sscanf.o \
|
||||
stdio_vasprintf.o \
|
||||
stdio_vfprintf.o \
|
||||
stdio_vfscanf.o \
|
||||
stdio_vsscanf.o \
|
||||
stdio_vscanf.o \
|
||||
stdio_vprintf.o \
|
||||
stdio_vsnprintf.o \
|
||||
stdio_vsprintf.o \
|
||||
stdlib_atof.o \
|
||||
stdlib_strtod.o \
|
||||
stdlib_strtof.o \
|
||||
time_difftime.o
|
||||
|
||||
MATH_LIB_881 = \
|
||||
m881.lib_rev.o \
|
||||
$(MATH_LIB)
|
||||
|
||||
MATH_LIB_IEEE = \
|
||||
m.lib_rev.o \
|
||||
$(MATH_LIB) \
|
||||
math_adddf3.o \
|
||||
math_addsf3.o \
|
||||
math_divdf3.o \
|
||||
math_divsf3.o \
|
||||
math_eqdf2.o \
|
||||
math_eqsf2.o \
|
||||
math_extendsfdf2.o \
|
||||
math_fixdfsi.o \
|
||||
math_fixsfsi.o \
|
||||
math_fixunsdfsi.o \
|
||||
math_fixunssfsi.o \
|
||||
math_floatsidf.o \
|
||||
math_floatsisf.o \
|
||||
math_gedf2.o \
|
||||
math_gesf2.o \
|
||||
math_gtdf2.o \
|
||||
math_gtsf2.o \
|
||||
math_ledf2.o \
|
||||
math_lesf2.o \
|
||||
math_ltdf2.o \
|
||||
math_ltsf2.o \
|
||||
math_muldf3.o \
|
||||
math_mulsf3.o \
|
||||
math_nedf2.o \
|
||||
math_negdf2.o \
|
||||
math_negsf2.o \
|
||||
math_nesf2.o \
|
||||
math_subdf3.o \
|
||||
math_subsf3.o \
|
||||
math_truncdfsf2.o
|
||||
|
||||
NET_LIB = \
|
||||
net.lib_rev.o \
|
||||
socket_accept.o \
|
||||
socket_bind.o \
|
||||
socket_check_daemon.o \
|
||||
socket_connect.o \
|
||||
socket_gethostbyaddr.o \
|
||||
socket_gethostbyname.o \
|
||||
socket_gethostid.o \
|
||||
socket_gethostname.o \
|
||||
socket_getnetbyaddr.o \
|
||||
socket_getnetbyname.o \
|
||||
socket_getpeername.o \
|
||||
socket_getprotobyname.o \
|
||||
socket_getprotobynumber.o \
|
||||
socket_getservbyname.o \
|
||||
socket_getservbyport.o \
|
||||
socket_getsockname.o \
|
||||
socket_getsockopt.o \
|
||||
socket_get_descriptor.o \
|
||||
socket_inet_addr.o \
|
||||
socket_inet_aton.o \
|
||||
socket_inet_lnaof.o \
|
||||
socket_inet_makeaddr.o \
|
||||
socket_inet_netof.o \
|
||||
socket_inet_network.o \
|
||||
socket_inet_ntoa.o \
|
||||
socket_init_exit.o \
|
||||
socket_ioctl.o \
|
||||
socket_isdaemon.o \
|
||||
socket_listen.o \
|
||||
socket_obtain_daemon.o \
|
||||
socket_recv.o \
|
||||
socket_recvfrom.o \
|
||||
socket_recvmsg.o \
|
||||
socket_select_signal.o \
|
||||
socket_select.o \
|
||||
socket_wait_select.o \
|
||||
socket_send.o \
|
||||
socket_sendmsg.o \
|
||||
socket_sendto.o \
|
||||
socket_setsockopt.o \
|
||||
socket_shutdown.o \
|
||||
socket_socket.o \
|
||||
socket_hook_entry.o \
|
||||
socket_hstrerror.o \
|
||||
socket_get_h_errno.o \
|
||||
socket_set_h_errno.o \
|
||||
stat_umask.o \
|
||||
systeminfo_sysinfo.o \
|
||||
usergroup_crypt.o \
|
||||
usergroup_data.o \
|
||||
usergroup_endgrent.o \
|
||||
usergroup_endpwent.o \
|
||||
usergroup_getegid.o \
|
||||
usergroup_geteuid.o \
|
||||
usergroup_getgid.o \
|
||||
usergroup_getgrent.o \
|
||||
usergroup_getgrgid.o \
|
||||
usergroup_getgrnam.o \
|
||||
usergroup_getgroups.o \
|
||||
usergroup_getpass.o \
|
||||
usergroup_getpwent.o \
|
||||
usergroup_getpwnam.o \
|
||||
usergroup_getpwuid.o \
|
||||
usergroup_getuid.o \
|
||||
usergroup_initgroups.o \
|
||||
usergroup_init_exit.o \
|
||||
usergroup_rootmode.o \
|
||||
usergroup_setegid.o \
|
||||
usergroup_seteuid.o \
|
||||
usergroup_setgid.o \
|
||||
usergroup_setgrent.o \
|
||||
usergroup_setgroups.o \
|
||||
usergroup_setpwent.o \
|
||||
usergroup_setregid.o \
|
||||
usergroup_setreuid.o \
|
||||
usergroup_setsid.o \
|
||||
usergroup_setuid.o \
|
||||
utsname_uname.o
|
||||
|
||||
DEBUG_LIB = \
|
||||
debug.lib_rev.o \
|
||||
debug.o \
|
||||
debug_cmpstrexec.o \
|
||||
debug_kcmpstr.o \
|
||||
debug_kdofmt.o \
|
||||
debug_kgetc.o \
|
||||
debug_kgetch1.o \
|
||||
debug_kgetch2.o \
|
||||
debug_kgetchar1.o \
|
||||
debug_kgetchar2.o \
|
||||
debug_kgetnum1.o \
|
||||
debug_kgetnum2.o \
|
||||
debug_kmaygetch.o \
|
||||
debug_kmaygetchar.o \
|
||||
debug_kprintf1.o \
|
||||
debug_kprintf2.o \
|
||||
debug_kputc.o \
|
||||
debug_kputch1.o \
|
||||
debug_kputch2.o \
|
||||
debug_kputchar1.o \
|
||||
debug_kputchar2.o \
|
||||
debug_kputfmt.o \
|
||||
debug_kputs1.o \
|
||||
debug_kputs2.o \
|
||||
debug_kputstr1.o \
|
||||
debug_kputstr2.o \
|
||||
debug_kvprintf1.o \
|
||||
debug_kvprintf2.o \
|
||||
debug_level.o
|
||||
|
||||
AMIGA_LIB = \
|
||||
amiga.lib_rev.o \
|
||||
amiga_acrypt.o \
|
||||
amiga_addtof.o \
|
||||
amiga_argarraydone.o \
|
||||
amiga_argarrayinit.o \
|
||||
amiga_argint.o \
|
||||
amiga_argstring.o \
|
||||
amiga_beginio.o \
|
||||
amiga_callhook.o \
|
||||
amiga_callhooka.o \
|
||||
amiga_coercemethod.o \
|
||||
amiga_createextio.o \
|
||||
amiga_createport.o \
|
||||
amiga_createstdio.o \
|
||||
amiga_createtask.o \
|
||||
amiga_deleteextio.o \
|
||||
amiga_deleteport.o \
|
||||
amiga_deletestdio.o \
|
||||
amiga_deletetask.o \
|
||||
amiga_domethod.o \
|
||||
amiga_dosupermethod.o \
|
||||
amiga_dotimer.o \
|
||||
amiga_fastrand.o \
|
||||
amiga_freeievents.o \
|
||||
amiga_hookentry.o \
|
||||
amiga_hotkey.o \
|
||||
amiga_invertstring.o \
|
||||
amiga_newlist.o \
|
||||
amiga_rangerand.o \
|
||||
amiga_remtof.o \
|
||||
amiga_rexxvars.o \
|
||||
amiga_setsuperattrs.o \
|
||||
amiga_timedelay.o \
|
||||
amiga_waitbeam.o
|
||||
AMIGA_LIB := $(sort $(AMIGA_LIB_COMMON) $(AMIGA_LIB_OS3))
|
||||
C_LIB := $(sort $(C_LIB_COMMON) $(C_LIB_OS3))
|
||||
UNIX_LIB := $(sort $(UNIX_LIB_COMMON) $(UNIX_LIB_OS3))
|
||||
|
||||
MEMDEBUG_LIB = \
|
||||
stdio_vasprintf_debug.o \
|
||||
@ -960,8 +163,8 @@ MEMDEBUG_LIB = \
|
||||
##############################################################################
|
||||
|
||||
LIBS_68K := $(LIBC_OBJS)/libc.a $(LIBUNIX_OBJS)/libunix.a \
|
||||
$(LIBNET_OBJS)/libnet.a $(LIBDEBUG_OBJS)/libdebug.a $(LIBAMIGA_OBJS)/libamiga.a \
|
||||
$(LIBM_OBJS)/libm.a
|
||||
$(LIBNET_OBJS)/libnet.a $(LIBDEBUG_OBJS)/libdebug.a \
|
||||
$(LIBAMIGA_OBJS)/libamiga.a $(LIBM_OBJS)/libm.a
|
||||
LIBS_020 := $(LIBM881_OBJS)/libm881.a $(LIBS_68K)
|
||||
|
||||
##############################################################################
|
||||
@ -1142,6 +345,8 @@ $(LIBC_OBJS)/stdlib_get_slab_stats.o : stdlib_get_slab_stats.c stdlib_memory.h i
|
||||
|
||||
$(LIBC_OBJS)/stdlib_free_unused_slabs.o : stdlib_free_unused_slabs.c stdlib_memory.h include/stdlib.h
|
||||
|
||||
$(LIBC_OBJS)/stdlib_decay_unused_slabs.o : stdlib_decay_unused_slabs.c stdlib_memory.h include/stdlib.h
|
||||
|
||||
$(LIBC_OBJS)/stdlib_get_slab_usage.o : stdlib_get_slab_usage.c stdlib_memory.h include/stdlib.h
|
||||
|
||||
$(LIBC_OBJS)/stdlib_get_slab_allocations.o : stdlib_get_slab_allocations.c stdlib_memory.h include/stdlib.h
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#
|
||||
# $Id: GNUmakefile.os4,v 1.116 2008-11-06 14:44:07 obarthel Exp $
|
||||
#
|
||||
# :ts=8
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
@ -54,7 +54,8 @@ LOG_COMMAND := 2>&1 | tee -a compiler.log
|
||||
|
||||
WARNINGS := \
|
||||
-Wall -W -Wpointer-arith -Wsign-compare -Wmissing-prototypes \
|
||||
-Wundef -Wbad-function-cast -Wmissing-declarations -Wunused -Wwrite-strings
|
||||
-Wundef -Wbad-function-cast -Wmissing-declarations -Wunused -Wwrite-strings \
|
||||
-Wno-deprecated-declarations \
|
||||
|
||||
# -Wconversion -Wshadow
|
||||
|
||||
@ -94,32 +95,45 @@ include libdebug.gmk
|
||||
include libamiga.gmk
|
||||
include libprofile.gmk
|
||||
|
||||
all-targets: \
|
||||
lib/crt0.o \
|
||||
lib/small-data/crt0.o \
|
||||
lib/soft-float/crt0.o \
|
||||
lib/baserel/crt0.o \
|
||||
lib/crtbegin.o \
|
||||
lib/soft-float/crtbegin.o \
|
||||
lib/small-data/crtbegin.o \
|
||||
lib/baserel/crtbegin.o \
|
||||
lib/crtend.o \
|
||||
lib/soft-float/crtend.o \
|
||||
lib/small-data/crtend.o \
|
||||
lib/baserel/crtend.o \
|
||||
lib.threadsafe/crt0.o \
|
||||
lib.threadsafe/small-data/crt0.o \
|
||||
lib.threadsafe/soft-float/crt0.o \
|
||||
lib.threadsafe/baserel/crt0.o \
|
||||
lib.threadsafe/crtbegin.o \
|
||||
lib.threadsafe/soft-float/crtbegin.o \
|
||||
lib.threadsafe/small-data/crtbegin.o \
|
||||
lib.threadsafe/baserel/crtbegin.o \
|
||||
lib.threadsafe/crtend.o \
|
||||
lib.threadsafe/soft-float/crtend.o \
|
||||
lib.threadsafe/small-data/crtend.o \
|
||||
lib.threadsafe/baserel/crtend.o \
|
||||
$(LIBS)
|
||||
##############################################################################
|
||||
|
||||
# General build rules for all object files and the individual libraries
|
||||
|
||||
define generic_rule
|
||||
|
||||
LIBS += lib/$(1)crt0.o \
|
||||
lib/$(1)crtbegin.o \
|
||||
lib/$(1)crtend.o \
|
||||
lib.threadsafe/$(1)crt0.o \
|
||||
lib.threadsafe/$(1)crtbegin.o \
|
||||
lib.threadsafe/$(1)crtend.o
|
||||
|
||||
lib/$(1)%.o : AFLAGS += $(2)
|
||||
lib/$(1)%.o : %.S
|
||||
@$$(ASSEMBLE)
|
||||
|
||||
lib/$(1)%.o : CFLAGS += $(2)
|
||||
lib/$(1)%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
lib.threadsafe/$(1)%.o : AFLAGS += $(THREADSAFE) $(2)
|
||||
lib.threadsafe/$(1)%.o : %.S
|
||||
@$$(ASSEMBLE)
|
||||
|
||||
lib.threadsafe/$(1)%.o : CFLAGS += $(THREADSAFE) $(2)
|
||||
lib.threadsafe/$(1)%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
endef
|
||||
|
||||
$(eval $(call generic_rule,,$(LARGEDATA)))
|
||||
$(eval $(call generic_rule,small-data/,$(SMALLDATA)))
|
||||
$(eval $(call generic_rule,soft-float/,$(SOFTFLOAT)))
|
||||
$(eval $(call generic_rule,baserel/,$(BASEREL)))
|
||||
|
||||
##############################################################################
|
||||
|
||||
all-targets: $(LIBS)
|
||||
|
||||
##############################################################################
|
||||
|
||||
@ -157,66 +171,6 @@ cvs-tag:
|
||||
|
||||
##############################################################################
|
||||
|
||||
# General build rules for all object files and the individual libraries
|
||||
|
||||
lib/%.o : AFLAGS += $(LARGEDATA)
|
||||
lib/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib/small-data/%.o : AFLAGS += $(SMALLDATA)
|
||||
lib/small-data/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib/small-data/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib/soft-float/%.o : AFLAGS += $(SOFTFLOAT)
|
||||
lib/soft-float/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib/soft-float/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib/baserel/%.o : AFLAGS += $(BASEREL)
|
||||
lib/baserel/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib/baserel/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib.threadsafe/%.o : AFLAGS += $(LARGEDATA) $(THREADSAFE)
|
||||
lib.threadsafe/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib.threadsafe/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib.threadsafe/small-data/%.o : AFLAGS += $(SMALLDATA) $(THREADSAFE)
|
||||
lib.threadsafe/small-data/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib.threadsafe/small-data/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib.threadsafe/soft-float/%.o : AFLAGS += $(SOFTFLOAT) $(THREADSAFE)
|
||||
lib.threadsafe/soft-float/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib.threadsafe/soft-float/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
lib.threadsafe/baserel/%.o : AFLAGS += $(BASEREL) $(THREADSAFE)
|
||||
lib.threadsafe/baserel/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
lib.threadsafe/baserel/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
##############################################################################
|
||||
|
||||
define COMPILE
|
||||
-$(MAKEDIR) $(@D)
|
||||
echo "Compiling $< [$(@D)]"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#define VERSION 1
|
||||
#define REVISION 212
|
||||
#define DATE "27.11.2016"
|
||||
#define VERS "amiga.lib 1.212"
|
||||
#define VSTRING "amiga.lib 1.212 (27.11.2016)\r\n"
|
||||
#define VERSTAG "\0$VER: amiga.lib 1.212 (27.11.2016)"
|
||||
#define REVISION 213
|
||||
#define DATE "4.12.2016"
|
||||
#define VERS "amiga.lib 1.213"
|
||||
#define VSTRING "amiga.lib 1.213 (4.12.2016)\r\n"
|
||||
#define VERSTAG "\0$VER: amiga.lib 1.213 (4.12.2016)"
|
||||
|
||||
@ -1 +1 @@
|
||||
212
|
||||
213
|
||||
|
||||
@ -79,6 +79,8 @@ DoTimer(struct timeval *tv,LONG unit,LONG command)
|
||||
struct MsgPort * mp;
|
||||
LONG error;
|
||||
|
||||
PROFILE_OFF();
|
||||
|
||||
assert( tv != NULL );
|
||||
|
||||
#if defined(__amigaos4__)
|
||||
@ -129,14 +131,10 @@ DoTimer(struct timeval *tv,LONG unit,LONG command)
|
||||
tr->tr_time.tv_secs = tv->tv_secs;
|
||||
tr->tr_time.tv_micro = tv->tv_micro;
|
||||
|
||||
PROFILE_OFF();
|
||||
|
||||
SetSignal(0,(1UL << mp->mp_SigBit));
|
||||
|
||||
error = DoIO((struct IORequest *)tr);
|
||||
|
||||
PROFILE_ON();
|
||||
|
||||
tv->tv_secs = tr->tr_time.tv_secs;
|
||||
tv->tv_micro = tr->tr_time.tv_micro;
|
||||
|
||||
@ -161,5 +159,7 @@ DoTimer(struct timeval *tv,LONG unit,LONG command)
|
||||
}
|
||||
#endif /* __amigaos4__ */
|
||||
|
||||
PROFILE_ON();
|
||||
|
||||
return(error);
|
||||
}
|
||||
|
||||
@ -262,9 +262,8 @@ STATIC VOID
|
||||
_SetValue(struct Environment * env,struct NexxStr * value,struct Node * symbol_table_node)
|
||||
{
|
||||
STATIC CONST UWORD code[] = { 0x4EAE,0xFFAC,0x4E75 }; /* jsr -84(a6) ; rts */
|
||||
struct Node * result;
|
||||
|
||||
result = (struct Node *)EmulateTags(code,
|
||||
EmulateTags(code,
|
||||
ET_RegisterA0,env,
|
||||
ET_RegisterA1,value,
|
||||
ET_RegisterD0,symbol_table_node,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#define VERSION 1
|
||||
#define REVISION 212
|
||||
#define DATE "27.11.2016"
|
||||
#define VERS "c.lib 1.212"
|
||||
#define VSTRING "c.lib 1.212 (27.11.2016)\r\n"
|
||||
#define VERSTAG "\0$VER: c.lib 1.212 (27.11.2016)"
|
||||
#define REVISION 213
|
||||
#define DATE "4.12.2016"
|
||||
#define VERS "c.lib 1.213"
|
||||
#define VSTRING "c.lib 1.213 (4.12.2016)\r\n"
|
||||
#define VERSTAG "\0$VER: c.lib 1.213 (4.12.2016)"
|
||||
|
||||
@ -1 +1 @@
|
||||
212
|
||||
213
|
||||
|
||||
@ -1,3 +1,37 @@
|
||||
c.lib 1.213 (4.12.2016)
|
||||
|
||||
- Added the __decay_unused_slabs() function which brings all currently
|
||||
empty slabs which are still protected from reuse closer to getting
|
||||
reused or released.
|
||||
|
||||
- The slab-test program now exercises the memory allocation functions
|
||||
to a greater degree. Memory is allocated in random chunk sizes,
|
||||
the allocations are resized (to other random chunk sizes),
|
||||
33% of all allocations are randomly freed, empty slabs readied for
|
||||
reuse then discarded. The output in JSON format now shows a bit
|
||||
more information as to what is being done.
|
||||
|
||||
- Rewrote __get_slab_stats() to use setjmp() and longjmp() in the
|
||||
print() callback invocation.
|
||||
|
||||
- __get_slab_stats() now reports how many times a slab was reused
|
||||
after having stuck around in the "empty slab" list.
|
||||
|
||||
- Changing the slab size through an environment variable is now
|
||||
a feature of the debug build.
|
||||
|
||||
- Small changes to allow the library to be built with SAS/C again.
|
||||
This includes adding code to disable/re-enable profiling,
|
||||
fixing "stdlib_profile.h" and updating the smakefiles.
|
||||
|
||||
- Still not sure what it does, but _CXV45 now sits along with _CX25
|
||||
and _CX35 in "sas_cxv.asm". "sas_cxv54.asm" is not needed any
|
||||
more.
|
||||
|
||||
- Found the last use of MEMF_PRIVATE which should have been compiled
|
||||
only for the OS4 version.
|
||||
|
||||
|
||||
c.lib 1.212 (27.11.2016)
|
||||
|
||||
- Unused slabs which get recycled are no longer reinitialized from
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#define VERSION 1
|
||||
#define REVISION 212
|
||||
#define DATE "27.11.2016"
|
||||
#define VERS "debug.lib 1.212"
|
||||
#define VSTRING "debug.lib 1.212 (27.11.2016)\r\n"
|
||||
#define VERSTAG "\0$VER: debug.lib 1.212 (27.11.2016)"
|
||||
#define REVISION 213
|
||||
#define DATE "4.12.2016"
|
||||
#define VERS "debug.lib 1.213"
|
||||
#define VSTRING "debug.lib 1.213 (4.12.2016)\r\n"
|
||||
#define VERSTAG "\0$VER: debug.lib 1.213 (4.12.2016)"
|
||||
|
||||
@ -1 +1 @@
|
||||
212
|
||||
213
|
||||
|
||||
@ -201,6 +201,21 @@ extern void __free_unused_slabs(void);
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/*
|
||||
* You can accelerate the reuse of currently unused slabs by calling
|
||||
* the __decay_unused_slabs() function. Each call decrements the decay
|
||||
* counter until it reaches 0, at which point an unused slab can be
|
||||
* reused instead of allocating a new slab. Also, at 0 unused slabs
|
||||
* will be freed by the allocator.
|
||||
*
|
||||
* Please note that this function works within the context of the memory
|
||||
* allocation system and is not safe to call from interrupt code. It may
|
||||
* break a Forbid() or Disable() condition.
|
||||
*/
|
||||
extern void __decay_unused_slabs(void);
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/*
|
||||
* You can obtain runtime statistics about the slab allocator by
|
||||
* invoking the __get_slab_usage() function which in turn invokes
|
||||
|
||||
@ -1,127 +1,44 @@
|
||||
#
|
||||
# $Id: libamiga.gmk,v 1.1 2006-09-17 17:37:27 obarthel Exp $
|
||||
#
|
||||
# :ts=8
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
##############################################################################
|
||||
|
||||
LIBS += \
|
||||
lib/libamiga.a \
|
||||
lib/soft-float/libamiga.a \
|
||||
lib/small-data/libamiga.a \
|
||||
lib/baserel/libamiga.a \
|
||||
lib.threadsafe/libamiga.a \
|
||||
lib.threadsafe/soft-float/libamiga.a \
|
||||
lib.threadsafe/small-data/libamiga.a \
|
||||
lib.threadsafe/baserel/libamiga.a
|
||||
include libamiga.obj.gmk
|
||||
AMIGA_LIB = $(sort $(AMIGA_LIB_COMMON) $(AMIGA_LIB_OS4))
|
||||
|
||||
##############################################################################
|
||||
|
||||
AMIGA_LIB = \
|
||||
amiga.lib_rev.o \
|
||||
amiga_acrypt.o \
|
||||
amiga_addtof.o \
|
||||
amiga_argarraydone.o \
|
||||
amiga_argarrayinit.o \
|
||||
amiga_argint.o \
|
||||
amiga_argstring.o \
|
||||
amiga_beginio.o \
|
||||
amiga_callhooka.o \
|
||||
amiga_coercemethod.o \
|
||||
amiga_createextio.o \
|
||||
amiga_createport.o \
|
||||
amiga_createstdio.o \
|
||||
amiga_createtask.o \
|
||||
amiga_deleteextio.o \
|
||||
amiga_deleteport.o \
|
||||
amiga_deletestdio.o \
|
||||
amiga_deletetask.o \
|
||||
amiga_domethod.o \
|
||||
amiga_dosupermethod.o \
|
||||
amiga_dotimer.o \
|
||||
amiga_fastrand.o \
|
||||
amiga_freeievents.o \
|
||||
amiga_hotkey.o \
|
||||
amiga_invertstring.o \
|
||||
amiga_newlist.o \
|
||||
amiga_rangerand.o \
|
||||
amiga_remtof.o \
|
||||
amiga_rexxvars.o \
|
||||
amiga_setsuperattrs.o \
|
||||
amiga_timedelay.o \
|
||||
amiga_waitbeam.o
|
||||
define libamiga_rule
|
||||
|
||||
##############################################################################
|
||||
LIBS += lib/$(1).a lib.threadsafe/$(1).a
|
||||
|
||||
# Dependencies to rebuild if the library version changes
|
||||
obj/$(1)/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h
|
||||
obj.threadsafe/$(1)/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h
|
||||
|
||||
obj/libamiga/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h
|
||||
obj/soft-float/libamiga/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h
|
||||
obj/small-data/libamiga/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h
|
||||
obj/baserel/libamiga/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h
|
||||
obj.threadsafe/libamiga/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h
|
||||
obj.threadsafe/soft-float/libamiga/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h
|
||||
obj.threadsafe/small-data/libamiga/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h
|
||||
obj.threadsafe/baserel/libamiga/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h
|
||||
obj/$(1)/%.o : CFLAGS += $(2)
|
||||
obj/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
obj.threadsafe/$(1)/%.o : CFLAGS += $(THREADSAFE) $(2)
|
||||
obj.threadsafe/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
lib/$(1).a : $$(addprefix obj/$(1)/,$$(AMIGA_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
lib.threadsafe/$(1).a : $$(addprefix obj.threadsafe/$(1)/,$$(AMIGA_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
endef
|
||||
|
||||
##############################################################################
|
||||
|
||||
obj/libamiga/%.o : CFLAGS += $(LARGEDATA)
|
||||
obj/libamiga/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/soft-float/libamiga/%.o : CFLAGS += $(SOFTFLOAT)
|
||||
obj/soft-float/libamiga/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/small-data/libamiga/%.o : CFLAGS += $(SMALLDATA)
|
||||
obj/small-data/libamiga/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/baserel/libamiga/%.o : CFLAGS += $(BASEREL)
|
||||
obj/baserel/libamiga/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/libamiga/%.o : CFLAGS += $(THREADSAFE) $(LARGEDATA)
|
||||
obj.threadsafe/libamiga/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/soft-float/libamiga/%.o : CFLAGS += $(THREADSAFE) $(SOFTFLOAT)
|
||||
obj.threadsafe/soft-float/libamiga/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/small-data/libamiga/%.o : CFLAGS += $(THREADSAFE) $(SMALLDATA)
|
||||
obj.threadsafe/small-data/libamiga/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/baserel/libamiga/%.o : CFLAGS += $(THREADSAFE) $(BASEREL)
|
||||
obj.threadsafe/baserel/libamiga/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
##############################################################################
|
||||
|
||||
lib/libamiga.a : $(addprefix obj/libamiga/,$(AMIGA_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/soft-float/libamiga.a : $(addprefix obj/soft-float/libamiga/,$(AMIGA_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/small-data/libamiga.a : $(addprefix obj/small-data/libamiga/,$(AMIGA_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/baserel/libamiga.a : $(addprefix obj/baserel/libamiga/,$(AMIGA_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/libamiga.a : $(addprefix obj.threadsafe/libamiga/,$(AMIGA_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/soft-float/libamiga.a : $(addprefix obj.threadsafe/soft-float/libamiga/,$(AMIGA_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/small-data/libamiga.a : $(addprefix obj.threadsafe/small-data/libamiga/,$(AMIGA_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/baserel/libamiga.a : $(addprefix obj.threadsafe/baserel/libamiga/,$(AMIGA_LIB))
|
||||
@$(MAKELIB)
|
||||
$(eval $(call libamiga_rule,libamiga,$(LARGEDATA)))
|
||||
$(eval $(call libamiga_rule,soft-float/libamiga,$(SOFTFLOAT)))
|
||||
$(eval $(call libamiga_rule,small-data/libamiga,$(SMALLDATA)))
|
||||
$(eval $(call libamiga_rule,baserel/libamiga,$(BASEREL)))
|
||||
|
||||
43
library/libamiga.obj.gmk
Normal file
43
library/libamiga.obj.gmk
Normal file
@ -0,0 +1,43 @@
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
AMIGA_LIB_COMMON := \
|
||||
amiga.lib_rev.o \
|
||||
amiga_acrypt.o \
|
||||
amiga_addtof.o \
|
||||
amiga_argarraydone.o \
|
||||
amiga_argarrayinit.o \
|
||||
amiga_argint.o \
|
||||
amiga_argstring.o \
|
||||
amiga_beginio.o \
|
||||
amiga_callhooka.o \
|
||||
amiga_coercemethod.o \
|
||||
amiga_createextio.o \
|
||||
amiga_createport.o \
|
||||
amiga_createstdio.o \
|
||||
amiga_createtask.o \
|
||||
amiga_deleteextio.o \
|
||||
amiga_deleteport.o \
|
||||
amiga_deletestdio.o \
|
||||
amiga_deletetask.o \
|
||||
amiga_domethod.o \
|
||||
amiga_dosupermethod.o \
|
||||
amiga_dotimer.o \
|
||||
amiga_fastrand.o \
|
||||
amiga_freeievents.o \
|
||||
amiga_hotkey.o \
|
||||
amiga_invertstring.o \
|
||||
amiga_newlist.o \
|
||||
amiga_rangerand.o \
|
||||
amiga_remtof.o \
|
||||
amiga_rexxvars.o \
|
||||
amiga_setsuperattrs.o \
|
||||
amiga_timedelay.o \
|
||||
amiga_waitbeam.o
|
||||
|
||||
AMIGA_LIB_OS3 := \
|
||||
amiga_callhook.o \
|
||||
amiga_hookentry.o
|
||||
|
||||
AMIGA_LIB_OS4 :=
|
||||
455
library/libc.gmk
455
library/libc.gmk
@ -1,447 +1,44 @@
|
||||
#
|
||||
# $Id: libc.gmk,v 1.9 2010-10-20 13:50:17 obarthel Exp $
|
||||
#
|
||||
# :ts=8
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
##############################################################################
|
||||
|
||||
LIBS += \
|
||||
lib/libc.a \
|
||||
lib/soft-float/libc.a \
|
||||
lib/small-data/libc.a \
|
||||
lib/baserel/libc.a \
|
||||
lib.threadsafe/libc.a \
|
||||
lib.threadsafe/soft-float/libc.a \
|
||||
lib.threadsafe/small-data/libc.a \
|
||||
lib.threadsafe/baserel/libc.a
|
||||
include libc.obj.gmk
|
||||
C_LIB := $(sort $(C_LIB_COMMON) $(C_LIB_OS4))
|
||||
|
||||
##############################################################################
|
||||
|
||||
C_LIB := \
|
||||
c.lib_rev.o \
|
||||
ctype_isalnum.o \
|
||||
ctype_isalpha.o \
|
||||
ctype_isascii.o \
|
||||
ctype_isblank.o \
|
||||
ctype_iscntrl.o \
|
||||
ctype_isdigit.o \
|
||||
ctype_isgraph.o \
|
||||
ctype_islower.o \
|
||||
ctype_isprint.o \
|
||||
ctype_ispunct.o \
|
||||
ctype_isspace.o \
|
||||
ctype_isupper.o \
|
||||
ctype_isxdigit.o \
|
||||
ctype_table.o \
|
||||
ctype_tolower.o \
|
||||
ctype_toupper.o \
|
||||
dirent_closedir.o \
|
||||
dirent_opendir.o \
|
||||
dirent_readdir.o \
|
||||
dirent_rewinddir.o \
|
||||
errno_data.o \
|
||||
fcntl_close.o \
|
||||
fcntl_creat.o \
|
||||
fcntl_fcntl.o \
|
||||
fcntl_get_default_file.o \
|
||||
fcntl_lock.o \
|
||||
fcntl_lseek.o \
|
||||
fcntl_open.o \
|
||||
fcntl_read.o \
|
||||
fcntl_write.o \
|
||||
ftw_ftw.o \
|
||||
ftw_nftw.o \
|
||||
inttypes_imaxdiv.o \
|
||||
inttypes_imaxabs.o \
|
||||
inttypes_strtoimax.o \
|
||||
inttypes_strtoumax.o \
|
||||
libgen_basename.o \
|
||||
libgen_dirname.o \
|
||||
locale_init_exit.o \
|
||||
locale_localeconv.o \
|
||||
locale_open_locale.o \
|
||||
locale_setlocale.o \
|
||||
mount_convertinfo.o \
|
||||
mount_fstatfs.o \
|
||||
mount_statfs.o \
|
||||
profile_profil.o \
|
||||
signal_checkabort.o \
|
||||
signal_data.o \
|
||||
signal_kill.o \
|
||||
signal_mask.o \
|
||||
signal_raise.o \
|
||||
signal_sigaddset.o \
|
||||
signal_sigblock.o \
|
||||
signal_sigemptyset.o \
|
||||
signal_sigmask.o \
|
||||
signal_signal.o \
|
||||
signal_sigprocmask.o \
|
||||
signal_sigsetmask.o \
|
||||
stat_chmod.o \
|
||||
stat_convertfileinfo.o \
|
||||
stat_fchmod.o \
|
||||
stat_fstat.o \
|
||||
stat_lstat.o \
|
||||
stat_lock.o \
|
||||
stat_mkdir.o \
|
||||
stat_rmdir.o \
|
||||
stat_stat.o \
|
||||
stat_umask.o \
|
||||
stdio_asprintf.o \
|
||||
stdio_change_fd_action.o \
|
||||
stdio_change_fd_user_data.o \
|
||||
stdio_clearerr.o \
|
||||
stdio_dropiobreadbuffer.o \
|
||||
stdio_duplicate_fd.o \
|
||||
stdio_examine_fh.o \
|
||||
stdio_fclose.o \
|
||||
stdio_fdhookentry.o \
|
||||
stdio_feof.o \
|
||||
stdio_ferror.o \
|
||||
stdio_fflush.o \
|
||||
stdio_fgetc.o \
|
||||
stdio_fgetpos.o \
|
||||
stdio_fgets.o \
|
||||
stdio_filliobreadbuffer.o \
|
||||
stdio_findvacantfdentry.o \
|
||||
stdio_findvacantiobentry.o \
|
||||
stdio_flockfile.o \
|
||||
stdio_flush.o \
|
||||
stdio_flush_all_files.o \
|
||||
stdio_flushiobwritebuffer.o \
|
||||
stdio_fopen.o \
|
||||
stdio_fprintf.o \
|
||||
stdio_fputc.o \
|
||||
stdio_fputs.o \
|
||||
stdio_fread.o \
|
||||
stdio_freopen.o \
|
||||
stdio_fscanf.o \
|
||||
stdio_fseek.o \
|
||||
stdio_fseeko.o \
|
||||
stdio_fsetpos.o \
|
||||
stdio_ftell.o \
|
||||
stdio_ftello.o \
|
||||
stdio_ftrylockfile.o \
|
||||
stdio_funlockfile.o \
|
||||
stdio_fwrite.o \
|
||||
stdio_getc.o \
|
||||
stdio_getc_unlocked.o \
|
||||
stdio_getchar.o \
|
||||
stdio_getchar_unlocked.o \
|
||||
stdio_gets.o \
|
||||
stdio_get_fd.o \
|
||||
stdio_get_file_descriptor.o \
|
||||
stdio_growfdtable.o \
|
||||
stdio_growiobtable.o \
|
||||
stdio_grow_file.o \
|
||||
stdio_initializefd.o \
|
||||
stdio_initializeiob.o \
|
||||
stdio_init_exit.o \
|
||||
stdio_file_init.o \
|
||||
stdio_iobhookentry.o \
|
||||
stdio_lock.o \
|
||||
stdio_locksemaphorename.o \
|
||||
stdio_nostdio.o \
|
||||
stdio_openiob.o \
|
||||
stdio_parent_of_fh.o \
|
||||
stdio_perror.o \
|
||||
stdio_popen.o \
|
||||
stdio_printf.o \
|
||||
stdio_putc.o \
|
||||
stdio_putc_unlocked.o \
|
||||
stdio_putchar.o \
|
||||
stdio_putchar_unlocked.o \
|
||||
stdio_puts.o \
|
||||
stdio_remove.o \
|
||||
stdio_remove_fd_alias.o \
|
||||
stdio_rename.o \
|
||||
stdio_resolve_fd_file.o \
|
||||
stdio_rewind.o \
|
||||
stdio_scanf.o \
|
||||
stdio_setbuf.o \
|
||||
stdio_setvbuf.o \
|
||||
stdio_snprintf.o \
|
||||
stdio_sprintf.o \
|
||||
stdio_sscanf.o \
|
||||
stdio_sscanf_hook_entry.o \
|
||||
stdio_tmpfile.o \
|
||||
stdio_tmpnam.o \
|
||||
stdio_translateioerror.o \
|
||||
stdio_ungetc.o \
|
||||
stdio_unlockfile.o \
|
||||
stdio_vasprintf.o \
|
||||
stdio_vasprintf_hook_entry.o \
|
||||
stdio_vfprintf.o \
|
||||
stdio_vfscanf.o \
|
||||
stdio_vsscanf.o \
|
||||
stdio_vscanf.o \
|
||||
stdio_vprintf.o \
|
||||
stdio_vsnprintf.o \
|
||||
stdio_vsnprintf_hook_entry.o \
|
||||
stdio_vsprintf.o \
|
||||
stdio_vsprintf_hook_entry.o \
|
||||
stdlib_abort.o \
|
||||
stdlib_abs.o \
|
||||
stdlib_alloca.o \
|
||||
stdlib_alloca_cleanup.o \
|
||||
stdlib_alloca_trap.o \
|
||||
stdlib_assertion_failure.o \
|
||||
stdlib_atexit.o \
|
||||
stdlib_atoi.o \
|
||||
stdlib_atol.o \
|
||||
stdlib_atoll.o \
|
||||
stdlib_bsearch.o \
|
||||
stdlib_calloc.o \
|
||||
stdlib_checkdetach.o \
|
||||
stdlib_constructor.o \
|
||||
stdlib_constructor_begin.o \
|
||||
stdlib_default_pool_size.o \
|
||||
stdlib_default_puddle_size.o \
|
||||
stdlib_destructor.o \
|
||||
stdlib_detach.o \
|
||||
stdlib_disablerequesters.o \
|
||||
stdlib_div.o \
|
||||
stdlib_divsi3.o \
|
||||
stdlib_divsi4.o \
|
||||
stdlib_dlclose.o \
|
||||
stdlib_dlerror.o \
|
||||
stdlib_dlopen.o \
|
||||
stdlib_dlsym.o \
|
||||
stdlib_dosbase.o \
|
||||
stdlib_exit.o \
|
||||
stdlib_free.o \
|
||||
stdlib_free_unused_slabs.o \
|
||||
stdlib_getdefstacksize.o \
|
||||
stdlib_getenv.o \
|
||||
stdlib_getmemstats.o \
|
||||
stdlib_getsp.o \
|
||||
stdlib_get_errno.o \
|
||||
stdlib_get_slab_usage.o \
|
||||
stdlib_get_slab_allocations.o \
|
||||
stdlib_get_slab_stats.o \
|
||||
stdlib_isresident.o \
|
||||
stdlib_labs.o \
|
||||
stdlib_llabs.o \
|
||||
stdlib_ldiv.o \
|
||||
stdlib_lldiv.o \
|
||||
stdlib_lib_main.o \
|
||||
stdlib_lib_startup.o \
|
||||
stdlib_machine_test.o \
|
||||
stdlib_main.o \
|
||||
stdlib_main_stub.o \
|
||||
stdlib_malloc.o \
|
||||
stdlib_math.o \
|
||||
stdlib_mkdtemp.o \
|
||||
stdlib_mkstemp.o \
|
||||
stdlib_mktemp.o \
|
||||
stdlib_modsi3.o \
|
||||
stdlib_mulsi3.o \
|
||||
stdlib_never_free.o \
|
||||
stdlib_osliberror.o \
|
||||
stdlib_oslibversion.o \
|
||||
stdlib_priority.o \
|
||||
stdlib_process_name.o \
|
||||
stdlib_program_name.o \
|
||||
stdlib_putenv.o \
|
||||
stdlib_qsort.o \
|
||||
stdlib_rand.o \
|
||||
stdlib_rand_r.o \
|
||||
stdlib_realloc.o \
|
||||
stdlib_red_black.o \
|
||||
stdlib_resetmemstats.o \
|
||||
stdlib_semaphore.o \
|
||||
stdlib_setenv.o \
|
||||
stdlib_setjmp.o \
|
||||
stdlib_set_errno.o \
|
||||
stdlib_set_process_window.o \
|
||||
stdlib_shared_objs.o \
|
||||
stdlib_shell_escape.o \
|
||||
stdlib_showerror.o \
|
||||
stdlib_slab.o \
|
||||
stdlib_slab_max_size.o \
|
||||
stdlib_slab_purge_threshold.o \
|
||||
stdlib_srand.o \
|
||||
stdlib_stacksize.o \
|
||||
stdlib_stack_usage.o \
|
||||
stdlib_arg.o \
|
||||
stdlib_stdio_window_spec.o \
|
||||
stdlib_strtol.o \
|
||||
stdlib_strtoll.o \
|
||||
stdlib_strtoul.o \
|
||||
stdlib_strtoull.o \
|
||||
stdlib_swapstack.o \
|
||||
stdlib_sysbase.o \
|
||||
stdlib_system.o \
|
||||
stdlib_termination_message.o \
|
||||
stdlib_threshold.o \
|
||||
stdlib_utilitybase.o \
|
||||
stdlib_udivsi3.o \
|
||||
stdlib_udivsi4.o \
|
||||
stdlib_umodsi3.o \
|
||||
stdlib_unsetenv.o \
|
||||
strings_ffs.o \
|
||||
strings_strcasecmp.o \
|
||||
strings_strncasecmp.o \
|
||||
string_bcmp.o \
|
||||
string_bcopy.o \
|
||||
string_bzero.o \
|
||||
string_index.o \
|
||||
string_memchr.o \
|
||||
string_memcmp.o \
|
||||
string_memcpy.o \
|
||||
string_memmove.o \
|
||||
string_memset.o \
|
||||
string_rindex.o \
|
||||
string_strcat.o \
|
||||
string_strchr.o \
|
||||
string_strcmp.o \
|
||||
string_strcoll.o \
|
||||
string_strcpy.o \
|
||||
string_strcspn.o \
|
||||
string_strdup.o \
|
||||
string_strerror.o \
|
||||
string_strerror_r.o \
|
||||
string_strlcat.o \
|
||||
string_strlcpy.o \
|
||||
string_strlen.o \
|
||||
string_strncat.o \
|
||||
string_strncmp.o \
|
||||
string_strncpy.o \
|
||||
string_strpbrk.o \
|
||||
string_strrchr.o \
|
||||
string_strspn.o \
|
||||
string_strstr.o \
|
||||
string_strtok.o \
|
||||
string_strtok_r.o \
|
||||
string_strxfrm.o \
|
||||
time_asctime.o \
|
||||
time_asctime_r.o \
|
||||
time_clock.o \
|
||||
time_converttime.o \
|
||||
time_convert_datestamp.o \
|
||||
time_convert_time.o \
|
||||
time_ctime.o \
|
||||
time_ctime_r.o \
|
||||
time_data.o \
|
||||
time_days_per_date.o \
|
||||
time_gettimeofday.o \
|
||||
time_gmtime.o \
|
||||
time_gmtime_r.o \
|
||||
time_localtime.o \
|
||||
time_localtime_r.o \
|
||||
time_mktime.o \
|
||||
time_numbertostring.o \
|
||||
time_strftime.o \
|
||||
time_time.o \
|
||||
time_weekday.o \
|
||||
uio_readv.o \
|
||||
uio_writev.o \
|
||||
ulimit_ulimit.o \
|
||||
unistd_access.o \
|
||||
unistd_chdir.o \
|
||||
unistd_chdir_exit.o \
|
||||
unistd_chown.o \
|
||||
unistd_currentpathname.o \
|
||||
unistd_dup.o \
|
||||
unistd_dup2.o \
|
||||
unistd_fchown.o \
|
||||
unistd_fdatasync.o \
|
||||
unistd_fdopen.o \
|
||||
unistd_fileno.o \
|
||||
unistd_fsync.o \
|
||||
unistd_ftruncate.o \
|
||||
unistd_getcwd.o \
|
||||
unistd_getopt.o \
|
||||
unistd_getpid.o \
|
||||
unistd_init_exit.o \
|
||||
unistd_isatty.o \
|
||||
unistd_lchown.o \
|
||||
unistd_link.o \
|
||||
unistd_lockf.o \
|
||||
unistd_readlink.o \
|
||||
unistd_realpath.o \
|
||||
unistd_sleep.o \
|
||||
unistd_symlink.o \
|
||||
unistd_sync_fd.o \
|
||||
unistd_timer.o \
|
||||
unistd_time_delay.o \
|
||||
unistd_truncate.o \
|
||||
unistd_unlink.o \
|
||||
unistd_usleep.o \
|
||||
utime_utime.o \
|
||||
utsname_uname.o
|
||||
define libc_rule
|
||||
|
||||
##############################################################################
|
||||
LIBS += lib/$(1).a lib.threadsafe/$(1).a
|
||||
|
||||
# Dependencies to rebuild if the library version changes
|
||||
obj/$(1)/c.lib_rev.o : c.lib_rev.c c.lib_rev.h
|
||||
obj.threadsafe/$(1)/c.lib_rev.o : c.lib_rev.c c.lib_rev.h
|
||||
|
||||
obj/libc/c.lib_rev.o : c.lib_rev.c c.lib_rev.h
|
||||
obj/soft-float/libc/c.lib_rev.o : c.lib_rev.c c.lib_rev.h
|
||||
obj/small-data/libc/c.lib_rev.o : c.lib_rev.c c.lib_rev.h
|
||||
obj/baserel/libc/c.lib_rev.o : c.lib_rev.c c.lib_rev.h
|
||||
obj.threadsafe/libc/c.lib_rev.o : c.lib_rev.c c.lib_rev.h
|
||||
obj.threadsafe/soft-float/libc/c.lib_rev.o : c.lib_rev.c c.lib_rev.h
|
||||
obj.threadsafe/small-data/libc/c.lib_rev.o : c.lib_rev.c c.lib_rev.h
|
||||
obj.threadsafe/baserel/libc/c.lib_rev.o : c.lib_rev.c c.lib_rev.h
|
||||
obj/$(1)/%.o : CFLAGS += $(2)
|
||||
obj/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
obj.threadsafe/$(1)/%.o : CFLAGS += $(THREADSAFE) $(2)
|
||||
obj.threadsafe/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
lib/$(1).a : $$(addprefix obj/$(1)/,$$(C_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
lib.threadsafe/$(1).a : $$(addprefix obj.threadsafe/$(1)/,$$(C_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
endef
|
||||
|
||||
##############################################################################
|
||||
|
||||
obj/libc/%.o : CFLAGS += $(LARGEDATA)
|
||||
obj/libc/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/soft-float/libc/%.o : CFLAGS += $(SOFTFLOAT)
|
||||
obj/soft-float/libc/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/small-data/libc/%.o : CFLAGS += $(SMALLDATA)
|
||||
obj/small-data/libc/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/baserel/libc/%.o : CFLAGS += $(BASEREL)
|
||||
obj/baserel/libc/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/libc/%.o : CFLAGS += $(THREADSAFE) $(LARGEDATA)
|
||||
obj.threadsafe/libc/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/soft-float/libc/%.o : CFLAGS += $(THREADSAFE) $(SOFTFLOAT)
|
||||
obj.threadsafe/soft-float/libc/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/small-data/libc/%.o : CFLAGS += $(THREADSAFE) $(SMALLDATA)
|
||||
obj.threadsafe/small-data/libc/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/baserel/libc/%.o : CFLAGS += $(THREADSAFE) $(BASEREL)
|
||||
obj.threadsafe/baserel/libc/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
##############################################################################
|
||||
|
||||
lib/libc.a : $(addprefix obj/libc/,$(C_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/soft-float/libc.a : $(addprefix obj/soft-float/libc/,$(C_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/small-data/libc.a : $(addprefix obj/small-data/libc/,$(C_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/baserel/libc.a : $(addprefix obj/baserel/libc/,$(C_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/libc.a : $(addprefix obj.threadsafe/libc/,$(C_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/soft-float/libc.a : $(addprefix obj.threadsafe/soft-float/libc/,$(C_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/small-data/libc.a : $(addprefix obj.threadsafe/small-data/libc/,$(C_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/baserel/libc.a : $(addprefix obj.threadsafe/baserel/libc/,$(C_LIB))
|
||||
@$(MAKELIB)
|
||||
$(eval $(call libc_rule,libc,$(LARGEDATA)))
|
||||
$(eval $(call libc_rule,soft-float/libc,$(SOFTFLOAT)))
|
||||
$(eval $(call libc_rule,small-data/libc,$(SMALLDATA)))
|
||||
$(eval $(call libc_rule,baserel/libc,$(BASEREL)))
|
||||
|
||||
363
library/libc.obj.gmk
Normal file
363
library/libc.obj.gmk
Normal file
@ -0,0 +1,363 @@
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
C_LIB_COMMON := \
|
||||
c.lib_rev.o \
|
||||
ctype_isalnum.o \
|
||||
ctype_isalpha.o \
|
||||
ctype_isascii.o \
|
||||
ctype_isblank.o \
|
||||
ctype_iscntrl.o \
|
||||
ctype_isdigit.o \
|
||||
ctype_isgraph.o \
|
||||
ctype_islower.o \
|
||||
ctype_isprint.o \
|
||||
ctype_ispunct.o \
|
||||
ctype_isspace.o \
|
||||
ctype_isupper.o \
|
||||
ctype_isxdigit.o \
|
||||
ctype_table.o \
|
||||
ctype_tolower.o \
|
||||
ctype_toupper.o \
|
||||
dirent_closedir.o \
|
||||
dirent_opendir.o \
|
||||
dirent_readdir.o \
|
||||
dirent_rewinddir.o \
|
||||
errno_data.o \
|
||||
fcntl_close.o \
|
||||
fcntl_creat.o \
|
||||
fcntl_fcntl.o \
|
||||
fcntl_get_default_file.o \
|
||||
fcntl_lock.o \
|
||||
fcntl_lseek.o \
|
||||
fcntl_open.o \
|
||||
fcntl_read.o \
|
||||
fcntl_write.o \
|
||||
ftw_ftw.o \
|
||||
ftw_nftw.o \
|
||||
inttypes_imaxdiv.o \
|
||||
inttypes_imaxabs.o \
|
||||
inttypes_strtoimax.o \
|
||||
inttypes_strtoumax.o \
|
||||
libgen_basename.o \
|
||||
libgen_dirname.o \
|
||||
locale_init_exit.o \
|
||||
locale_localeconv.o \
|
||||
locale_open_locale.o \
|
||||
locale_setlocale.o \
|
||||
mount_convertinfo.o \
|
||||
mount_fstatfs.o \
|
||||
mount_statfs.o \
|
||||
signal_checkabort.o \
|
||||
signal_data.o \
|
||||
signal_kill.o \
|
||||
signal_mask.o \
|
||||
signal_raise.o \
|
||||
signal_sigaddset.o \
|
||||
signal_sigblock.o \
|
||||
signal_sigemptyset.o \
|
||||
signal_sigmask.o \
|
||||
signal_signal.o \
|
||||
signal_sigprocmask.o \
|
||||
signal_sigsetmask.o \
|
||||
stat_chmod.o \
|
||||
stat_convertfileinfo.o \
|
||||
stat_fchmod.o \
|
||||
stat_fstat.o \
|
||||
stat_lstat.o \
|
||||
stat_lock.o \
|
||||
stat_mkdir.o \
|
||||
stat_rmdir.o \
|
||||
stat_stat.o \
|
||||
stat_umask.o \
|
||||
stdio_asprintf.o \
|
||||
stdio_change_fd_action.o \
|
||||
stdio_change_fd_user_data.o \
|
||||
stdio_clearerr.o \
|
||||
stdio_dropiobreadbuffer.o \
|
||||
stdio_duplicate_fd.o \
|
||||
stdio_examine_fh.o \
|
||||
stdio_fclose.o \
|
||||
stdio_fdhookentry.o \
|
||||
stdio_feof.o \
|
||||
stdio_ferror.o \
|
||||
stdio_fflush.o \
|
||||
stdio_fgetc.o \
|
||||
stdio_fgetpos.o \
|
||||
stdio_fgets.o \
|
||||
stdio_filliobreadbuffer.o \
|
||||
stdio_findvacantfdentry.o \
|
||||
stdio_findvacantiobentry.o \
|
||||
stdio_flockfile.o \
|
||||
stdio_flush.o \
|
||||
stdio_flush_all_files.o \
|
||||
stdio_flushiobwritebuffer.o \
|
||||
stdio_fopen.o \
|
||||
stdio_fprintf.o \
|
||||
stdio_fputc.o \
|
||||
stdio_fputs.o \
|
||||
stdio_fread.o \
|
||||
stdio_freopen.o \
|
||||
stdio_fscanf.o \
|
||||
stdio_fseek.o \
|
||||
stdio_fseeko.o \
|
||||
stdio_fsetpos.o \
|
||||
stdio_ftell.o \
|
||||
stdio_ftello.o \
|
||||
stdio_ftrylockfile.o \
|
||||
stdio_funlockfile.o \
|
||||
stdio_fwrite.o \
|
||||
stdio_getc.o \
|
||||
stdio_getc_unlocked.o \
|
||||
stdio_getchar.o \
|
||||
stdio_getchar_unlocked.o \
|
||||
stdio_gets.o \
|
||||
stdio_get_fd.o \
|
||||
stdio_get_file_descriptor.o \
|
||||
stdio_growfdtable.o \
|
||||
stdio_growiobtable.o \
|
||||
stdio_grow_file.o \
|
||||
stdio_initializefd.o \
|
||||
stdio_initializeiob.o \
|
||||
stdio_init_exit.o \
|
||||
stdio_file_init.o \
|
||||
stdio_iobhookentry.o \
|
||||
stdio_lock.o \
|
||||
stdio_locksemaphorename.o \
|
||||
stdio_nostdio.o \
|
||||
stdio_openiob.o \
|
||||
stdio_parent_of_fh.o \
|
||||
stdio_perror.o \
|
||||
stdio_popen.o \
|
||||
stdio_printf.o \
|
||||
stdio_putc.o \
|
||||
stdio_putc_unlocked.o \
|
||||
stdio_putchar.o \
|
||||
stdio_putchar_unlocked.o \
|
||||
stdio_puts.o \
|
||||
stdio_remove.o \
|
||||
stdio_remove_fd_alias.o \
|
||||
stdio_rename.o \
|
||||
stdio_resolve_fd_file.o \
|
||||
stdio_rewind.o \
|
||||
stdio_scanf.o \
|
||||
stdio_setbuf.o \
|
||||
stdio_setvbuf.o \
|
||||
stdio_snprintf.o \
|
||||
stdio_sprintf.o \
|
||||
stdio_sscanf.o \
|
||||
stdio_sscanf_hook_entry.o \
|
||||
stdio_tmpfile.o \
|
||||
stdio_tmpnam.o \
|
||||
stdio_translateioerror.o \
|
||||
stdio_ungetc.o \
|
||||
stdio_unlockfile.o \
|
||||
stdio_vasprintf.o \
|
||||
stdio_vasprintf_hook_entry.o \
|
||||
stdio_vfprintf.o \
|
||||
stdio_vfscanf.o \
|
||||
stdio_vprintf.o \
|
||||
stdio_vsnprintf.o \
|
||||
stdio_vsnprintf_hook_entry.o \
|
||||
stdio_vsprintf.o \
|
||||
stdio_vsprintf_hook_entry.o \
|
||||
stdio_vsscanf.o \
|
||||
stdio_vscanf.o \
|
||||
stdlib_abort.o \
|
||||
stdlib_abs.o \
|
||||
stdlib_alloca.o \
|
||||
stdlib_alloca_cleanup.o \
|
||||
stdlib_alloca_trap.o \
|
||||
stdlib_assertion_failure.o \
|
||||
stdlib_atexit.o \
|
||||
stdlib_atoi.o \
|
||||
stdlib_atol.o \
|
||||
stdlib_atoll.o \
|
||||
stdlib_bsearch.o \
|
||||
stdlib_calloc.o \
|
||||
stdlib_checkdetach.o \
|
||||
stdlib_constructor.o \
|
||||
stdlib_constructor_begin.o \
|
||||
stdlib_default_pool_size.o \
|
||||
stdlib_default_puddle_size.o \
|
||||
stdlib_destructor.o \
|
||||
stdlib_detach.o \
|
||||
stdlib_disablerequesters.o \
|
||||
stdlib_div.o \
|
||||
stdlib_divsi3.o \
|
||||
stdlib_divsi4.o \
|
||||
stdlib_dosbase.o \
|
||||
stdlib_exit.o \
|
||||
stdlib_free.o \
|
||||
stdlib_decay_unused_slabs.o \
|
||||
stdlib_free_unused_slabs.o \
|
||||
stdlib_getdefstacksize.o \
|
||||
stdlib_getenv.o \
|
||||
stdlib_getmemstats.o \
|
||||
stdlib_getsp.o \
|
||||
stdlib_get_errno.o \
|
||||
stdlib_get_slab_usage.o \
|
||||
stdlib_get_slab_allocations.o \
|
||||
stdlib_get_slab_stats.o \
|
||||
stdlib_isresident.o \
|
||||
stdlib_labs.o \
|
||||
stdlib_llabs.o \
|
||||
stdlib_ldiv.o \
|
||||
stdlib_lldiv.o \
|
||||
stdlib_lib_main.o \
|
||||
stdlib_lib_startup.o \
|
||||
stdlib_machine_test.o \
|
||||
stdlib_main.o \
|
||||
stdlib_main_stub.o \
|
||||
stdlib_malloc.o \
|
||||
stdlib_math.o \
|
||||
stdlib_mkdtemp.o \
|
||||
stdlib_mkstemp.o \
|
||||
stdlib_mktemp.o \
|
||||
stdlib_modsi3.o \
|
||||
stdlib_mulsi3.o \
|
||||
stdlib_never_free.o \
|
||||
stdlib_osliberror.o \
|
||||
stdlib_oslibversion.o \
|
||||
stdlib_priority.o \
|
||||
stdlib_process_name.o \
|
||||
stdlib_program_name.o \
|
||||
stdlib_putenv.o \
|
||||
stdlib_qsort.o \
|
||||
stdlib_rand.o \
|
||||
stdlib_rand_r.o \
|
||||
stdlib_realloc.o \
|
||||
stdlib_red_black.o \
|
||||
stdlib_resetmemstats.o \
|
||||
stdlib_semaphore.o \
|
||||
stdlib_setenv.o \
|
||||
stdlib_setjmp.o \
|
||||
stdlib_set_errno.o \
|
||||
stdlib_set_process_window.o \
|
||||
stdlib_shell_escape.o \
|
||||
stdlib_showerror.o \
|
||||
stdlib_slab.o \
|
||||
stdlib_slab_max_size.o \
|
||||
stdlib_slab_purge_threshold.o \
|
||||
stdlib_srand.o \
|
||||
stdlib_stacksize.o \
|
||||
stdlib_stack_usage.o \
|
||||
stdlib_arg.o \
|
||||
stdlib_stdio_window_spec.o \
|
||||
stdlib_strtol.o \
|
||||
stdlib_strtoll.o \
|
||||
stdlib_strtoul.o \
|
||||
stdlib_strtoull.o \
|
||||
stdlib_swapstack.o \
|
||||
stdlib_sysbase.o \
|
||||
stdlib_system.o \
|
||||
stdlib_termination_message.o \
|
||||
stdlib_threshold.o \
|
||||
stdlib_utilitybase.o \
|
||||
stdlib_udivsi3.o \
|
||||
stdlib_udivsi4.o \
|
||||
stdlib_umodsi3.o \
|
||||
stdlib_unsetenv.o \
|
||||
strings_ffs.o \
|
||||
strings_strcasecmp.o \
|
||||
strings_strncasecmp.o \
|
||||
string_bcmp.o \
|
||||
string_bcopy.o \
|
||||
string_bzero.o \
|
||||
string_index.o \
|
||||
string_memchr.o \
|
||||
string_memcmp.o \
|
||||
string_memcpy.o \
|
||||
string_memmove.o \
|
||||
string_memset.o \
|
||||
string_rindex.o \
|
||||
string_strcat.o \
|
||||
string_strchr.o \
|
||||
string_strcmp.o \
|
||||
string_strcoll.o \
|
||||
string_strcpy.o \
|
||||
string_strcspn.o \
|
||||
string_strdup.o \
|
||||
string_strerror.o \
|
||||
string_strerror_r.o \
|
||||
string_strlcat.o \
|
||||
string_strlcpy.o \
|
||||
string_strlen.o \
|
||||
string_strncat.o \
|
||||
string_strncmp.o \
|
||||
string_strncpy.o \
|
||||
string_strpbrk.o \
|
||||
string_strrchr.o \
|
||||
string_strspn.o \
|
||||
string_strstr.o \
|
||||
string_strtok.o \
|
||||
string_strtok_r.o \
|
||||
string_strxfrm.o \
|
||||
time_asctime.o \
|
||||
time_asctime_r.o \
|
||||
time_clock.o \
|
||||
time_converttime.o \
|
||||
time_convert_datestamp.o \
|
||||
time_convert_time.o \
|
||||
time_ctime.o \
|
||||
time_ctime_r.o \
|
||||
time_data.o \
|
||||
time_days_per_date.o \
|
||||
time_gettimeofday.o \
|
||||
time_gmtime.o \
|
||||
time_gmtime_r.o \
|
||||
time_localtime.o \
|
||||
time_localtime_r.o \
|
||||
time_mktime.o \
|
||||
time_numbertostring.o \
|
||||
time_strftime.o \
|
||||
time_time.o \
|
||||
time_weekday.o \
|
||||
uio_readv.o \
|
||||
uio_writev.o \
|
||||
ulimit_ulimit.o \
|
||||
unistd_access.o \
|
||||
unistd_chdir.o \
|
||||
unistd_chdir_exit.o \
|
||||
unistd_chown.o \
|
||||
unistd_currentpathname.o \
|
||||
unistd_dup.o \
|
||||
unistd_dup2.o \
|
||||
unistd_fchown.o \
|
||||
unistd_fdatasync.o \
|
||||
unistd_fdopen.o \
|
||||
unistd_fileno.o \
|
||||
unistd_fsync.o \
|
||||
unistd_ftruncate.o \
|
||||
unistd_getcwd.o \
|
||||
unistd_getopt.o \
|
||||
unistd_getpid.o \
|
||||
unistd_init_exit.o \
|
||||
unistd_isatty.o \
|
||||
unistd_lchown.o \
|
||||
unistd_link.o \
|
||||
unistd_lockf.o \
|
||||
unistd_readlink.o \
|
||||
unistd_realpath.o \
|
||||
unistd_sleep.o \
|
||||
unistd_symlink.o \
|
||||
unistd_sync_fd.o \
|
||||
unistd_timer.o \
|
||||
unistd_time_delay.o \
|
||||
unistd_truncate.o \
|
||||
unistd_unlink.o \
|
||||
unistd_usleep.o \
|
||||
utime_utime.o \
|
||||
utsname_uname.o
|
||||
|
||||
C_LIB_OS3 := \
|
||||
unistd_unlink_retries.o
|
||||
|
||||
C_LIB_OS4 := \
|
||||
profile_profil.o \
|
||||
stdlib_dlclose.o \
|
||||
stdlib_dlerror.o \
|
||||
stdlib_dlopen.o \
|
||||
stdlib_dlsym.o \
|
||||
stdlib_shared_objs.o
|
||||
@ -1,125 +1,43 @@
|
||||
#
|
||||
# $Id: libdebug.gmk,v 1.1 2006-09-17 17:37:27 obarthel Exp $
|
||||
#
|
||||
# :ts=8
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
##############################################################################
|
||||
|
||||
LIBS += \
|
||||
lib/libdebug.a \
|
||||
lib/soft-float/libdebug.a \
|
||||
lib/small-data/libdebug.a \
|
||||
lib/baserel/libdebug.a \
|
||||
lib.threadsafe/libdebug.a \
|
||||
lib.threadsafe/soft-float/libdebug.a \
|
||||
lib.threadsafe/small-data/libdebug.a \
|
||||
lib.threadsafe/baserel/libdebug.a
|
||||
include libdebug.obj.gmk
|
||||
|
||||
##############################################################################
|
||||
|
||||
DEBUG_LIB = \
|
||||
debug.lib_rev.o \
|
||||
debug.o \
|
||||
debug_cmpstrexec.o \
|
||||
debug_kcmpstr.o \
|
||||
debug_kdofmt.o \
|
||||
debug_kgetc.o \
|
||||
debug_kgetch1.o \
|
||||
debug_kgetch2.o \
|
||||
debug_kgetchar1.o \
|
||||
debug_kgetchar2.o \
|
||||
debug_kgetnum1.o \
|
||||
debug_kgetnum2.o \
|
||||
debug_kmaygetch.o \
|
||||
debug_kmaygetchar.o \
|
||||
debug_kprintf1.o \
|
||||
debug_kprintf2.o \
|
||||
debug_kputc.o \
|
||||
debug_kputch1.o \
|
||||
debug_kputch2.o \
|
||||
debug_kputchar1.o \
|
||||
debug_kputchar2.o \
|
||||
debug_kputfmt.o \
|
||||
debug_kputs1.o \
|
||||
debug_kputs2.o \
|
||||
debug_kputstr1.o \
|
||||
debug_kputstr2.o \
|
||||
debug_kvprintf1.o \
|
||||
debug_kvprintf2.o \
|
||||
debug_level.o
|
||||
define libdebug_rule
|
||||
|
||||
##############################################################################
|
||||
LIBS += lib/$(1).a lib.threadsafe/$(1).a
|
||||
|
||||
# Dependencies to rebuild if the library version changes
|
||||
obj/$(1)/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h
|
||||
obj.threadsafe/$(1)/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h
|
||||
|
||||
obj/libdebug/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h
|
||||
obj/soft-float/libdebug/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h
|
||||
obj/small-data/libdebug/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h
|
||||
obj/baserel/libdebug/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h
|
||||
obj.threadsafe/libdebug/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h
|
||||
obj.threadsafe/soft-float/libdebug/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h
|
||||
obj.threadsafe/small-data/libdebug/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h
|
||||
obj.threadsafe/baserel/libdebug/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h
|
||||
obj/$(1)/%.o : CFLAGS += $(2)
|
||||
obj/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
obj.threadsafe/$(1)/%.o : CFLAGS += $(THREADSAFE) $(2)
|
||||
obj.threadsafe/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
lib/$(1).a : $$(addprefix obj/$(1)/,$$(DEBUG_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
lib.threadsafe/$(1).a : $$(addprefix obj.threadsafe/$(1)/,$$(DEBUG_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
endef
|
||||
|
||||
##############################################################################
|
||||
|
||||
|
||||
obj/libdebug/%.o : CFLAGS += $(LARGEDATA)
|
||||
obj/libdebug/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/soft-float/libdebug/%.o : CFLAGS += $(SOFTFLOAT)
|
||||
obj/soft-float/libdebug/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/small-data/libdebug/%.o : CFLAGS += $(SMALLDATA)
|
||||
obj/small-data/libdebug/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/baserel/libdebug/%.o : CFLAGS += $(BASEREL)
|
||||
obj/baserel/libdebug/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/libdebug/%.o : CFLAGS += $(THREADSAFE) $(LARGEDATA)
|
||||
obj.threadsafe/libdebug/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/soft-float/libdebug/%.o : CFLAGS += $(THREADSAFE) $(SOFTFLOAT)
|
||||
obj.threadsafe/soft-float/libdebug/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/small-data/libdebug/%.o : CFLAGS += $(THREADSAFE) $(SMALLDATA)
|
||||
obj.threadsafe/small-data/libdebug/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/baserel/libdebug/%.o : CFLAGS += $(THREADSAFE) $(BASEREL)
|
||||
obj.threadsafe/baserel/libdebug/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
##############################################################################
|
||||
|
||||
lib/libdebug.a : $(addprefix obj/libdebug/,$(DEBUG_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/soft-float/libdebug.a : $(addprefix obj/soft-float/libdebug/,$(DEBUG_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/small-data/libdebug.a : $(addprefix obj/small-data/libdebug/,$(DEBUG_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/baserel/libdebug.a : $(addprefix obj/baserel/libdebug/,$(DEBUG_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/libdebug.a : $(addprefix obj.threadsafe/libdebug/,$(DEBUG_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/soft-float/libdebug.a : $(addprefix obj.threadsafe/soft-float/libdebug/,$(DEBUG_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/small-data/libdebug.a : $(addprefix obj.threadsafe/small-data/libdebug/,$(DEBUG_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/baserel/libdebug.a : $(addprefix obj.threadsafe/baserel/libdebug/,$(DEBUG_LIB))
|
||||
@$(MAKELIB)
|
||||
$(eval $(call libdebug_rule,libdebug,$(LARGEDATA)))
|
||||
$(eval $(call libdebug_rule,soft-float/libdebug,$(SOFTFLOAT)))
|
||||
$(eval $(call libdebug_rule,small-data/libdebug,$(SMALLDATA)))
|
||||
$(eval $(call libdebug_rule,baserel/libdebug,$(BASEREL)))
|
||||
|
||||
34
library/libdebug.obj.gmk
Normal file
34
library/libdebug.obj.gmk
Normal file
@ -0,0 +1,34 @@
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
DEBUG_LIB := \
|
||||
debug.lib_rev.o \
|
||||
debug.o \
|
||||
debug_cmpstrexec.o \
|
||||
debug_kcmpstr.o \
|
||||
debug_kdofmt.o \
|
||||
debug_kgetc.o \
|
||||
debug_kgetch1.o \
|
||||
debug_kgetch2.o \
|
||||
debug_kgetchar1.o \
|
||||
debug_kgetchar2.o \
|
||||
debug_kgetnum1.o \
|
||||
debug_kgetnum2.o \
|
||||
debug_kmaygetch.o \
|
||||
debug_kmaygetchar.o \
|
||||
debug_kprintf1.o \
|
||||
debug_kprintf2.o \
|
||||
debug_kputc.o \
|
||||
debug_kputch1.o \
|
||||
debug_kputch2.o \
|
||||
debug_kputchar1.o \
|
||||
debug_kputchar2.o \
|
||||
debug_kputfmt.o \
|
||||
debug_kputs1.o \
|
||||
debug_kputs2.o \
|
||||
debug_kputstr1.o \
|
||||
debug_kputstr2.o \
|
||||
debug_kvprintf1.o \
|
||||
debug_kvprintf2.o \
|
||||
debug_level.o
|
||||
277
library/libm.gmk
277
library/libm.gmk
@ -1,265 +1,48 @@
|
||||
#
|
||||
# $Id: libm.gmk,v 1.3 2007-01-06 10:09:48 obarthel Exp $
|
||||
#
|
||||
# :ts=8
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
##############################################################################
|
||||
|
||||
LIBS += \
|
||||
lib/libm.a \
|
||||
lib/soft-float/libm.a \
|
||||
lib/small-data/libm.a \
|
||||
lib/baserel/libm.a \
|
||||
lib.threadsafe/libm.a \
|
||||
lib.threadsafe/soft-float/libm.a \
|
||||
lib.threadsafe/small-data/libm.a \
|
||||
lib.threadsafe/baserel/libm.a
|
||||
include libm.obj.gmk
|
||||
MATH_LIB := $(sort $(MATH_LIB_COMMON) $(MATH_LIB_OS4))
|
||||
|
||||
##############################################################################
|
||||
|
||||
MATH_LIB := \
|
||||
complex_carg.o \
|
||||
complex_cargf.o \
|
||||
complex_cargl.o \
|
||||
complex_cimag.o \
|
||||
complex_cimagf.o \
|
||||
complex_cimagl.o \
|
||||
complex_conj.o \
|
||||
complex_conjf.o \
|
||||
complex_conjl.o \
|
||||
complex_creal.o \
|
||||
complex_crealf.o \
|
||||
complex_creall.o \
|
||||
fenv_feclearexcept.o \
|
||||
fenv_fegetenv.o \
|
||||
fenv_fegetexceptflag.o \
|
||||
fenv_fegetround.o \
|
||||
fenv_feholdexcept.o \
|
||||
fenv_feraiseexcept.o \
|
||||
fenv_fesetenv.o \
|
||||
fenv_fesetexceptflag.o \
|
||||
fenv_fetestexcept.o \
|
||||
fenv_fetestround.o \
|
||||
fenv_feupdateenv.o \
|
||||
math_acos.o \
|
||||
math_acosf.o \
|
||||
math_acosh.o \
|
||||
math_acoshf.o \
|
||||
math_asin.o \
|
||||
math_asinf.o \
|
||||
math_asinh.o \
|
||||
math_asinhf.o \
|
||||
math_atan.o \
|
||||
math_atan2.o \
|
||||
math_atan2f.o \
|
||||
math_atanf.o \
|
||||
math_atanh.o \
|
||||
math_atanhf.o \
|
||||
math_cbrt.o \
|
||||
math_cbrtf.o \
|
||||
math_ceil.o \
|
||||
math_ceilf.o \
|
||||
math_copysign.o \
|
||||
math_copysignf.o \
|
||||
math_cos.o \
|
||||
math_cosf.o \
|
||||
math_cosh.o \
|
||||
math_coshf.o \
|
||||
math_erf.o \
|
||||
math_erfc.o \
|
||||
math_erfcf.o \
|
||||
math_erff.o \
|
||||
math_exp.o \
|
||||
math_exp2.o \
|
||||
math_exp2f.o \
|
||||
math_expf.o \
|
||||
math_expm1.o \
|
||||
math_expm1f.o \
|
||||
math_fabs.o \
|
||||
math_fabsf.o \
|
||||
math_fdim.o \
|
||||
math_fdimf.o \
|
||||
math_floor.o \
|
||||
math_floorf.o \
|
||||
math_fma.o \
|
||||
math_fmaf.o \
|
||||
math_fmax.o \
|
||||
math_fmaxf.o \
|
||||
math_fmin.o \
|
||||
math_fminf.o \
|
||||
math_fmod.o \
|
||||
math_fmodf.o \
|
||||
math_fpclassify.o \
|
||||
math_frexp.o \
|
||||
math_frexpf.o \
|
||||
math_huge_val.o \
|
||||
math_huge_valf.o \
|
||||
math_hypot.o \
|
||||
math_hypotf.o \
|
||||
math_ilogb.o \
|
||||
math_ilogbf.o \
|
||||
math_inf.o \
|
||||
math_inff.o \
|
||||
math_init_exit.o \
|
||||
math_isfinite.o \
|
||||
math_isunordered.o \
|
||||
math_kernel_cos.o \
|
||||
math_kernel_cosf.o \
|
||||
math_kernel_expm1.o \
|
||||
math_kernel_rem_pio2.o \
|
||||
math_kernel_sin.o \
|
||||
math_kernel_sinf.o \
|
||||
math_kernel_tan.o \
|
||||
math_kernel_tanf.o \
|
||||
math_ldexp.o \
|
||||
math_ldexpf.o \
|
||||
math_lgamma.o \
|
||||
math_lgammaf.o \
|
||||
math_llrint.o \
|
||||
math_log.o \
|
||||
math_log10.o \
|
||||
math_log10f.o \
|
||||
math_log1p.o \
|
||||
math_log1pf.o \
|
||||
math_log2.o \
|
||||
math_log2f.o \
|
||||
math_logb.o \
|
||||
math_logbf.o \
|
||||
math_logf.o \
|
||||
math_lrint.o \
|
||||
math_lrintf.o \
|
||||
math_lround.o \
|
||||
math_lroundf.o \
|
||||
math_modf.o \
|
||||
math_modff.o \
|
||||
math_nan.o \
|
||||
math_nanf.o \
|
||||
math_nearbyint.o \
|
||||
math_nearbyintf.o \
|
||||
math_nextafter.o \
|
||||
math_nextafterf.o \
|
||||
math_pow.o \
|
||||
math_powf.o \
|
||||
math_remainder.o \
|
||||
math_remainderf.o \
|
||||
math_remquo.o \
|
||||
math_remquof.o \
|
||||
math_rem_pio2f.o \
|
||||
math_rint.o \
|
||||
math_rintf.o \
|
||||
math_round.o \
|
||||
math_roundf.o \
|
||||
math_scalbn.o \
|
||||
math_scalbnf.o \
|
||||
math_signbit.o \
|
||||
math_sin.o \
|
||||
math_sinf.o \
|
||||
math_sinh.o \
|
||||
math_sinhf.o \
|
||||
math_sqrt.o \
|
||||
math_sqrtf.o \
|
||||
math_tan.o \
|
||||
math_tanf.o \
|
||||
math_tanh.o \
|
||||
math_tanhf.o \
|
||||
math_tgamma.o \
|
||||
math_tgammaf.o \
|
||||
math_trunc.o \
|
||||
math_truncf.o \
|
||||
stdio_asprintf.o \
|
||||
stdio_flush.o \
|
||||
stdio_flush_all_files.o \
|
||||
stdio_fprintf.o \
|
||||
stdio_fscanf.o \
|
||||
stdio_printf.o \
|
||||
stdio_scanf.o \
|
||||
stdio_snprintf.o \
|
||||
stdio_sprintf.o \
|
||||
stdio_sscanf.o \
|
||||
stdio_vasprintf.o \
|
||||
stdio_vfprintf.o \
|
||||
stdio_vfscanf.o \
|
||||
stdio_vsscanf.o \
|
||||
stdio_vscanf.o \
|
||||
stdio_vprintf.o \
|
||||
stdio_vsnprintf.o \
|
||||
stdio_vsprintf.o \
|
||||
stdlib_atof.o \
|
||||
stdlib_strtod.o \
|
||||
stdlib_strtof.o \
|
||||
time_difftime.o
|
||||
define libm_rule
|
||||
|
||||
##############################################################################
|
||||
LIBS += lib/$(1).a lib.threadsafe/$(1).a
|
||||
|
||||
# Dependencies to rebuild if the library version changes
|
||||
obj/$(1)/m.lib_rev.o : m.lib_rev.c m.lib_rev.h
|
||||
obj.threadsafe/$(1)/m.lib_rev.o : m.lib_rev.c m.lib_rev.h
|
||||
|
||||
obj/libm/m.lib_rev.o : m.lib_rev.c m.lib_rev.h
|
||||
obj/soft-float/libm/m.lib_rev.o : m.lib_rev.c m.lib_rev.h
|
||||
obj/small-data/libm/m.lib_rev.o : m.lib_rev.c m.lib_rev.h
|
||||
obj/baserel/libm/m.lib_rev.o : m.lib_rev.c m.lib_rev.h
|
||||
obj.threadsafe/libm/m.lib_rev.o : m.lib_rev.c m.lib_rev.h
|
||||
obj.threadsafe/soft-float/libm/m.lib_rev.o : m.lib_rev.c m.lib_rev.h
|
||||
obj.threadsafe/small-data/libm/m.lib_rev.o : m.lib_rev.c m.lib_rev.h
|
||||
obj.threadsafe/baserel/libm/m.lib_rev.o : m.lib_rev.c m.lib_rev.h
|
||||
obj/$(1)/%.o : CFLAGS += $(2)
|
||||
obj/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
obj.threadsafe/$(1)/%.o : CFLAGS += $(THREADSAFE) $(2)
|
||||
obj.threadsafe/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
lib/$(1).a : $$(addprefix obj/$(1)/,$$(MATH_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
lib.threadsafe/$(1).a : $$(addprefix obj.threadsafe/$(1)/,$$(MATH_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
endef
|
||||
|
||||
##############################################################################
|
||||
|
||||
obj/libm/%.o : CFLAGS += $(LARGEDATA) -DPPC_FLOATING_POINT_SUPPORT
|
||||
obj/libm/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/soft-float/libm/%.o : CFLAGS += $(SOFTFLOAT)
|
||||
obj/soft-float/libm/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/small-data/libm/%.o : CFLAGS += $(SMALLDATA) -DPPC_FLOATING_POINT_SUPPORT
|
||||
obj/small-data/libm/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/baserel/libm/%.o : CFLAGS += $(BASEREL) -DPPC_FLOATING_POINT_SUPPORT
|
||||
obj/baserel/libm/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/libm/%.o : CFLAGS += $(THREADSAFE) $(LARGEDATA) -DPPC_FLOATING_POINT_SUPPORT
|
||||
obj.threadsafe/libm/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/soft-float/libm/%.o : CFLAGS += $(THREADSAFE) $(SOFTFLOAT)
|
||||
obj.threadsafe/soft-float/libm/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/small-data/libm/%.o : CFLAGS += $(THREADSAFE) $(SMALLDATA) -DPPC_FLOATING_POINT_SUPPORT
|
||||
obj.threadsafe/small-data/libm/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/baserel/libm/%.o : CFLAGS += $(THREADSAFE) $(BASEREL) -DPPC_FLOATING_POINT_SUPPORT
|
||||
obj.threadsafe/baserel/libm/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
##############################################################################
|
||||
|
||||
lib/libm.a : $(addprefix obj/libm/,$(MATH_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/soft-float/libm.a : $(addprefix obj/soft-float/libm/,$(MATH_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/small-data/libm.a : $(addprefix obj/small-data/libm/,$(MATH_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/baserel/libm.a : $(addprefix obj/baserel/libm/,$(MATH_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/libm.a : $(addprefix obj.threadsafe/libm/,$(MATH_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/soft-float/libm.a : $(addprefix obj.threadsafe/soft-float/libm/,$(MATH_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/small-data/libm.a : $(addprefix obj.threadsafe/small-data/libm/,$(MATH_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/baserel/libm.a : $(addprefix obj.threadsafe/baserel/libm/,$(MATH_LIB))
|
||||
@$(MAKELIB)
|
||||
$(eval $(call libm_rule,libm, \
|
||||
$(LARGEDATA) -DPPC_FLOATING_POINT_SUPPORT))
|
||||
$(eval $(call libm_rule,soft-float/libm, \
|
||||
$(SOFTFLOAT)))
|
||||
$(eval $(call libm_rule,small-data/libm, \
|
||||
$(SMALLDATA) -DPPC_FLOATING_POINT_SUPPORT))
|
||||
$(eval $(call libm_rule,baserel/libm, \
|
||||
$(BASEREL) -DPPC_FLOATING_POINT_SUPPORT))
|
||||
|
||||
215
library/libm.obj.gmk
Normal file
215
library/libm.obj.gmk
Normal file
@ -0,0 +1,215 @@
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
MATH_LIB_COMMON := \
|
||||
complex_carg.o \
|
||||
complex_cargf.o \
|
||||
complex_cargl.o \
|
||||
complex_cimag.o \
|
||||
complex_cimagf.o \
|
||||
complex_cimagl.o \
|
||||
complex_conj.o \
|
||||
complex_conjf.o \
|
||||
complex_conjl.o \
|
||||
complex_creal.o \
|
||||
complex_crealf.o \
|
||||
complex_creall.o \
|
||||
fenv_feclearexcept.o \
|
||||
fenv_fegetenv.o \
|
||||
fenv_fegetexceptflag.o \
|
||||
fenv_fegetround.o \
|
||||
fenv_feholdexcept.o \
|
||||
fenv_feraiseexcept.o \
|
||||
fenv_fesetenv.o \
|
||||
fenv_fesetexceptflag.o \
|
||||
fenv_fetestexcept.o \
|
||||
fenv_fetestround.o \
|
||||
fenv_feupdateenv.o \
|
||||
math_acos.o \
|
||||
math_acosf.o \
|
||||
math_acosh.o \
|
||||
math_acoshf.o \
|
||||
math_asin.o \
|
||||
math_asinf.o \
|
||||
math_asinh.o \
|
||||
math_asinhf.o \
|
||||
math_atan.o \
|
||||
math_atan2.o \
|
||||
math_atan2f.o \
|
||||
math_atanf.o \
|
||||
math_atanh.o \
|
||||
math_atanhf.o \
|
||||
math_cbrt.o \
|
||||
math_cbrtf.o \
|
||||
math_ceil.o \
|
||||
math_ceilf.o \
|
||||
math_copysign.o \
|
||||
math_copysignf.o \
|
||||
math_cos.o \
|
||||
math_cosf.o \
|
||||
math_cosh.o \
|
||||
math_coshf.o \
|
||||
math_erf.o \
|
||||
math_erfc.o \
|
||||
math_erfcf.o \
|
||||
math_erff.o \
|
||||
math_exp.o \
|
||||
math_exp2.o \
|
||||
math_exp2f.o \
|
||||
math_expf.o \
|
||||
math_expm1.o \
|
||||
math_expm1f.o \
|
||||
math_fabs.o \
|
||||
math_fabsf.o \
|
||||
math_fdim.o \
|
||||
math_fdimf.o \
|
||||
math_floor.o \
|
||||
math_floorf.o \
|
||||
math_fma.o \
|
||||
math_fmaf.o \
|
||||
math_fmax.o \
|
||||
math_fmaxf.o \
|
||||
math_fmin.o \
|
||||
math_fminf.o \
|
||||
math_fmod.o \
|
||||
math_fmodf.o \
|
||||
math_fpclassify.o \
|
||||
math_frexp.o \
|
||||
math_frexpf.o \
|
||||
math_huge_val.o \
|
||||
math_huge_valf.o \
|
||||
math_hypot.o \
|
||||
math_hypotf.o \
|
||||
math_ilogb.o \
|
||||
math_ilogbf.o \
|
||||
math_inf.o \
|
||||
math_inff.o \
|
||||
math_init_exit.o \
|
||||
math_isfinite.o \
|
||||
math_isunordered.o \
|
||||
math_kernel_cosf.o \
|
||||
math_kernel_sinf.o \
|
||||
math_kernel_tanf.o \
|
||||
math_ldexp.o \
|
||||
math_ldexpf.o \
|
||||
math_lgamma.o \
|
||||
math_lgammaf.o \
|
||||
math_llrint.o \
|
||||
math_log.o \
|
||||
math_log10.o \
|
||||
math_log10f.o \
|
||||
math_log1p.o \
|
||||
math_log1pf.o \
|
||||
math_log2.o \
|
||||
math_log2f.o \
|
||||
math_logb.o \
|
||||
math_logbf.o \
|
||||
math_logf.o \
|
||||
math_lrint.o \
|
||||
math_lrintf.o \
|
||||
math_lround.o \
|
||||
math_lroundf.o \
|
||||
math_modf.o \
|
||||
math_modff.o \
|
||||
math_nan.o \
|
||||
math_nanf.o \
|
||||
math_nearbyint.o \
|
||||
math_nearbyintf.o \
|
||||
math_nextafter.o \
|
||||
math_nextafterf.o \
|
||||
math_pow.o \
|
||||
math_powf.o \
|
||||
math_remainder.o \
|
||||
math_remainderf.o \
|
||||
math_remquo.o \
|
||||
math_remquof.o \
|
||||
math_rem_pio2f.o \
|
||||
math_rint.o \
|
||||
math_rintf.o \
|
||||
math_round.o \
|
||||
math_roundf.o \
|
||||
math_scalbn.o \
|
||||
math_scalbnf.o \
|
||||
math_signbit.o \
|
||||
math_sin.o \
|
||||
math_sinf.o \
|
||||
math_sinh.o \
|
||||
math_sinhf.o \
|
||||
math_sqrt.o \
|
||||
math_sqrtf.o \
|
||||
math_tan.o \
|
||||
math_tanf.o \
|
||||
math_tanh.o \
|
||||
math_tanhf.o \
|
||||
math_tgamma.o \
|
||||
math_tgammaf.o \
|
||||
math_trunc.o \
|
||||
math_truncf.o \
|
||||
stdio_asprintf.o \
|
||||
stdio_flush.o \
|
||||
stdio_flush_all_files.o \
|
||||
stdio_fprintf.o \
|
||||
stdio_fscanf.o \
|
||||
stdio_printf.o \
|
||||
stdio_scanf.o \
|
||||
stdio_snprintf.o \
|
||||
stdio_sprintf.o \
|
||||
stdio_sscanf.o \
|
||||
stdio_vasprintf.o \
|
||||
stdio_vfprintf.o \
|
||||
stdio_vfscanf.o \
|
||||
stdio_vsscanf.o \
|
||||
stdio_vscanf.o \
|
||||
stdio_vprintf.o \
|
||||
stdio_vsnprintf.o \
|
||||
stdio_vsprintf.o \
|
||||
stdlib_atof.o \
|
||||
stdlib_strtod.o \
|
||||
stdlib_strtof.o \
|
||||
time_difftime.o
|
||||
|
||||
MATH_LIB_881 = \
|
||||
m881.lib_rev.o \
|
||||
$(MATH_LIB_COMMON)
|
||||
|
||||
MATH_LIB_IEEE = \
|
||||
m.lib_rev.o \
|
||||
$(MATH_LIB_COMMON) \
|
||||
math_adddf3.o \
|
||||
math_addsf3.o \
|
||||
math_divdf3.o \
|
||||
math_divsf3.o \
|
||||
math_eqdf2.o \
|
||||
math_eqsf2.o \
|
||||
math_extendsfdf2.o \
|
||||
math_fixdfsi.o \
|
||||
math_fixsfsi.o \
|
||||
math_fixunsdfsi.o \
|
||||
math_fixunssfsi.o \
|
||||
math_floatsidf.o \
|
||||
math_floatsisf.o \
|
||||
math_gedf2.o \
|
||||
math_gesf2.o \
|
||||
math_gtdf2.o \
|
||||
math_gtsf2.o \
|
||||
math_ledf2.o \
|
||||
math_lesf2.o \
|
||||
math_ltdf2.o \
|
||||
math_ltsf2.o \
|
||||
math_muldf3.o \
|
||||
math_mulsf3.o \
|
||||
math_nedf2.o \
|
||||
math_negdf2.o \
|
||||
math_negsf2.o \
|
||||
math_nesf2.o \
|
||||
math_subdf3.o \
|
||||
math_subsf3.o \
|
||||
math_truncdfsf2.o
|
||||
|
||||
MATH_LIB_OS4 := \
|
||||
math_kernel_cos.o \
|
||||
math_kernel_expm1.o \
|
||||
math_kernel_rem_pio2.o \
|
||||
math_kernel_sin.o \
|
||||
math_kernel_tan.o
|
||||
@ -1,174 +1,47 @@
|
||||
#
|
||||
# $Id: libnet.gmk,v 1.1 2006-09-17 17:37:27 obarthel Exp $
|
||||
#
|
||||
# :ts=8
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
##############################################################################
|
||||
|
||||
LIBS += \
|
||||
lib/libnet.a \
|
||||
lib/soft-float/libnet.a \
|
||||
lib/small-data/libnet.a \
|
||||
lib/baserel/libnet.a \
|
||||
lib.threadsafe/libnet.a \
|
||||
lib.threadsafe/soft-float/libnet.a \
|
||||
lib.threadsafe/small-data/libnet.a \
|
||||
lib.threadsafe/baserel/libnet.a
|
||||
include libnet.obj.gmk
|
||||
|
||||
##############################################################################
|
||||
|
||||
NET_LIB := \
|
||||
net.lib_rev.o \
|
||||
socket_accept.o \
|
||||
socket_bind.o \
|
||||
socket_check_daemon.o \
|
||||
socket_connect.o \
|
||||
socket_gethostbyaddr.o \
|
||||
socket_gethostbyname.o \
|
||||
socket_gethostid.o \
|
||||
socket_gethostname.o \
|
||||
socket_getnetbyaddr.o \
|
||||
socket_getnetbyname.o \
|
||||
socket_getpeername.o \
|
||||
socket_getprotobyname.o \
|
||||
socket_getprotobynumber.o \
|
||||
socket_getservbyname.o \
|
||||
socket_getservbyport.o \
|
||||
socket_getsockname.o \
|
||||
socket_getsockopt.o \
|
||||
socket_get_descriptor.o \
|
||||
socket_inet_addr.o \
|
||||
socket_inet_aton.o \
|
||||
socket_inet_lnaof.o \
|
||||
socket_inet_makeaddr.o \
|
||||
socket_inet_netof.o \
|
||||
socket_inet_network.o \
|
||||
socket_inet_ntoa.o \
|
||||
socket_init_exit.o \
|
||||
socket_ioctl.o \
|
||||
socket_isdaemon.o \
|
||||
socket_listen.o \
|
||||
socket_obtain_daemon.o \
|
||||
socket_recv.o \
|
||||
socket_recvfrom.o \
|
||||
socket_recvmsg.o \
|
||||
socket_select_signal.o \
|
||||
socket_select.o \
|
||||
socket_wait_select.o \
|
||||
socket_send.o \
|
||||
socket_sendmsg.o \
|
||||
socket_sendto.o \
|
||||
socket_setsockopt.o \
|
||||
socket_shutdown.o \
|
||||
socket_socket.o \
|
||||
socket_hook_entry.o \
|
||||
socket_hstrerror.o \
|
||||
socket_get_h_errno.o \
|
||||
socket_set_h_errno.o \
|
||||
systeminfo_sysinfo.o \
|
||||
stat_umask.o \
|
||||
usergroup_crypt.o \
|
||||
usergroup_data.o \
|
||||
usergroup_endgrent.o \
|
||||
usergroup_endpwent.o \
|
||||
usergroup_getegid.o \
|
||||
usergroup_geteuid.o \
|
||||
usergroup_getgid.o \
|
||||
usergroup_getgrent.o \
|
||||
usergroup_getgrgid.o \
|
||||
usergroup_getgrnam.o \
|
||||
usergroup_getgroups.o \
|
||||
usergroup_getpass.o \
|
||||
usergroup_getpwent.o \
|
||||
usergroup_getpwnam.o \
|
||||
usergroup_getpwuid.o \
|
||||
usergroup_getuid.o \
|
||||
usergroup_initgroups.o \
|
||||
usergroup_init_exit.o \
|
||||
usergroup_rootmode.o \
|
||||
usergroup_setegid.o \
|
||||
usergroup_seteuid.o \
|
||||
usergroup_setgid.o \
|
||||
usergroup_setgrent.o \
|
||||
usergroup_setgroups.o \
|
||||
usergroup_setpwent.o \
|
||||
usergroup_setregid.o \
|
||||
usergroup_setreuid.o \
|
||||
usergroup_setsid.o \
|
||||
usergroup_setuid.o \
|
||||
utsname_uname.o
|
||||
define libnet_rule
|
||||
|
||||
##############################################################################
|
||||
LIBS += lib/$(1).a lib.threadsafe/$(1).a
|
||||
|
||||
# Dependencies to rebuild if the library version changes
|
||||
obj/$(1)/net.lib_rev.o : net.lib_rev.c net.lib_rev.h
|
||||
obj.threadsafe/$(1)/net.lib_rev.o : net.lib_rev.c net.lib_rev.h
|
||||
|
||||
obj/libnet/net.lib_rev.o : net.lib_rev.c net.lib_rev.h
|
||||
obj/soft-float/libnet/net.lib_rev.o : net.lib_rev.c net.lib_rev.h
|
||||
obj/small-data/libnet/net.lib_rev.o : net.lib_rev.c net.lib_rev.h
|
||||
obj/baserel/libnet/net.lib_rev.o : net.lib_rev.c net.lib_rev.h
|
||||
obj.threadsafe/libnet/net.lib_rev.o : net.lib_rev.c net.lib_rev.h
|
||||
obj.threadsafe/soft-float/libnet/net.lib_rev.o : net.lib_rev.c net.lib_rev.h
|
||||
obj.threadsafe/small-data/libnet/net.lib_rev.o : net.lib_rev.c net.lib_rev.h
|
||||
obj.threadsafe/baserel/libnet/net.lib_rev.o : net.lib_rev.c net.lib_rev.h
|
||||
obj/$(1)/%.o : CFLAGS += $(2)
|
||||
obj/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
obj.threadsafe/$(1)/%.o : CFLAGS += $(THREADSAFE) $(2)
|
||||
obj.threadsafe/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
lib/$(1).a : $$(addprefix obj/$(1)/,$$(NET_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
lib.threadsafe/$(1).a : $$(addprefix obj.threadsafe/$(1)/,$$(NET_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
endef
|
||||
|
||||
##############################################################################
|
||||
|
||||
obj/libnet/%.o : CFLAGS += $(LARGEDATA) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT
|
||||
obj/libnet/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/soft-float/libnet/%.o : CFLAGS += $(SOFTFLOAT) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT
|
||||
obj/soft-float/libnet/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/small-data/libnet/%.o : CFLAGS += $(SMALLDATA) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT
|
||||
obj/small-data/libnet/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/baserel/libnet/%.o : CFLAGS += $(BASEREL) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT
|
||||
obj/baserel/libnet/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/libnet/%.o : CFLAGS += $(THREADSAFE) $(LARGEDATA) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT
|
||||
obj.threadsafe/libnet/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/soft-float/libnet/%.o : CFLAGS += $(THREADSAFE) $(SOFTFLOAT) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT
|
||||
obj.threadsafe/soft-float/libnet/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/small-data/libnet/%.o : CFLAGS += $(THREADSAFE) $(SMALLDATA) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT
|
||||
obj.threadsafe/small-data/libnet/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/baserel/libnet/%.o : CFLAGS += $(THREADSAFE) $(BASEREL) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT
|
||||
obj.threadsafe/baserel/libnet/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
##############################################################################
|
||||
|
||||
lib/libnet.a : $(addprefix obj/libnet/,$(NET_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/soft-float/libnet.a : $(addprefix obj/soft-float/libnet/,$(NET_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/small-data/libnet.a : $(addprefix obj/small-data/libnet/,$(NET_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/baserel/libnet.a : $(addprefix obj/baserel/libnet/,$(NET_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/libnet.a : $(addprefix obj.threadsafe/libnet/,$(NET_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/soft-float/libnet.a : $(addprefix obj.threadsafe/soft-float/libnet/,$(NET_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/small-data/libnet.a : $(addprefix obj.threadsafe/small-data/libnet/,$(NET_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/baserel/libnet.a : $(addprefix obj.threadsafe/baserel/libnet/,$(NET_LIB))
|
||||
@$(MAKELIB)
|
||||
$(eval $(call libnet_rule,libnet, \
|
||||
$(LARGEDATA) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT))
|
||||
$(eval $(call libnet_rule,soft-float/libnet, \
|
||||
$(SOFTFLOAT) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT))
|
||||
$(eval $(call libnet_rule,small-data/libnet, \
|
||||
$(SMALLDATA) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT))
|
||||
$(eval $(call libnet_rule,baserel/libnet, \
|
||||
$(BASEREL) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT))
|
||||
|
||||
84
library/libnet.obj.gmk
Normal file
84
library/libnet.obj.gmk
Normal file
@ -0,0 +1,84 @@
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
NET_LIB := \
|
||||
net.lib_rev.o \
|
||||
socket_accept.o \
|
||||
socket_bind.o \
|
||||
socket_check_daemon.o \
|
||||
socket_connect.o \
|
||||
socket_gethostbyaddr.o \
|
||||
socket_gethostbyname.o \
|
||||
socket_gethostid.o \
|
||||
socket_gethostname.o \
|
||||
socket_getnetbyaddr.o \
|
||||
socket_getnetbyname.o \
|
||||
socket_getpeername.o \
|
||||
socket_getprotobyname.o \
|
||||
socket_getprotobynumber.o \
|
||||
socket_getservbyname.o \
|
||||
socket_getservbyport.o \
|
||||
socket_getsockname.o \
|
||||
socket_getsockopt.o \
|
||||
socket_get_descriptor.o \
|
||||
socket_inet_addr.o \
|
||||
socket_inet_aton.o \
|
||||
socket_inet_lnaof.o \
|
||||
socket_inet_makeaddr.o \
|
||||
socket_inet_netof.o \
|
||||
socket_inet_network.o \
|
||||
socket_inet_ntoa.o \
|
||||
socket_init_exit.o \
|
||||
socket_ioctl.o \
|
||||
socket_isdaemon.o \
|
||||
socket_listen.o \
|
||||
socket_obtain_daemon.o \
|
||||
socket_recv.o \
|
||||
socket_recvfrom.o \
|
||||
socket_recvmsg.o \
|
||||
socket_select_signal.o \
|
||||
socket_select.o \
|
||||
socket_wait_select.o \
|
||||
socket_send.o \
|
||||
socket_sendmsg.o \
|
||||
socket_sendto.o \
|
||||
socket_setsockopt.o \
|
||||
socket_shutdown.o \
|
||||
socket_socket.o \
|
||||
socket_hook_entry.o \
|
||||
socket_hstrerror.o \
|
||||
socket_get_h_errno.o \
|
||||
socket_set_h_errno.o \
|
||||
systeminfo_sysinfo.o \
|
||||
stat_umask.o \
|
||||
usergroup_crypt.o \
|
||||
usergroup_data.o \
|
||||
usergroup_endgrent.o \
|
||||
usergroup_endpwent.o \
|
||||
usergroup_getegid.o \
|
||||
usergroup_geteuid.o \
|
||||
usergroup_getgid.o \
|
||||
usergroup_getgrent.o \
|
||||
usergroup_getgrgid.o \
|
||||
usergroup_getgrnam.o \
|
||||
usergroup_getgroups.o \
|
||||
usergroup_getpass.o \
|
||||
usergroup_getpwent.o \
|
||||
usergroup_getpwnam.o \
|
||||
usergroup_getpwuid.o \
|
||||
usergroup_getuid.o \
|
||||
usergroup_initgroups.o \
|
||||
usergroup_init_exit.o \
|
||||
usergroup_rootmode.o \
|
||||
usergroup_setegid.o \
|
||||
usergroup_seteuid.o \
|
||||
usergroup_setgid.o \
|
||||
usergroup_setgrent.o \
|
||||
usergroup_setgroups.o \
|
||||
usergroup_setpwent.o \
|
||||
usergroup_setregid.o \
|
||||
usergroup_setreuid.o \
|
||||
usergroup_setsid.o \
|
||||
usergroup_setuid.o \
|
||||
utsname_uname.o
|
||||
@ -1,132 +1,51 @@
|
||||
#
|
||||
# $Id: libprofile.gmk,v 1.1 2006-09-17 17:37:27 obarthel Exp $
|
||||
#
|
||||
# :ts=8
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
##############################################################################
|
||||
|
||||
LIBS += \
|
||||
lib/libprofile.a \
|
||||
lib/soft-float/libprofile.a \
|
||||
lib/small-data/libprofile.a \
|
||||
lib/baserel/libprofile.a \
|
||||
lib.threadsafe/libprofile.a \
|
||||
lib.threadsafe/soft-float/libprofile.a \
|
||||
lib.threadsafe/small-data/libprofile.a \
|
||||
lib.threadsafe/baserel/libprofile.a
|
||||
include libprofile.obj.gmk
|
||||
|
||||
##############################################################################
|
||||
|
||||
PROFILE_LIB = \
|
||||
profile__mcount.o \
|
||||
profile_gmon.o \
|
||||
profile_mcount.o
|
||||
define libprofile_rule
|
||||
|
||||
##############################################################################
|
||||
LIBS += lib/$(1).a lib.threadsafe/$(1).a
|
||||
|
||||
# Dependencies to rebuild if the library version changes
|
||||
obj/$(1)/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
||||
obj.threadsafe/$(1)/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
||||
|
||||
obj/libprofile/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
||||
obj/soft-float/libprofile/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
||||
obj/small-data/libprofile/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
||||
obj/baserel/libprofile/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
||||
obj.threadsafe/libprofile/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
||||
obj.threadsafe/soft-float/libprofile/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
||||
obj.threadsafe/small-data/libprofile/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
||||
obj.threadsafe/baserel/libprofile/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h
|
||||
obj/$(1)/%.o : CFLAGS += $(2)
|
||||
obj/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
obj/$(1)/%.o : AFLAGS += $(2)
|
||||
obj/$(1)/%.o : %.S
|
||||
@$$(ASSEMBLE)
|
||||
|
||||
obj.threadsafe/$(1)/%.o : CFLAGS += $(THREADSAFE) $(2)
|
||||
obj.threadsafe/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
obj.threadsafe/$(1)/%.o : AFLAGS += $(2)
|
||||
obj.threadsafe/$(1)/%.o : %.S
|
||||
@$$(ASSEMBLE)
|
||||
|
||||
lib/$(1).a : $$(addprefix obj/$(1)/,$$(PROFILE_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
lib.threadsafe/$(1).a : $$(addprefix obj.threadsafe/$(1)/,$$(PROFILE_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
endef
|
||||
|
||||
##############################################################################
|
||||
|
||||
obj/libprofile/%.o : AFLAGS += $(LARGEDATA)
|
||||
obj/libprofile/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
obj/soft-float/libprofile/%.o : AFLAGS += $(SOFTFLOAT)
|
||||
obj/soft-float/libprofile/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
obj/small-data/libprofile/%.o : AFLAGS += $(SMALLDATA)
|
||||
obj/small-data/libprofile/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
obj/baserel/libprofile/%.o : AFLAGS += $(BASEREL)
|
||||
obj/baserel/libprofile/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
obj.threadsafe/libprofile/%.o : AFLAGS += $(LARGEDATA)
|
||||
obj.threadsafe/libprofile/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
obj.threadsafe/soft-float/libprofile/%.o : AFLAGS += $(SOFTFLOAT)
|
||||
obj.threadsafe/soft-float/libprofile/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
obj.threadsafe/small-data/libprofile/%.o : AFLAGS += $(SMALLDATA)
|
||||
obj.threadsafe/small-data/libprofile/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
obj.threadsafe/baserel/libprofile/%.o : AFLAGS += $(BASEREL)
|
||||
obj.threadsafe/baserel/libprofile/%.o : %.S
|
||||
@$(ASSEMBLE)
|
||||
|
||||
##############################################################################
|
||||
|
||||
obj/libprofile/%.o : CFLAGS += $(LARGEDATA)
|
||||
obj/libprofile/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/soft-float/libprofile/%.o : CFLAGS += $(SOFTFLOAT)
|
||||
obj/soft-float/libprofile/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/small-data/libprofile/%.o : CFLAGS += $(SMALLDATA)
|
||||
obj/small-data/libprofile/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/baserel/libprofile/%.o : CFLAGS += $(BASEREL)
|
||||
obj/baserel/libprofile/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/libprofile/%.o : CFLAGS += $(THREADSAFE) $(LARGEDATA)
|
||||
obj.threadsafe/libprofile/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/soft-float/libprofile/%.o : CFLAGS += $(THREADSAFE) $(SOFTFLOAT)
|
||||
obj.threadsafe/soft-float/libprofile/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/small-data/libprofile/%.o : CFLAGS += $(THREADSAFE) $(SMALLDATA)
|
||||
obj.threadsafe/small-data/libprofile/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/baserel/libprofile/%.o : CFLAGS += $(THREADSAFE) $(BASEREL)
|
||||
obj.threadsafe/baserel/libprofile/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
##############################################################################
|
||||
|
||||
lib/libprofile.a : $(addprefix obj/libprofile/,$(PROFILE_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/soft-float/libprofile.a : $(addprefix obj/soft-float/libprofile/,$(PROFILE_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/small-data/libprofile.a : $(addprefix obj/small-data/libprofile/,$(PROFILE_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/baserel/libprofile.a : $(addprefix obj/baserel/libprofile/,$(PROFILE_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/libprofile.a : $(addprefix obj.threadsafe/libprofile/,$(PROFILE_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/soft-float/libprofile.a : $(addprefix obj.threadsafe/soft-float/libprofile/,$(PROFILE_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/small-data/libprofile.a : $(addprefix obj.threadsafe/small-data/libprofile/,$(PROFILE_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/baserel/libprofile.a : $(addprefix obj.threadsafe/baserel/libprofile/,$(PROFILE_LIB))
|
||||
@$(MAKELIB)
|
||||
$(eval $(call libprofile_rule,libprofile,$(LARGEDATA)))
|
||||
$(eval $(call libprofile_rule,soft-float/libprofile,$(SOFTFLOAT)))
|
||||
$(eval $(call libprofile_rule,small-data/libprofile,$(SMALLDATA)))
|
||||
$(eval $(call libprofile_rule,baserel/libprofile,$(BASEREL)))
|
||||
|
||||
8
library/libprofile.obj.gmk
Normal file
8
library/libprofile.obj.gmk
Normal file
@ -0,0 +1,8 @@
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
PROFILE_LIB = \
|
||||
profile__mcount.o \
|
||||
profile_gmon.o \
|
||||
profile_mcount.o
|
||||
@ -1,203 +1,48 @@
|
||||
#
|
||||
# $Id: libunix.gmk,v 1.4 2010-08-21 10:59:34 obarthel Exp $
|
||||
#
|
||||
# :ts=8
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
##############################################################################
|
||||
|
||||
LIBS += \
|
||||
lib/libunix.a \
|
||||
lib/soft-float/libunix.a \
|
||||
lib/small-data/libunix.a \
|
||||
lib/baserel/libunix.a \
|
||||
lib.threadsafe/libunix.a \
|
||||
lib.threadsafe/soft-float/libunix.a \
|
||||
lib.threadsafe/small-data/libunix.a \
|
||||
lib.threadsafe/baserel/libunix.a
|
||||
include libunix.obj.gmk
|
||||
UNIX_LIB := $(sort $(UNIX_LIB_COMMON) $(UNIX_LIB_OS4))
|
||||
|
||||
##############################################################################
|
||||
|
||||
UNIX_LIB := \
|
||||
unix.lib_rev.o \
|
||||
dirent_closedir.o \
|
||||
dirent_rewinddir.o \
|
||||
dirent_opendir.o \
|
||||
dirent_readdir.o \
|
||||
fcntl_creat.o \
|
||||
fcntl_fcntl.o \
|
||||
fcntl_open.o \
|
||||
fcntl_get_default_file.o \
|
||||
getopt_getopt_long.o \
|
||||
mount_convertinfo.o \
|
||||
mount_statfs.o \
|
||||
resource_getrlimit.o \
|
||||
resource_setrlimit.o \
|
||||
stat_chmod.o \
|
||||
stat_fstat.o \
|
||||
stat_lstat.o \
|
||||
stat_lock.o \
|
||||
stat_mkdir.o \
|
||||
stat_rmdir.o \
|
||||
stat_stat.o \
|
||||
stdio_ctermid.o \
|
||||
stdio_fdhookentry.o \
|
||||
stdio_fflush.o \
|
||||
stdio_fopen.o \
|
||||
stdio_file_init.o \
|
||||
stdio_init_exit.o \
|
||||
stdio_locksemaphorename.o \
|
||||
stdio_openiob.o \
|
||||
stdio_popen.o \
|
||||
stdio_record_locking.o \
|
||||
stdio_remove.o \
|
||||
stdio_rename.o \
|
||||
stdlib_alloca.o \
|
||||
stdlib_alloca_cleanup.o \
|
||||
stdlib_alloca_trap.o \
|
||||
stdlib_arg.o \
|
||||
stdlib_dlopen.o \
|
||||
stdlib_expand_wildcard.o \
|
||||
stdlib_expand_wildcard_check.o \
|
||||
stdlib_getmemstats.o \
|
||||
stdlib_main.o \
|
||||
stdlib_main_stub.o \
|
||||
stdlib_mkdtemp.o \
|
||||
stdlib_mkstemp.o \
|
||||
stdlib_mktemp.o \
|
||||
stdlib_malloc.o \
|
||||
stdlib_realloc.o \
|
||||
stdlib_resetmemstats.o \
|
||||
stdlib_system.o \
|
||||
systeminfo_sysinfo.o \
|
||||
termios_cfgetispeed.o \
|
||||
termios_cfgetospeed.o \
|
||||
termios_cfmakeraw.o \
|
||||
termios_cfsetispeed.o \
|
||||
termios_cfsetospeed.o \
|
||||
termios_console_fdhookentry.o \
|
||||
termios_openserial.o \
|
||||
termios_tcdrain.o \
|
||||
termios_tcflow.o \
|
||||
termios_tcflush.o \
|
||||
termios_tcgetattr.o \
|
||||
termios_tcsendbreak.o \
|
||||
termios_tcsetattr.o \
|
||||
timeb_ftime.o \
|
||||
uio_readv.o \
|
||||
uio_writev.o \
|
||||
unistd_access.o \
|
||||
unistd_chdir.o \
|
||||
unistd_chdir_exit.o \
|
||||
unistd_chown.o \
|
||||
unistd_common_pathconf.o \
|
||||
unistd_def_path.o \
|
||||
unistd_def_path_delimiter.o \
|
||||
unistd_environ.o \
|
||||
unistd_execl.o \
|
||||
unistd_execle.o \
|
||||
unistd_execlp.o \
|
||||
unistd_execv.o \
|
||||
unistd_execve.o \
|
||||
unistd_execve_env_exit.o \
|
||||
unistd_execve_env_init.o \
|
||||
unistd_execve_exit.o \
|
||||
unistd_execvp.o \
|
||||
unistd_fpathconf.o \
|
||||
unistd_getcwd.o \
|
||||
unistd_lchown.o \
|
||||
unistd_link.o \
|
||||
unistd_lockf.o \
|
||||
unistd_pathconf.o \
|
||||
unistd_readlink.o \
|
||||
unistd_realpath.o \
|
||||
unistd_restorepathname.o \
|
||||
unistd_setcurrentpath.o \
|
||||
unistd_strip_double_slash.o \
|
||||
unistd_symlink.o \
|
||||
unistd_translatea2u.o \
|
||||
unistd_translaterel.o \
|
||||
unistd_translateu2a.o \
|
||||
unistd_truncate.o \
|
||||
unistd_ttyname.o \
|
||||
unistd_ttyname_r.o \
|
||||
unistd_unix_path_semantics.o \
|
||||
unistd_unlink.o \
|
||||
unistd_unlink_retries.o \
|
||||
unistd_wildcard_expand.o \
|
||||
utime_utime.o
|
||||
define libunix_rule
|
||||
|
||||
##############################################################################
|
||||
LIBS += lib/$(1).a lib.threadsafe/$(1).a
|
||||
|
||||
# Dependencies to rebuild if the library version changes
|
||||
obj/$(1)/unix.lib_rev.o : unix.lib_rev.c unix.lib_rev.h
|
||||
obj.threadsafe/$(1)/unix.lib_rev.o : unix.lib_rev.c unix.lib_rev.h
|
||||
|
||||
obj/libunix/unit.lib_rev.o : unit.lib_rev.c unit.lib_rev.h
|
||||
obj/soft-float/libunix/unit.lib_rev.o : unit.lib_rev.c unit.lib_rev.h
|
||||
obj/small-data/libunix/unit.lib_rev.o : unit.lib_rev.c unit.lib_rev.h
|
||||
obj/baserel/libunix/unit.lib_rev.o : unit.lib_rev.c unit.lib_rev.h
|
||||
obj.threadsafe/libunix/unit.lib_rev.o : unit.lib_rev.c unit.lib_rev.h
|
||||
obj.threadsafe/soft-float/libunix/unit.lib_rev.o : unit.lib_rev.c unit.lib_rev.h
|
||||
obj.threadsafe/small-data/libunix/unit.lib_rev.o : unit.lib_rev.c unit.lib_rev.h
|
||||
obj.threadsafe/baserel/libunix/unit.lib_rev.o : unit.lib_rev.c unit.lib_rev.h
|
||||
obj/$(1)/%.o : CFLAGS += $(2)
|
||||
obj/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
obj.threadsafe/$(1)/%.o : CFLAGS += $(THREADSAFE) $(2)
|
||||
obj.threadsafe/$(1)/%.o : %.c
|
||||
@$$(COMPILE)
|
||||
|
||||
lib/$(1).a : $$(addprefix obj/$(1)/,$$(UNIX_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
lib.threadsafe/$(1).a : $$(addprefix obj.threadsafe/$(1)/,$$(UNIX_LIB))
|
||||
@$$(MAKELIB)
|
||||
|
||||
endef
|
||||
|
||||
##############################################################################
|
||||
|
||||
|
||||
obj/libunix/%.o : CFLAGS += $(LARGEDATA) -DUNIX_PATH_SEMANTICS
|
||||
obj/libunix/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/soft-float/libunix/%.o : CFLAGS += $(SOFTFLOAT) -DUNIX_PATH_SEMANTICS
|
||||
obj/soft-float/libunix/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/small-data/libunix/%.o : CFLAGS += $(SMALLDATA) -DUNIX_PATH_SEMANTICS
|
||||
obj/small-data/libunix/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj/baserel/libunix/%.o : CFLAGS += $(BASEREL) -DUNIX_PATH_SEMANTICS
|
||||
obj/baserel/libunix/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/libunix/%.o : CFLAGS += $(THREADSAFE) $(LARGEDATA) -DUNIX_PATH_SEMANTICS
|
||||
obj.threadsafe/libunix/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/soft-float/libunix/%.o : CFLAGS += $(THREADSAFE) $(SOFTFLOAT) -DUNIX_PATH_SEMANTICS
|
||||
obj.threadsafe/soft-float/libunix/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/small-data/libunix/%.o : CFLAGS += $(THREADSAFE) $(SMALLDATA) -DUNIX_PATH_SEMANTICS
|
||||
obj.threadsafe/small-data/libunix/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
obj.threadsafe/baserel/libunix/%.o : CFLAGS += $(THREADSAFE) $(BASEREL) -DUNIX_PATH_SEMANTICS
|
||||
obj.threadsafe/baserel/libunix/%.o : %.c
|
||||
@$(COMPILE)
|
||||
|
||||
##############################################################################
|
||||
|
||||
lib/libunix.a : $(addprefix obj/libunix/,$(UNIX_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/soft-float/libunix.a : $(addprefix obj/soft-float/libunix/,$(UNIX_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/small-data/libunix.a : $(addprefix obj/small-data/libunix/,$(UNIX_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib/baserel/libunix.a : $(addprefix obj/baserel/libunix/,$(UNIX_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/libunix.a : $(addprefix obj.threadsafe/libunix/,$(UNIX_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/soft-float/libunix.a : $(addprefix obj.threadsafe/soft-float/libunix/,$(UNIX_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/small-data/libunix.a : $(addprefix obj.threadsafe/small-data/libunix/,$(UNIX_LIB))
|
||||
@$(MAKELIB)
|
||||
|
||||
lib.threadsafe/baserel/libunix.a : $(addprefix obj.threadsafe/baserel/libunix/,$(UNIX_LIB))
|
||||
@$(MAKELIB)
|
||||
$(eval $(call libunix_rule,libunix, \
|
||||
$(LARGEDATA) -DUNIX_PATH_SEMANTICS))
|
||||
$(eval $(call libunix_rule,soft-float/libunix, \
|
||||
$(SOFTFLOAT) -DUNIX_PATH_SEMANTICS))
|
||||
$(eval $(call libunix_rule,small-data/libunix, \
|
||||
$(SMALLDATA) -DUNIX_PATH_SEMANTICS))
|
||||
$(eval $(call libunix_rule,baserel/libunix, \
|
||||
$(BASEREL) -DUNIX_PATH_SEMANTICS))
|
||||
|
||||
116
library/libunix.obj.gmk
Normal file
116
library/libunix.obj.gmk
Normal file
@ -0,0 +1,116 @@
|
||||
# vim:ts=8 ft=make:
|
||||
#
|
||||
# -*- mode: makefile; -*-
|
||||
|
||||
UNIX_LIB_COMMON := \
|
||||
unix.lib_rev.o \
|
||||
dirent_closedir.o \
|
||||
dirent_rewinddir.o \
|
||||
dirent_opendir.o \
|
||||
dirent_readdir.o \
|
||||
fcntl_creat.o \
|
||||
fcntl_fcntl.o \
|
||||
fcntl_open.o \
|
||||
fcntl_get_default_file.o \
|
||||
getopt_getopt_long.o \
|
||||
mount_convertinfo.o \
|
||||
mount_statfs.o \
|
||||
resource_getrlimit.o \
|
||||
resource_setrlimit.o \
|
||||
stat_chmod.o \
|
||||
stat_fstat.o \
|
||||
stat_lstat.o \
|
||||
stat_lock.o \
|
||||
stat_mkdir.o \
|
||||
stat_rmdir.o \
|
||||
stat_stat.o \
|
||||
stdio_ctermid.o \
|
||||
stdio_fdhookentry.o \
|
||||
stdio_fflush.o \
|
||||
stdio_fopen.o \
|
||||
stdio_file_init.o \
|
||||
stdio_init_exit.o \
|
||||
stdio_locksemaphorename.o \
|
||||
stdio_openiob.o \
|
||||
stdio_popen.o \
|
||||
stdio_record_locking.o \
|
||||
stdio_remove.o \
|
||||
stdio_rename.o \
|
||||
stdlib_alloca.o \
|
||||
stdlib_alloca_cleanup.o \
|
||||
stdlib_alloca_trap.o \
|
||||
stdlib_arg.o \
|
||||
stdlib_expand_wildcard.o \
|
||||
stdlib_expand_wildcard_check.o \
|
||||
stdlib_getmemstats.o \
|
||||
stdlib_main.o \
|
||||
stdlib_main_stub.o \
|
||||
stdlib_mkdtemp.o \
|
||||
stdlib_mkstemp.o \
|
||||
stdlib_mktemp.o \
|
||||
stdlib_malloc.o \
|
||||
stdlib_realloc.o \
|
||||
stdlib_resetmemstats.o \
|
||||
stdlib_system.o \
|
||||
systeminfo_sysinfo.o \
|
||||
termios_cfgetispeed.o \
|
||||
termios_cfgetospeed.o \
|
||||
termios_cfmakeraw.o \
|
||||
termios_cfsetispeed.o \
|
||||
termios_cfsetospeed.o \
|
||||
termios_console_fdhookentry.o \
|
||||
termios_tcdrain.o \
|
||||
termios_tcflow.o \
|
||||
termios_tcflush.o \
|
||||
termios_tcgetattr.o \
|
||||
termios_tcsendbreak.o \
|
||||
termios_tcsetattr.o \
|
||||
timeb_ftime.o \
|
||||
uio_readv.o \
|
||||
uio_writev.o \
|
||||
unistd_access.o \
|
||||
unistd_chdir.o \
|
||||
unistd_chdir_exit.o \
|
||||
unistd_chown.o \
|
||||
unistd_common_pathconf.o \
|
||||
unistd_def_path.o \
|
||||
unistd_def_path_delimiter.o \
|
||||
unistd_environ.o \
|
||||
unistd_execl.o \
|
||||
unistd_execle.o \
|
||||
unistd_execlp.o \
|
||||
unistd_execv.o \
|
||||
unistd_execve.o \
|
||||
unistd_execve_env_exit.o \
|
||||
unistd_execve_env_init.o \
|
||||
unistd_execve_exit.o \
|
||||
unistd_execvp.o \
|
||||
unistd_fpathconf.o \
|
||||
unistd_getcwd.o \
|
||||
unistd_lchown.o \
|
||||
unistd_link.o \
|
||||
unistd_lockf.o \
|
||||
unistd_pathconf.o \
|
||||
unistd_readlink.o \
|
||||
unistd_realpath.o \
|
||||
unistd_restorepathname.o \
|
||||
unistd_setcurrentpath.o \
|
||||
unistd_strip_double_slash.o \
|
||||
unistd_symlink.o \
|
||||
unistd_translatea2u.o \
|
||||
unistd_translaterel.o \
|
||||
unistd_translateu2a.o \
|
||||
unistd_truncate.o \
|
||||
unistd_ttyname.o \
|
||||
unistd_ttyname_r.o \
|
||||
unistd_unix_path_semantics.o \
|
||||
unistd_unlink.o \
|
||||
unistd_wildcard_expand.o \
|
||||
utime_utime.o
|
||||
|
||||
UNIX_LIB_OS3 :=
|
||||
|
||||
UNIX_LIB_OS4 := \
|
||||
stdlib_dlopen.o \
|
||||
termios_openserial.o \
|
||||
unistd_unlink_retries.o
|
||||
@ -1,6 +1,6 @@
|
||||
#define VERSION 1
|
||||
#define REVISION 212
|
||||
#define DATE "27.11.2016"
|
||||
#define VERS "m.lib 1.212"
|
||||
#define VSTRING "m.lib 1.212 (27.11.2016)\r\n"
|
||||
#define VERSTAG "\0$VER: m.lib 1.212 (27.11.2016)"
|
||||
#define REVISION 213
|
||||
#define DATE "4.12.2016"
|
||||
#define VERS "m.lib 1.213"
|
||||
#define VSTRING "m.lib 1.213 (4.12.2016)\r\n"
|
||||
#define VERSTAG "\0$VER: m.lib 1.213 (4.12.2016)"
|
||||
|
||||
@ -1 +1 @@
|
||||
212
|
||||
213
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#define VERSION 1
|
||||
#define REVISION 212
|
||||
#define DATE "27.11.2016"
|
||||
#define VERS "m881.lib 1.212"
|
||||
#define VSTRING "m881.lib 1.212 (27.11.2016)\r\n"
|
||||
#define VERSTAG "\0$VER: m881.lib 1.212 (27.11.2016)"
|
||||
#define REVISION 213
|
||||
#define DATE "4.12.2016"
|
||||
#define VERS "m881.lib 1.213"
|
||||
#define VSTRING "m881.lib 1.213 (4.12.2016)\r\n"
|
||||
#define VERSTAG "\0$VER: m881.lib 1.213 (4.12.2016)"
|
||||
|
||||
@ -1 +1 @@
|
||||
212
|
||||
213
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#define VERSION 1
|
||||
#define REVISION 212
|
||||
#define DATE "27.11.2016"
|
||||
#define VERS "net.lib 1.212"
|
||||
#define VSTRING "net.lib 1.212 (27.11.2016)\r\n"
|
||||
#define VERSTAG "\0$VER: net.lib 1.212 (27.11.2016)"
|
||||
#define REVISION 213
|
||||
#define DATE "4.12.2016"
|
||||
#define VERS "net.lib 1.213"
|
||||
#define VSTRING "net.lib 1.213 (4.12.2016)\r\n"
|
||||
#define VERSTAG "\0$VER: net.lib 1.213 (4.12.2016)"
|
||||
|
||||
@ -1 +1 @@
|
||||
212
|
||||
213
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
|
||||
xdef __CXV25
|
||||
xdef __CXV35
|
||||
xdef __CXV45
|
||||
xdef __CXNRM5
|
||||
xdef __CXTAB5
|
||||
|
||||
@ -74,6 +75,43 @@ L44: MOVE.W D0,D1
|
||||
MOVEM.L (SP)+,D2-D5/A1
|
||||
RTS
|
||||
|
||||
__CXV45:
|
||||
|
||||
MOVE.L D0,D1
|
||||
SWAP D1
|
||||
AND.W #$7FFF,D1
|
||||
CMP.W #$80,D1
|
||||
BLT .1
|
||||
CMP.W #$7F80,D1
|
||||
BGE .3
|
||||
ASR.L #3,D0
|
||||
AND.L #$8FFFFFFF,D0
|
||||
ADD.L #$38000000,D0
|
||||
SWAP D1
|
||||
AND.L #7,D1
|
||||
ROR.L #3,D1
|
||||
.2 RTS
|
||||
|
||||
.1 TST.L D1
|
||||
BEQ.S .2
|
||||
MOVEM.L D2-D5,-(SP)
|
||||
SWAP D0
|
||||
MOVE.W D0,D4
|
||||
AND.W #$8000,D4
|
||||
MOVE.W #$39D0,D5
|
||||
MOVEQ #0,D0
|
||||
SWAP D1
|
||||
JSR __CXNRM5(PC)
|
||||
MOVEM.L (SP)+,D2-D5
|
||||
RTS
|
||||
|
||||
.3 ASR.L #3,D0
|
||||
OR.L #$7FF00000,D0
|
||||
SWAP D1
|
||||
AND.L #7,D1
|
||||
ROR.L #3,D1
|
||||
RTS
|
||||
|
||||
__CXNRM5:
|
||||
|
||||
CMP.L #$20,D0
|
||||
|
||||
106
library/sas_cxv52.asm
Normal file
106
library/sas_cxv52.asm
Normal file
@ -0,0 +1,106 @@
|
||||
*
|
||||
* :ts=8
|
||||
*
|
||||
* Adapted from reassembled SAS/C runtime library code.
|
||||
*
|
||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
||||
* Copyright (c) 2002-2015 by Olaf Barthel <obarthel (at) gmx.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
||||
* may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
|
||||
xdef __CXV52
|
||||
xdef __CXV53
|
||||
|
||||
xref __CXFERR
|
||||
|
||||
section text,code
|
||||
|
||||
__CXV52:
|
||||
|
||||
MOVEM.L D2/D3,-(SP)
|
||||
MOVEQ #-1,D3
|
||||
MOVE.L D0,D2
|
||||
BPL.W lab04A
|
||||
CMPI.L #$BFF00000,D0
|
||||
BCS.W lab07A
|
||||
MOVEM.L D0/D1/A0/A1,-(SP)
|
||||
PEA (2).L
|
||||
JSR __CXFERR
|
||||
ADDQ.W #4,SP
|
||||
MOVEM.L (SP)+,D0/D1/A0/A1
|
||||
BRA.W lab07A
|
||||
|
||||
__CXV53:
|
||||
|
||||
MOVEM.L D2/D3,-(SP)
|
||||
MOVE.L #$7FFFFFFF,D3
|
||||
MOVE.L D0,D2
|
||||
BPL.W lab04A
|
||||
ADDQ.L #1,D3
|
||||
EOR.L D3,D0
|
||||
lab04A: SWAP D0
|
||||
MOVE.W D0,D2
|
||||
ANDI.W #$7FF0,D2
|
||||
EOR.W D2,D0
|
||||
SUBI.W #$3FF0,D2
|
||||
BLT.W lab07A
|
||||
EORI.W #$10,D0
|
||||
SWAP D0
|
||||
ASR.W #4,D2
|
||||
SUBI.W #$14,D2
|
||||
BGT.W lab09A
|
||||
NEG.W D2
|
||||
LSR.L D2,D0
|
||||
TST.L D2
|
||||
BMI.W lab0B2
|
||||
BRA.W lab0B4
|
||||
|
||||
lab07A: MOVEQ #0,D0
|
||||
BRA.W lab0B4
|
||||
|
||||
lab080: MOVEM.L D0/D1/A0/A1,-(SP)
|
||||
PEA (2).L
|
||||
JSR __CXFERR
|
||||
ADDQ.W #4,SP
|
||||
MOVEM.L (SP)+,D0/D1/A0/A1
|
||||
MOVE.L D3,D0
|
||||
BRA.W lab0B4
|
||||
|
||||
lab09A: CMPI.W #11,D2
|
||||
BGT.B lab080
|
||||
EOR.L D1,D0
|
||||
ROL.L D2,D0
|
||||
LSL.L D2,D1
|
||||
EOR.L D1,D0
|
||||
CMP.L D3,D0
|
||||
BHI.B lab080
|
||||
TST.L D2
|
||||
BPL.W lab0B4
|
||||
lab0B2: NEG.L D0
|
||||
lab0B4: MOVEM.L (SP)+,D2/D3
|
||||
RTS
|
||||
|
||||
end
|
||||
@ -1,6 +1,4 @@
|
||||
*
|
||||
* $Id: sas_cxv54.asm,v 1.1.1.1 2004-07-26 16:31:04 obarthel Exp $
|
||||
*
|
||||
* :ts=8
|
||||
*
|
||||
* Adapted from reassembled SAS/C runtime library code.
|
||||
@ -38,7 +36,8 @@
|
||||
xdef __CXV54
|
||||
xref __CXFERR
|
||||
|
||||
__CXV54
|
||||
__CXV54:
|
||||
|
||||
MOVEM.L A0/A1,-(SP)
|
||||
MOVE.L D4,A0
|
||||
SWAP D0
|
||||
@ -47,11 +46,11 @@ __CXV54
|
||||
EOR.W D4,D0
|
||||
SUB.W #$3800,D0
|
||||
CMP.W #$10,D0
|
||||
BLT lbC000098
|
||||
BLT lab098
|
||||
CMP.W #$FEF,D0
|
||||
BLT lbC000102
|
||||
BLT lab102
|
||||
CMP.W #$47F0,D0
|
||||
BLT lbC000058
|
||||
BLT lab058
|
||||
SWAP D0
|
||||
LSL.L #3,D0
|
||||
ROL.L #3,D1
|
||||
@ -59,17 +58,16 @@ __CXV54
|
||||
EOR.L D1,D0
|
||||
SWAP D0
|
||||
OR.W #$7F80,D0
|
||||
BRA lbC000112
|
||||
BRA lab112
|
||||
|
||||
lbC000058
|
||||
CMP.W #$FF0,D0
|
||||
BGE lbC000074
|
||||
lab058: CMP.W #$FF0,D0
|
||||
BGE lab074
|
||||
CMP.L #$FFFF0FEF,D0
|
||||
BNE lbC000102
|
||||
BNE lab102
|
||||
CMP.L #$F0000000,D1
|
||||
BCS lbC000102
|
||||
lbC000074
|
||||
MOVEM.L D0/D1/A0/A1,-(SP)
|
||||
BCS lab102
|
||||
|
||||
lab074: MOVEM.L D0/D1/A0/A1,-(SP)
|
||||
PEA 2.L
|
||||
JSR __CXFERR
|
||||
ADDQ.W #4,SP
|
||||
@ -78,63 +76,56 @@ lbC000074
|
||||
EOR.W D4,D0
|
||||
SWAP D0
|
||||
MOVEQ #0,D1
|
||||
BRA lbC000116
|
||||
BRA lab116
|
||||
|
||||
lbC000098
|
||||
CMP.W #$FE90,D0
|
||||
BGE lbC0000C4
|
||||
lab098: CMP.W #$FE90,D0
|
||||
BGE lab0C4
|
||||
ADD.W #$3800,D0
|
||||
OR.L D1,D0
|
||||
BEQ lbC000112
|
||||
BEQ lab112
|
||||
MOVEM.L D0/D1/A0/A1,-(SP)
|
||||
PEA 1.L
|
||||
JSR __CXFERR
|
||||
ADDQ.W #4,SP
|
||||
MOVEM.L (SP)+,D0/D1/A0/A1
|
||||
MOVEQ #0,D0
|
||||
BRA lbC000112
|
||||
BRA lab112
|
||||
|
||||
lbC0000C4
|
||||
MOVE.L D5,A1
|
||||
lab0C4: MOVE.L D5,A1
|
||||
MOVE.W D0,D5
|
||||
AND.W #15,D0
|
||||
EOR.W #$10,D0
|
||||
SWAP D0
|
||||
ASR.W #4,D5
|
||||
ADDQ.W #2,D5
|
||||
BGE lbC0000E6
|
||||
BGE lab0E6
|
||||
NEG.W D5
|
||||
LSR.L D5,D0
|
||||
MOVEQ #0,D5
|
||||
ADDX.L D5,D0
|
||||
BRA lbC0000F6
|
||||
BRA lab0F6
|
||||
|
||||
lbC0000E6
|
||||
CLR.W D1
|
||||
lab0E6: CLR.W D1
|
||||
LSL.L D5,D0
|
||||
ADDQ.W #1,D5
|
||||
ROXL.L D5,D1
|
||||
AND.L #15,D1
|
||||
ADDX.L D1,D0
|
||||
lbC0000F6
|
||||
MOVE.L A1,D5
|
||||
lab0F6: MOVE.L A1,D5
|
||||
SWAP D0
|
||||
EOR.W D4,D0
|
||||
SWAP D0
|
||||
BRA lbC000116
|
||||
BRA lab116
|
||||
|
||||
lbC000102
|
||||
SWAP D0
|
||||
lab102: SWAP D0
|
||||
LSL.L #3,D0
|
||||
ROXL.L #4,D1
|
||||
AND.L #7,D1
|
||||
ADDX.L D1,D0
|
||||
SWAP D0
|
||||
lbC000112
|
||||
EOR.W D4,D0
|
||||
lab112: EOR.W D4,D0
|
||||
SWAP D0
|
||||
lbC000116
|
||||
MOVE.L A0,D4
|
||||
lab116: MOVE.L A0,D4
|
||||
MOVEM.L (SP)+,A0/A1
|
||||
RTS
|
||||
|
||||
|
||||
1632
library/smakefile
1632
library/smakefile
File diff suppressed because it is too large
Load Diff
75
library/stdlib_decay_unused_slabs.c
Normal file
75
library/stdlib_decay_unused_slabs.c
Normal file
@ -0,0 +1,75 @@
|
||||
/*
|
||||
* :ts=4
|
||||
*
|
||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
||||
* Copyright (c) 2002-2015 by Olaf Barthel <obarthel (at) gmx.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
||||
* may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _STDLIB_HEADERS_H
|
||||
#include "stdlib_headers.h"
|
||||
#endif /* _STDLIB_HEADERS_H */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#ifndef _STDLIB_MEMORY_H
|
||||
#include "stdlib_memory.h"
|
||||
#endif /* _STDLIB_MEMORY_H */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* Look at all currently unused slabs, decrementing the decay
|
||||
* counter which prevents them from being reused.
|
||||
*/
|
||||
void
|
||||
__decay_unused_slabs(void)
|
||||
{
|
||||
if(__slab_data.sd_InUse)
|
||||
{
|
||||
struct MinNode * free_node;
|
||||
struct MinNode * free_node_next;
|
||||
struct SlabNode * sn;
|
||||
|
||||
__memory_lock();
|
||||
|
||||
for(free_node = (struct MinNode *)__slab_data.sd_EmptySlabs.mlh_Head ;
|
||||
free_node->mln_Succ != NULL ;
|
||||
free_node = free_node_next)
|
||||
{
|
||||
free_node_next = (struct MinNode *)free_node->mln_Succ;
|
||||
|
||||
/* free_node points to SlabNode.sn_EmptyLink, which
|
||||
* directly follows the SlabNode.sn_MinNode.
|
||||
*/
|
||||
sn = (struct SlabNode *)&free_node[-1];
|
||||
|
||||
if(sn->sn_EmptyDecay > 0)
|
||||
sn->sn_EmptyDecay--;
|
||||
}
|
||||
|
||||
__memory_unlock();
|
||||
}
|
||||
}
|
||||
@ -374,44 +374,57 @@ remove_and_free_memory_node(struct MemoryNode * mn)
|
||||
#if defined(__USE_SLAB_ALLOCATOR)
|
||||
{
|
||||
/* Are we using the slab allocator? */
|
||||
if (__slab_data.sd_InUse)
|
||||
if(__slab_data.sd_InUse)
|
||||
{
|
||||
__slab_free(mn,allocation_size);
|
||||
}
|
||||
else if (__memory_pool != NULL)
|
||||
{
|
||||
FreePooled(__memory_pool,mn,allocation_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(__MEM_DEBUG)
|
||||
if(__memory_pool != NULL)
|
||||
{
|
||||
FreeMem(mn,allocation_size);
|
||||
PROFILE_OFF();
|
||||
FreePooled(__memory_pool,mn,allocation_size);
|
||||
PROFILE_ON();
|
||||
}
|
||||
#else
|
||||
else
|
||||
{
|
||||
struct MinNode * mln = (struct MinNode *)mn;
|
||||
#if defined(__MEM_DEBUG)
|
||||
{
|
||||
PROFILE_OFF();
|
||||
FreeMem(mn,allocation_size);
|
||||
PROFILE_ON();
|
||||
}
|
||||
#else
|
||||
{
|
||||
struct MinNode * mln = (struct MinNode *)mn;
|
||||
|
||||
mln--;
|
||||
mln--;
|
||||
|
||||
Remove((struct Node *)mln);
|
||||
Remove((struct Node *)mln);
|
||||
|
||||
FreeMem(mln,sizeof(*mln) + allocation_size);
|
||||
PROFILE_OFF();
|
||||
FreeMem(mln,sizeof(*mln) + allocation_size);
|
||||
PROFILE_ON();
|
||||
}
|
||||
#endif /* __MEM_DEBUG */
|
||||
}
|
||||
#endif /* __MEM_DEBUG */
|
||||
}
|
||||
}
|
||||
#else
|
||||
{
|
||||
if (__memory_pool != NULL)
|
||||
if(__memory_pool != NULL)
|
||||
{
|
||||
PROFILE_OFF();
|
||||
FreePooled(__memory_pool,mn,allocation_size);
|
||||
PROFILE_ON();
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(__MEM_DEBUG)
|
||||
{
|
||||
PROFILE_OFF();
|
||||
FreeMem(mn,allocation_size);
|
||||
PROFILE_ON();
|
||||
}
|
||||
#else
|
||||
{
|
||||
@ -421,7 +434,9 @@ remove_and_free_memory_node(struct MemoryNode * mn)
|
||||
|
||||
Remove((struct Node *)mln);
|
||||
|
||||
PROFILE_OFF();
|
||||
FreeMem(mln,sizeof(*mln) + allocation_size);
|
||||
PROFILE_ON();
|
||||
}
|
||||
#endif /* __MEM_DEBUG */
|
||||
}
|
||||
|
||||
@ -72,7 +72,9 @@ __free_unused_slabs(void)
|
||||
/* Unlink from list of slabs of the same size. */
|
||||
Remove((struct Node *)sn);
|
||||
|
||||
PROFILE_OFF();
|
||||
FreeVec(sn);
|
||||
PROFILE_ON();
|
||||
}
|
||||
|
||||
__memory_unlock();
|
||||
|
||||
@ -41,9 +41,13 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#include <setjmp.h>
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
struct context
|
||||
{
|
||||
int status;
|
||||
jmp_buf abort_buf;
|
||||
void * user_data;
|
||||
__slab_status_callback callback;
|
||||
char * buffer;
|
||||
@ -54,23 +58,21 @@ struct context
|
||||
|
||||
static void print(struct context * ct, const char * format, ...)
|
||||
{
|
||||
if(ct->status == 0)
|
||||
{
|
||||
va_list args;
|
||||
int len;
|
||||
va_list args;
|
||||
int len;
|
||||
|
||||
va_start(args,format);
|
||||
len = vsnprintf(ct->buffer, ct->buffer_size, format, args);
|
||||
va_end(args);
|
||||
va_start(args,format);
|
||||
len = vsnprintf(ct->buffer, ct->buffer_size, format, args);
|
||||
va_end(args);
|
||||
|
||||
/* This shouldn't happen: the buffer ought to be large enough
|
||||
* to hold every single line.
|
||||
*/
|
||||
if(len >= (int)ct->buffer_size)
|
||||
len = strlen(ct->buffer);
|
||||
/* This shouldn't happen: the buffer ought to be large enough
|
||||
* to hold every single line.
|
||||
*/
|
||||
if(len >= (int)ct->buffer_size)
|
||||
len = strlen(ct->buffer);
|
||||
|
||||
ct->status = (*ct->callback)(ct->user_data, ct->buffer, len);
|
||||
}
|
||||
if((*ct->callback)(ct->user_data, ct->buffer, len) != 0)
|
||||
longjmp(ct->abort_buf,-1);
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
@ -83,11 +85,11 @@ __get_slab_stats(void * user_data, __slab_status_callback callback)
|
||||
static int times_checked = 1;
|
||||
|
||||
const struct SlabNode * sn;
|
||||
size_t num_empty_slabs = 0;
|
||||
size_t num_full_slabs = 0;
|
||||
size_t num_slabs = 0;
|
||||
size_t slab_allocation_size = 0;
|
||||
size_t total_slab_allocation_size = 0;
|
||||
volatile size_t num_empty_slabs = 0;
|
||||
volatile size_t num_full_slabs = 0;
|
||||
volatile size_t num_slabs = 0;
|
||||
volatile size_t slab_allocation_size = 0;
|
||||
volatile size_t total_slab_allocation_size = 0;
|
||||
struct context ct;
|
||||
char line[1024];
|
||||
char time_buffer[40];
|
||||
@ -104,96 +106,100 @@ __get_slab_stats(void * user_data, __slab_status_callback callback)
|
||||
|
||||
__memory_lock();
|
||||
|
||||
now = time(NULL);
|
||||
localtime_r(&now, &when);
|
||||
|
||||
strftime(time_buffer, sizeof(time_buffer), "%Y-%m-%dT%H:%M:%S", &when);
|
||||
|
||||
print(&ct,"{\n");
|
||||
|
||||
print(&ct,"\t\"when\": \"%s\",\n", time_buffer);
|
||||
print(&ct,"\t\"times_checked\": %d,\n", times_checked++);
|
||||
print(&ct,"\t\"slab_size\": %zu,\n", __slab_data.sd_StandardSlabSize);
|
||||
print(&ct,"\t\"num_single_allocations\": %zu,\n", __slab_data.sd_NumSingleAllocations);
|
||||
print(&ct,"\t\"total_single_allocation_size\": %zu,\n", __slab_data.sd_TotalSingleAllocationSize);
|
||||
|
||||
if(__slab_data.sd_SingleAllocations.mlh_Head->mln_Succ != NULL)
|
||||
if(setjmp(ct.abort_buf) == 0)
|
||||
{
|
||||
const struct SlabSingleAllocation * ssa;
|
||||
now = time(NULL);
|
||||
localtime_r(&now, &when);
|
||||
|
||||
print(&ct,"\t\"single_allocations\": [\n");
|
||||
strftime(time_buffer, sizeof(time_buffer), "%Y-%m-%dT%H:%M:%S", &when);
|
||||
|
||||
for(ssa = (struct SlabSingleAllocation *)__slab_data.sd_SingleAllocations.mlh_Head ;
|
||||
ssa->ssa_MinNode.mln_Succ != NULL && ct.status == 0 ;
|
||||
ssa = (struct SlabSingleAllocation *)ssa->ssa_MinNode.mln_Succ)
|
||||
print(&ct,"{\n");
|
||||
|
||||
print(&ct,"\t\"when\": \"%s\",\n", time_buffer);
|
||||
print(&ct,"\t\"times_checked\": %d,\n", times_checked++);
|
||||
print(&ct,"\t\"slab_size\": %zu,\n", __slab_data.sd_StandardSlabSize);
|
||||
print(&ct,"\t\"num_single_allocations\": %zu,\n", __slab_data.sd_NumSingleAllocations);
|
||||
print(&ct,"\t\"total_single_allocation_size\": %zu,\n", __slab_data.sd_TotalSingleAllocationSize);
|
||||
|
||||
if(__slab_data.sd_SingleAllocations.mlh_Head->mln_Succ != NULL)
|
||||
{
|
||||
print(&ct,"\t\t{ \"size\": %lu, \"total_size\": %lu }%s\n",
|
||||
ssa->ssa_Size - sizeof(*ssa), ssa->ssa_Size,
|
||||
ssa->ssa_MinNode.mln_Succ->mln_Succ != NULL ? "," : "");
|
||||
const struct SlabSingleAllocation * ssa;
|
||||
|
||||
print(&ct,"\t\"single_allocations\": [\n");
|
||||
|
||||
for(ssa = (struct SlabSingleAllocation *)__slab_data.sd_SingleAllocations.mlh_Head ;
|
||||
ssa->ssa_MinNode.mln_Succ != NULL ;
|
||||
ssa = (struct SlabSingleAllocation *)ssa->ssa_MinNode.mln_Succ)
|
||||
{
|
||||
print(&ct,"\t\t{ \"size\": %lu, \"total_size\": %lu }%s\n",
|
||||
ssa->ssa_Size - sizeof(*ssa), ssa->ssa_Size,
|
||||
ssa->ssa_MinNode.mln_Succ->mln_Succ != NULL ? "," : "");
|
||||
}
|
||||
|
||||
print(&ct,"\t],\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
print(&ct,"\t\"single_allocations\": [],\n");
|
||||
}
|
||||
|
||||
print(&ct,"\t],\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
print(&ct,"\t\"single_allocations\": [],\n");
|
||||
}
|
||||
|
||||
for(i = 0 ; i < (int)NUM_ENTRIES(__slab_data.sd_Slabs) ; i++)
|
||||
{
|
||||
for(sn = (struct SlabNode *)__slab_data.sd_Slabs[i].mlh_Head ;
|
||||
sn->sn_MinNode.mln_Succ != NULL ;
|
||||
sn = (struct SlabNode *)sn->sn_MinNode.mln_Succ)
|
||||
{
|
||||
if (sn->sn_UseCount == 0)
|
||||
num_empty_slabs++;
|
||||
else if (sn->sn_UseCount == sn->sn_Count)
|
||||
num_full_slabs++;
|
||||
|
||||
num_slabs++;
|
||||
|
||||
slab_allocation_size += sn->sn_ChunkSize * sn->sn_UseCount;
|
||||
total_slab_allocation_size += sizeof(*sn) + __slab_data.sd_StandardSlabSize;
|
||||
}
|
||||
}
|
||||
|
||||
print(&ct,"\t\"num_slabs\": %zu,\n", num_slabs);
|
||||
print(&ct,"\t\"num_empty_slabs\": %zu,\n", num_empty_slabs);
|
||||
print(&ct,"\t\"num_full_slabs\": %zu,\n", num_full_slabs);
|
||||
print(&ct,"\t\"slab_allocation_size\": %zu,\n", slab_allocation_size);
|
||||
print(&ct,"\t\"total_slab_allocation_size\": %zu,\n", total_slab_allocation_size);
|
||||
|
||||
if(num_slabs > 0)
|
||||
{
|
||||
const char * eol = "";
|
||||
|
||||
print(&ct,"\t\"slabs\": [\n");
|
||||
|
||||
for(i = 0 ; i < (int)NUM_ENTRIES(__slab_data.sd_Slabs) && ct.status == 0 ; i++)
|
||||
for(i = 0 ; i < (int)NUM_ENTRIES(__slab_data.sd_Slabs) ; i++)
|
||||
{
|
||||
for(sn = (struct SlabNode *)__slab_data.sd_Slabs[i].mlh_Head ;
|
||||
sn->sn_MinNode.mln_Succ != NULL && ct.status == 0 ;
|
||||
sn->sn_MinNode.mln_Succ != NULL ;
|
||||
sn = (struct SlabNode *)sn->sn_MinNode.mln_Succ)
|
||||
{
|
||||
print(&ct,"%s\t\t{ \"size\": %lu, \"chunks\": %lu, \"chunks_in_use\": %lu, \"times_reused\": %lu }",
|
||||
eol,
|
||||
sn->sn_ChunkSize,
|
||||
sn->sn_Count,
|
||||
sn->sn_UseCount,
|
||||
sn->sn_NumReused);
|
||||
if (sn->sn_UseCount == 0)
|
||||
num_empty_slabs++;
|
||||
else if (sn->sn_UseCount == sn->sn_Count)
|
||||
num_full_slabs++;
|
||||
|
||||
eol = ",\n";
|
||||
num_slabs++;
|
||||
|
||||
slab_allocation_size += sn->sn_ChunkSize * sn->sn_UseCount;
|
||||
total_slab_allocation_size += sizeof(*sn) + __slab_data.sd_StandardSlabSize;
|
||||
}
|
||||
}
|
||||
|
||||
print(&ct,"\n\t]\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
print(&ct,"\t\"slabs\": []\n");
|
||||
}
|
||||
print(&ct,"\t\"num_slabs\": %zu,\n", num_slabs);
|
||||
print(&ct,"\t\"num_empty_slabs\": %zu,\n", num_empty_slabs);
|
||||
print(&ct,"\t\"num_full_slabs\": %zu,\n", num_full_slabs);
|
||||
print(&ct,"\t\"slab_allocation_size\": %zu,\n", slab_allocation_size);
|
||||
print(&ct,"\t\"total_slab_allocation_size\": %zu,\n", total_slab_allocation_size);
|
||||
|
||||
print(&ct,"}\n");
|
||||
if(num_slabs > 0)
|
||||
{
|
||||
const char * eol = "";
|
||||
|
||||
print(&ct,"\t\"slabs\": [\n");
|
||||
|
||||
for(i = 0 ; i < (int)NUM_ENTRIES(__slab_data.sd_Slabs) ; i++)
|
||||
{
|
||||
for(sn = (struct SlabNode *)__slab_data.sd_Slabs[i].mlh_Head ;
|
||||
sn->sn_MinNode.mln_Succ != NULL ;
|
||||
sn = (struct SlabNode *)sn->sn_MinNode.mln_Succ)
|
||||
{
|
||||
print(&ct,"%s\t\t{ \"size\": %lu, \"chunks\": %lu, \"chunks_in_use\": %lu, \"times_reused\": %lu, \"empty_decay\": %lu }",
|
||||
eol,
|
||||
sn->sn_ChunkSize,
|
||||
sn->sn_Count,
|
||||
sn->sn_UseCount,
|
||||
sn->sn_NumReused,
|
||||
sn->sn_EmptyDecay);
|
||||
|
||||
eol = ",\n";
|
||||
}
|
||||
}
|
||||
|
||||
print(&ct,"\n\t]\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
print(&ct,"\t\"slabs\": []\n");
|
||||
}
|
||||
|
||||
print(&ct,"}\n");
|
||||
}
|
||||
|
||||
__memory_unlock();
|
||||
}
|
||||
|
||||
@ -37,6 +37,10 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#if defined(__GNUC__) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
lldiv_t
|
||||
lldiv(long long n,long long d)
|
||||
{
|
||||
@ -49,3 +53,7 @@ lldiv(long long n,long long d)
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#endif
|
||||
|
||||
@ -117,9 +117,20 @@ call_main(void)
|
||||
struct Process * this_process = (struct Process *)FindTask(NULL);
|
||||
UBYTE * arg_str = GetArgStr();
|
||||
size_t arg_str_len = strlen(arg_str);
|
||||
UBYTE * arg_str_copy = AllocVec(arg_str_len+1,MEMF_PRIVATE);
|
||||
UBYTE * arg_str_copy;
|
||||
UBYTE current_dir_name[256];
|
||||
|
||||
#if defined(__amigaos4__)
|
||||
{
|
||||
arg_str_copy = AllocVec(arg_str_len+1,MEMF_PRIVATE);
|
||||
}
|
||||
#else
|
||||
{
|
||||
arg_str_copy = AllocVec(arg_str_len+1,MEMF_ANY);
|
||||
}
|
||||
#endif /* __amigaos4__ */
|
||||
|
||||
|
||||
if(arg_str_copy != NULL && NameFromLock(this_process->pr_CurrentDir,current_dir_name,sizeof(current_dir_name)))
|
||||
{
|
||||
strcpy(arg_str_copy,arg_str);
|
||||
|
||||
@ -147,56 +147,73 @@ __allocate_memory(size_t size,BOOL never_free,const char * UNUSED debug_file_nam
|
||||
#if defined(__USE_SLAB_ALLOCATOR)
|
||||
{
|
||||
/* Are we using the slab allocator? */
|
||||
if (__slab_data.sd_InUse)
|
||||
if(__slab_data.sd_InUse)
|
||||
{
|
||||
mn = __slab_allocate(allocation_size);
|
||||
}
|
||||
else if (__memory_pool != NULL)
|
||||
{
|
||||
mn = AllocPooled(__memory_pool,allocation_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef __MEM_DEBUG
|
||||
if (__memory_pool != NULL)
|
||||
{
|
||||
mn = AllocMem(allocation_size,MEMF_ANY);
|
||||
PROFILE_OFF();
|
||||
mn = AllocPooled(__memory_pool,allocation_size);
|
||||
PROFILE_ON();
|
||||
}
|
||||
#else
|
||||
else
|
||||
{
|
||||
struct MinNode * mln;
|
||||
|
||||
mln = AllocMem(sizeof(*mln) + allocation_size,MEMF_ANY);
|
||||
if(mln != NULL)
|
||||
#ifdef __MEM_DEBUG
|
||||
{
|
||||
AddTail((struct List *)&__memory_list,(struct Node *)mln);
|
||||
|
||||
mn = (struct MemoryNode *)&mln[1];
|
||||
PROFILE_OFF();
|
||||
mn = AllocMem(allocation_size,MEMF_ANY);
|
||||
PROFILE_ON();
|
||||
}
|
||||
else
|
||||
#else
|
||||
{
|
||||
mn = NULL;
|
||||
struct MinNode * mln;
|
||||
|
||||
PROFILE_OFF();
|
||||
mln = AllocMem(sizeof(*mln) + allocation_size,MEMF_ANY);
|
||||
PROFILE_ON();
|
||||
|
||||
if(mln != NULL)
|
||||
{
|
||||
AddTail((struct List *)&__memory_list,(struct Node *)mln);
|
||||
|
||||
mn = (struct MemoryNode *)&mln[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
mn = NULL;
|
||||
}
|
||||
}
|
||||
#endif /* __MEM_DEBUG */
|
||||
}
|
||||
#endif /* __MEM_DEBUG */
|
||||
}
|
||||
}
|
||||
#else
|
||||
{
|
||||
if(__memory_pool != NULL)
|
||||
{
|
||||
PROFILE_OFF();
|
||||
mn = AllocPooled(__memory_pool,allocation_size);
|
||||
PROFILE_ON();
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef __MEM_DEBUG
|
||||
{
|
||||
PROFILE_OFF();
|
||||
mn = AllocMem(allocation_size,MEMF_ANY);
|
||||
PROFILE_ON();
|
||||
}
|
||||
#else
|
||||
{
|
||||
struct MinNode * mln;
|
||||
|
||||
PROFILE_OFF();
|
||||
mln = AllocMem(sizeof(*mln) + allocation_size,MEMF_ANY);
|
||||
PROFILE_ON();
|
||||
|
||||
if(mln != NULL)
|
||||
{
|
||||
AddTail((struct List *)&__memory_list,(struct Node *)mln);
|
||||
@ -355,8 +372,12 @@ static struct SignalSemaphore * memory_semaphore;
|
||||
void
|
||||
__memory_lock(void)
|
||||
{
|
||||
PROFILE_OFF();
|
||||
|
||||
if(memory_semaphore != NULL)
|
||||
ObtainSemaphore(memory_semaphore);
|
||||
|
||||
PROFILE_ON();
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
@ -364,8 +385,12 @@ __memory_lock(void)
|
||||
void
|
||||
__memory_unlock(void)
|
||||
{
|
||||
PROFILE_OFF();
|
||||
|
||||
if(memory_semaphore != NULL)
|
||||
ReleaseSemaphore(memory_semaphore);
|
||||
|
||||
PROFILE_ON();
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
@ -503,7 +528,7 @@ STDLIB_CONSTRUCTOR(stdlib_memory_init)
|
||||
#if defined(__USE_SLAB_ALLOCATOR)
|
||||
{
|
||||
/* ZZZ this is just for the purpose of testing */
|
||||
#if 1
|
||||
#if DEBUG
|
||||
{
|
||||
TEXT slab_size_var[20];
|
||||
|
||||
|
||||
@ -45,8 +45,8 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
extern void ASM _PROLOG(REG(a0,char *));
|
||||
extern void ASM _EPILOG(REG(a0,char *));
|
||||
extern void __asm _PROLOG(register __a0 char *);
|
||||
extern void __asm _EPILOG(register __a0 char *);
|
||||
|
||||
#if _PROFILE
|
||||
#define PROFILE_OFF() _PROLOG(0L)
|
||||
|
||||
@ -85,6 +85,8 @@ __slab_allocate(size_t allocation_size)
|
||||
/* No integer overflow? */
|
||||
if(allocation_size < total_single_allocation_size)
|
||||
{
|
||||
PROFILE_OFF();
|
||||
|
||||
#if defined(__amigaos4__)
|
||||
{
|
||||
ssa = AllocMem(total_single_allocation_size,MEMF_PRIVATE);
|
||||
@ -94,6 +96,8 @@ __slab_allocate(size_t allocation_size)
|
||||
ssa = AllocMem(total_single_allocation_size,MEMF_ANY);
|
||||
}
|
||||
#endif /* __amigaos4__ */
|
||||
|
||||
PROFILE_ON();
|
||||
}
|
||||
/* Integer overflow has occured. */
|
||||
else
|
||||
@ -203,6 +207,9 @@ __slab_allocate(size_t allocation_size)
|
||||
|
||||
/* Pull it out of the list of slabs available for reuse. */
|
||||
Remove((struct Node *)&sn->sn_EmptyLink);
|
||||
|
||||
sn->sn_EmptyDecay = 0;
|
||||
sn->sn_NumReused++;
|
||||
}
|
||||
|
||||
sn->sn_UseCount++;
|
||||
@ -272,6 +279,8 @@ __slab_allocate(size_t allocation_size)
|
||||
|
||||
D(("reusing a slab"));
|
||||
|
||||
sn->sn_NumReused++;
|
||||
|
||||
new_sn = sn;
|
||||
break;
|
||||
}
|
||||
@ -284,6 +293,8 @@ __slab_allocate(size_t allocation_size)
|
||||
{
|
||||
D(("no slab is available for reuse; allocating a new slab (%lu bytes)",sizeof(*new_sn) + __slab_data.sd_StandardSlabSize));
|
||||
|
||||
PROFILE_OFF();
|
||||
|
||||
#if defined(__amigaos4__)
|
||||
{
|
||||
new_sn = (struct SlabNode *)AllocVec(sizeof(*new_sn) + __slab_data.sd_StandardSlabSize,MEMF_PRIVATE);
|
||||
@ -294,6 +305,8 @@ __slab_allocate(size_t allocation_size)
|
||||
}
|
||||
#endif /* __amigaos4__ */
|
||||
|
||||
PROFILE_ON();
|
||||
|
||||
if(new_sn == NULL)
|
||||
D(("slab allocation failed"));
|
||||
|
||||
@ -354,8 +367,6 @@ __slab_allocate(size_t allocation_size)
|
||||
/* This slab was reused and need not be reinitialized from scratch. */
|
||||
else
|
||||
{
|
||||
new_sn->sn_NumReused++;
|
||||
|
||||
assert( new_sn->sn_FreeList.mlh_Head != NULL );
|
||||
assert( new_sn->sn_ChunkSize == chunk_size );
|
||||
assert( new_sn->sn_Count == 0 );
|
||||
@ -409,7 +420,9 @@ __slab_allocate(size_t allocation_size)
|
||||
/* Unlink from list of slabs of the same size. */
|
||||
Remove((struct Node *)sn);
|
||||
|
||||
PROFILE_OFF();
|
||||
FreeVec(sn);
|
||||
PROFILE_ON();
|
||||
|
||||
total_purged += sizeof(*sn) + __slab_data.sd_StandardSlabSize;
|
||||
|
||||
@ -509,7 +522,10 @@ __slab_free(void * address,size_t allocation_size)
|
||||
assert( size <= __slab_data.sd_TotalSingleAllocationSize );
|
||||
|
||||
Remove((struct Node *)ssa);
|
||||
|
||||
PROFILE_OFF();
|
||||
FreeMem(ssa, size);
|
||||
PROFILE_ON();
|
||||
|
||||
__slab_data.sd_NumSingleAllocations--;
|
||||
__slab_data.sd_TotalSingleAllocationSize -= size;
|
||||
@ -804,7 +820,9 @@ __slab_exit(void)
|
||||
total_slab_size += sizeof(*sn) + __slab_data.sd_StandardSlabSize;
|
||||
slab_count++;
|
||||
|
||||
PROFILE_OFF();
|
||||
FreeVec(sn);
|
||||
PROFILE_ON();
|
||||
}
|
||||
}
|
||||
|
||||
@ -830,7 +848,9 @@ __slab_exit(void)
|
||||
total_single_allocation_size += ssa->ssa_Size;
|
||||
single_allocation_count++;
|
||||
|
||||
PROFILE_OFF();
|
||||
FreeMem(ssa, ssa->ssa_Size);
|
||||
PROFILE_ON();
|
||||
}
|
||||
|
||||
if(single_allocation_count > 0)
|
||||
|
||||
@ -184,7 +184,6 @@ __getcwd(char * buffer,size_t buffer_size,const char *file,int line)
|
||||
if(__unix_path_semantics)
|
||||
{
|
||||
const char * path_name = buffer;
|
||||
size_t len;
|
||||
|
||||
if(__translate_amiga_to_unix_path_name(&path_name,&buffer_nti) != 0)
|
||||
goto out;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#define VERSION 1
|
||||
#define REVISION 212
|
||||
#define DATE "27.11.2016"
|
||||
#define VERS "unix.lib 1.212"
|
||||
#define VSTRING "unix.lib 1.212 (27.11.2016)\r\n"
|
||||
#define VERSTAG "\0$VER: unix.lib 1.212 (27.11.2016)"
|
||||
#define REVISION 213
|
||||
#define DATE "4.12.2016"
|
||||
#define VERS "unix.lib 1.213"
|
||||
#define VSTRING "unix.lib 1.213 (4.12.2016)\r\n"
|
||||
#define VERSTAG "\0$VER: unix.lib 1.213 (4.12.2016)"
|
||||
|
||||
@ -1 +1 @@
|
||||
212
|
||||
213
|
||||
|
||||
@ -21,104 +21,120 @@ WARNINGS = \
|
||||
-Wall -W -Wshadow -Wpointer-arith -Wsign-compare -Wmissing-prototypes \
|
||||
-Wundef -Wbad-function-cast -Wmissing-declarations -Wconversion
|
||||
|
||||
V = /V
|
||||
INCLUDE = -I$(V)/include -I../library/include
|
||||
LIB = -L../library/lib
|
||||
#OPTIONS = -DNDEBUG -fno-builtin -DNO_INLINE_STDARG -DIEEE_FLOATING_POINT_SUPPORT
|
||||
#OPTIONS = -D__MEM_DEBUG -fno-builtin
|
||||
OPTIONS = -DDEBUG -DNO_INLINE_STDARG -fno-builtin
|
||||
#OPTIMIZE = -O
|
||||
#OPTIMIZE = -O2 -fomit-frame-pointer
|
||||
DEBUG = -ggdb
|
||||
#OPTIONS = -D__MEM_DEBUG
|
||||
#OPTIONS = -DDEBUG
|
||||
OPTIONS = -DNDEBUG
|
||||
#OPTIMIZE = -O3
|
||||
#DEBUG = -ggdb
|
||||
|
||||
CFLAGS = $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(CODE_TYPE) $(INCLUDE) $(LIB)
|
||||
# Note: Because the matching startup code needs to be used for
|
||||
# correctly linking the test programs, you need to make sure
|
||||
# that the current development version of clib2 is visible
|
||||
# where the linker expects it (soft link). Some more tuning would be
|
||||
# required here because you really should not need to tinker
|
||||
# with the location of library and the options "-L. -L../library/lib"
|
||||
# should be sufficient.
|
||||
|
||||
CFLAGS = -mcrt=clib2 -fno-builtin $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(INCLUDE)
|
||||
LFLAGS = -Wl,-d
|
||||
|
||||
##############################################################################
|
||||
|
||||
LIBS = -lm -lc -ldebug -lgcc
|
||||
LIBS = -ldebug -lm -lc
|
||||
|
||||
##############################################################################
|
||||
|
||||
all: test fgets_test iotest sscanf_test printf_test sprintf_test \
|
||||
stack_size_test translate_test strtok_test uname simple \
|
||||
fstat_stdout_test simple_sprintf date_test sscanf_64 \
|
||||
factorial setlocale
|
||||
factorial setlocale rand malloc-test slab-test
|
||||
|
||||
clean:
|
||||
$(DELETE) *.o *.map test fgets_test iotest sscanf_test printf_test \
|
||||
sprintf_test stack_size_test translate_test strtok_test \
|
||||
uname simple fstat_stdout_test simple_sprintf date_test \
|
||||
sscanf_64 factorial setlocale rand
|
||||
sscanf_64 factorial setlocale rand malloc-test slab-test
|
||||
|
||||
##############################################################################
|
||||
|
||||
setlocale : setlocale.o
|
||||
@echo "Linking $@"
|
||||
$(CC) $(CFLAGS) -o $@ setlocale.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
|
||||
$(CC) $(CFLAGS) -o $@ setlocale.o $(LIBS) $(LFLAGS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
test : test.o
|
||||
@echo "Linking $@"
|
||||
$(CC) $(CFLAGS) -o $@ test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
|
||||
$(CC) $(CFLAGS) -o $@ test.o $(LIBS) $(LFLAGS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
date_test : date_test.o
|
||||
@echo "Linking $@"
|
||||
$(CC) $(CFLAGS) -o $@ test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
|
||||
$(CC) $(CFLAGS) -o $@ test.o $(LIBS) $(LFLAGS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
fgets_test : fgets_test.o
|
||||
@echo "Linking $@"
|
||||
$(CC) $(CFLAGS) -o $@ fgets_test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
|
||||
$(CC) $(CFLAGS) -o $@ fgets_test.o $(LIBS) $(LFLAGS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
strtok_test : strtok_test.o
|
||||
@echo "Linking $@"
|
||||
$(CC) $(CFLAGS) -o $@ strtok_test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
|
||||
$(CC) $(CFLAGS) -o $@ strtok_test.o $(LIBS) $(LFLAGS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
iotest : iotest.o
|
||||
@echo "Linking $@"
|
||||
$(CC) $(CFLAGS) -o $@ iotest.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
|
||||
$(CC) $(CFLAGS) -o $@ iotest.o $(LIBS) $(LFLAGS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
sscanf_test : sscanf_test.o
|
||||
@echo "Linking $@"
|
||||
$(CC) $(CFLAGS) -o $@ sscanf_test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
|
||||
$(CC) $(CFLAGS) -o $@ sscanf_test.o $(LIBS) $(LFLAGS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
printf_test : printf_test.o
|
||||
@echo "Linking $@"
|
||||
$(CC) $(CFLAGS) -o $@ printf_test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
|
||||
$(CC) $(CFLAGS) -o $@ printf_test.o $(LIBS) $(LFLAGS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
sprintf_test : sprintf_test.o
|
||||
@echo "Linking $@"
|
||||
$(CC) $(CFLAGS) -o $@ sprintf_test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
|
||||
$(CC) $(CFLAGS) -o $@ sprintf_test.o $(LIBS) $(LFLAGS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
stack_size_test : stack_size_test.o
|
||||
@echo "Linking $@"
|
||||
$(CC) $(CFLAGS) -o $@ stack_size_test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
|
||||
$(CC) $(CFLAGS) -o $@ stack_size_test.o $(LIBS) $(LFLAGS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
translate_test : translate_test.o
|
||||
@echo "Linking $@"
|
||||
$(CC) $(CFLAGS) -o $@ translate_test.o -lunix $(LIBS) -Wl,--cref,-M,-Map=$@.map
|
||||
$(CC) $(CFLAGS) -o $@ translate_test.o -lunix $(LIBS) $(LFLAGS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
uname : uname.o
|
||||
@echo "Linking $@"
|
||||
$(CC) $(CFLAGS) -o $@ uname.o -lunix $(LIBS) -Wl,--cref,-M,-Map=$@.map
|
||||
$(CC) $(CFLAGS) -o $@ uname.o -lunix $(LIBS) $(LFLAGS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
simple : simple.o
|
||||
@echo "Linking $@"
|
||||
$(CC) $(CFLAGS) -o $@ simple.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
|
||||
$(CC) $(CFLAGS) -o $@ simple.o $(LIBS) $(LFLAGS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
fstat_stdout_test : fstat_stdout_test.o
|
||||
@echo "Linking $@"
|
||||
$(CC) $(CFLAGS) -o $@ fstat_stdout_test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
|
||||
$(CC) $(CFLAGS) -o $@ fstat_stdout_test.o $(LIBS) $(LFLAGS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
simple_sprintf : simple_sprintf.o
|
||||
@echo "Linking $@"
|
||||
$(CC) -nostdlib $(CFLAGS) -o $@ simple_sprintf.o -lc -lgcc -Wl,--cref,-M,-Map=$@.map
|
||||
$(CC) $(CFLAGS) -nostdlib -o $@ simple_sprintf.o -lc -lgcc $(LFLAGS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
sscanf_64 : sscanf_64.o
|
||||
@echo "Linking $@"
|
||||
$(CC) -nostdlib $(CFLAGS) -o $@ sscanf_64.o -lc -lgcc -Wl,--cref,-M,-Map=$@.map
|
||||
$(CC) $(CFLAGS) -o $@ sscanf_64.o $(LIBS) $(LFLAGS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
factorial : factorial.o
|
||||
@echo "Linking $@"
|
||||
$(CC) -nostdlib $(CFLAGS) -o $@ factorial.o -lc -lgcc -Wl,--cref,-M,-Map=$@.map
|
||||
$(CC) $(CFLAGS) -o $@ factorial.o $(LIBS) $(LFLAGS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
rand : rand.o
|
||||
@echo "Linking $@"
|
||||
$(CC) -nostdlib $(CFLAGS) -o $@ rand.o -lc -lgcc -Wl,--cref,-M,-Map=$@.map
|
||||
$(CC) $(CFLAGS) -o $@ rand.o $(LIBS) $(LFLAGS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
malloc-test : malloc-test.o
|
||||
@echo "Linking $@"
|
||||
$(CC) $(CFLAGS) -o $@ malloc-test.o $(LIBS) $(LFLAGS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
slab-test : slab-test.o
|
||||
@echo "Linking $@"
|
||||
$(CC) $(CFLAGS) -o $@ slab-test.o $(LIBS) $(LFLAGS) -Wl,--cref,-M,-Map=$@.map
|
||||
|
||||
@ -13,14 +13,78 @@ static int print_json(void * ignore,const char * buffer,size_t len)
|
||||
int
|
||||
main(int argc,char ** argv)
|
||||
{
|
||||
int num_allocations = 1000;
|
||||
int max_allocation_size = 8192;
|
||||
int random_free_percentage = 33;
|
||||
char ** allocation_table;
|
||||
char * allocation;
|
||||
int i;
|
||||
|
||||
allocation_table = malloc(sizeof(*allocation_table) * num_allocations);
|
||||
if(allocation_table == NULL)
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
srand(1);
|
||||
|
||||
for(i = 0 ; i < 1000 ; i++)
|
||||
malloc(1 + (rand() % 8192));
|
||||
printf("/* Allocating %d random length fragments of memory (maximum size = %ld bytes). */\n", num_allocations, max_allocation_size);
|
||||
|
||||
for(i = 0 ; i < num_allocations ; i++)
|
||||
{
|
||||
allocation = malloc(1 + (rand() % max_allocation_size));
|
||||
if(allocation == NULL)
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
allocation_table[i] = allocation;
|
||||
}
|
||||
|
||||
__get_slab_stats(NULL, print_json);
|
||||
|
||||
return(0);
|
||||
printf("\n/* Changing all allocations to different random lengths. */\n");
|
||||
|
||||
for(i = 0 ; i < num_allocations ; i++)
|
||||
{
|
||||
allocation = realloc(allocation_table[i], 1 + (rand() % max_allocation_size));
|
||||
if(allocation == NULL)
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
allocation_table[i] = allocation;
|
||||
}
|
||||
|
||||
__get_slab_stats(NULL, print_json);
|
||||
|
||||
printf("\n/* Freeing %d%% of all allocations. */\n", random_free_percentage);
|
||||
|
||||
for(i = 0 ; i < num_allocations ; i++)
|
||||
{
|
||||
if((rand() % 100) < 33)
|
||||
{
|
||||
free(allocation_table[i]);
|
||||
allocation_table[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
__get_slab_stats(NULL, print_json);
|
||||
|
||||
printf("\n/* Marking unused slabs for reuse; reallocating memory/changing allocation lengths. */\n");
|
||||
|
||||
__decay_unused_slabs();
|
||||
|
||||
for(i = 0 ; i < num_allocations ; i++)
|
||||
{
|
||||
allocation = realloc(allocation_table[i], 1 + (rand() % max_allocation_size));
|
||||
if(allocation == NULL)
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
allocation_table[i] = allocation;
|
||||
}
|
||||
|
||||
__get_slab_stats(NULL, print_json);
|
||||
|
||||
printf("\n/* Freeing all unused slabs. */\n");
|
||||
|
||||
__free_unused_slabs();
|
||||
|
||||
__get_slab_stats(NULL, print_json);
|
||||
|
||||
return(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
#
|
||||
# $Id: smakefile,v 1.9 2006-01-02 13:11:39 obarthel Exp $
|
||||
#
|
||||
# :ts=8
|
||||
#
|
||||
|
||||
@ -10,6 +8,10 @@
|
||||
@echo "Compiling $<"
|
||||
@sc nover $(CFLAGS) $<
|
||||
|
||||
.c.mo:
|
||||
@echo "Compiling $<"
|
||||
@sc nover $(CFLAGS) objname=$*.mo math=IEEE $<
|
||||
|
||||
.asm.o:
|
||||
@echo "Assembling $<"
|
||||
@asm $(AFLAGS) $<
|
||||
@ -19,30 +21,31 @@
|
||||
# You might want to change this to the directory where your operating system
|
||||
# header files are stored. On my system, that's "V:include", but you might
|
||||
# get lucky with "sc:include" instead, which is the default for SAS/C.
|
||||
INCLUDE_DIR = V:include
|
||||
#INCLUDE_DIR = sc:include
|
||||
#INCLUDE_DIR = V:include
|
||||
INCLUDE_DIR = sc:include
|
||||
|
||||
##############################################################################
|
||||
|
||||
# This is where the header files, the startup code and the c.lib files are
|
||||
# stored; see below how this prefix is used.
|
||||
LIB = /library/
|
||||
LIB = /library
|
||||
|
||||
STARTUP = $(LIB)/startup.o
|
||||
LIBS = $(LIB)/amiga.lib $(LIB)/c.lib $(LIB)/debug.lib
|
||||
MATH_LIBS = $(LIB)/math.lib $(LIBS)
|
||||
|
||||
##############################################################################
|
||||
|
||||
OPTIMIZE = optimize opttime optschedule optinline
|
||||
#DEBUG = debug=line noopt define=CHECK_FOR_NULL_POINTERS
|
||||
#DEBUG = debug=line
|
||||
#DEBUG = debug=line define=NDEBUG
|
||||
DEBUG = debug=sf noopt
|
||||
DEBUG = debug=line define=NDEBUG
|
||||
#DEBUG = debug=sf noopt
|
||||
#DEBUG = debug=sf noopt define=CHECK_FOR_NULL_POINTERS
|
||||
#PROFILE = profile
|
||||
DATA = data=faronly
|
||||
#CODE = code=far
|
||||
CPU = cpu=060
|
||||
MATH = define=IEEE_FLOATING_POINT_SUPPORT math=IEEE
|
||||
SUPPORT = define=UNIX_PATH_SEMANTICS define=SOCKET_SUPPORT define=USERGROUP_SUPPORT \
|
||||
define=__C_MACROS__
|
||||
CPU = cpu=030
|
||||
|
||||
##############################################################################
|
||||
|
||||
@ -55,8 +58,9 @@ CFLAGS = \
|
||||
nostackcheck \
|
||||
stringmerge \
|
||||
errorrexx \
|
||||
$(PROFILE) $(OPTIMIZE) $(CODE) $(DATA) $(CPU) $(MATH) \
|
||||
$(SUPPORT) $(DEBUG)
|
||||
$(PROFILE) $(OPTIMIZE) $(CODE) $(DATA) $(CPU) $(DEBUG) \
|
||||
math=ieee \
|
||||
define=VERBOSE
|
||||
|
||||
AFLAGS = \
|
||||
-d -m2
|
||||
@ -68,19 +72,23 @@ all: \
|
||||
test fgets_test iotest sscanf_test printf_test sprintf_test \
|
||||
stack_size_test translate_test strtok_test uname simple \
|
||||
fstat_stdout_test simple_sprintf date_test factorial \
|
||||
execvp_test setlocale rand fstat_test base_dir_nametest \
|
||||
malloc-test slab-test \
|
||||
cleanup
|
||||
|
||||
clean:
|
||||
-delete \#?.o \#?.map \
|
||||
-delete \#?.o \#?.mo \#?.map \
|
||||
test fgets_test iotest sscanf_test printf_test sprintf_test \
|
||||
stack_size_test translate_test strtok_test uname simple \
|
||||
simple_sprintf date_test factorial
|
||||
fstat_stdout_test simple_sprintf date_test factorial \
|
||||
execvp_test setlocale rand fstat_test base_dir_nametest \
|
||||
malloc-test slab-test
|
||||
|
||||
##############################################################################
|
||||
|
||||
setup:
|
||||
@echo "Setting up include: assignment"
|
||||
@assign include: $(LIB)include V:include
|
||||
@assign include: $(LIB)/include $(INCLUDE_DIR)
|
||||
|
||||
cleanup:
|
||||
@echo "Cleaning up include: assignment"
|
||||
@ -90,77 +98,112 @@ cleanup:
|
||||
|
||||
test: test.o
|
||||
@echo "Linking $@"
|
||||
@slink $(LIB)startup.o test.o to $@ lib $(LIB)c.lib addsym \
|
||||
@slink $(STARTUP) $*.o to $@ lib $(LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
date_test: date_test.o
|
||||
@echo "Linking $@"
|
||||
@slink $(LIB)startup.o date_test.o to $@ lib $(LIB)c.lib addsym \
|
||||
@slink $(STARTUP) $*.o to $@ lib $(LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
fgets_test: fgets_test.o
|
||||
@echo "Linking $@"
|
||||
@slink $(LIB)startup.o fgets_test.o to $@ lib $(LIB)c.lib addsym \
|
||||
@slink $(STARTUP) $*.o to $@ lib $(LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
strtok_test: strtok_test.o
|
||||
@echo "Linking $@"
|
||||
@slink $(LIB)startup.o strtok_test.o to $@ lib $(LIB)c.lib addsym \
|
||||
@slink $(STARTUP) $*.o to $@ lib $(LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
iotest: iotest.o
|
||||
@echo "Linking $@"
|
||||
@slink $(LIB)startup.o iotest.o to $@ lib $(LIB)c.lib addsym \
|
||||
@slink $(STARTUP) $*.o to $@ lib $(LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
sscanf_test: sscanf_test.o
|
||||
sscanf_test: sscanf_test.mo
|
||||
@echo "Linking $@"
|
||||
@slink $(LIB)startup.o sscanf_test.o to $@ lib $(LIB)c.lib addsym \
|
||||
@slink $(STARTUP) $*.mo to $@ lib $(MATH_LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
printf_test: printf_test.o
|
||||
printf_test: printf_test.mo
|
||||
@echo "Linking $@"
|
||||
@slink $(LIB)startup.o printf_test.o to $@ lib $(LIB)c.lib addsym \
|
||||
@slink $(STARTUP) $*.mo to $@ lib $(MATH_LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
sprintf_test: sprintf_test.o
|
||||
@echo "Linking $@"
|
||||
@slink $(LIB)startup.o sprintf_test.o to $@ lib $(LIB)c.lib addsym \
|
||||
@slink $(STARTUP) $*.o to $@ lib $(LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
stack_size_test: stack_size_test.o
|
||||
@echo "Linking $@"
|
||||
@slink $(LIB)startup.o stack_size_test.o to $@ lib $(LIB)c.lib addsym \
|
||||
@slink $(STARTUP) $*.o to $@ lib $(LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
translate_test: translate_test.o
|
||||
@echo "Linking $@"
|
||||
@slink $(LIB)startup.o translate_test.o to $@ lib $(LIB)c.lib addsym \
|
||||
@slink $(STARTUP) $*.o to $@ lib $(LIB)/unix.lib $(LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
uname: uname.o
|
||||
@echo "Linking $@"
|
||||
@slink $(LIB)startup.o uname.o to $@ lib $(LIB)c.lib addsym \
|
||||
@slink $(STARTUP) $*.o to $@ lib $(LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
simple: simple.o
|
||||
@echo "Linking $@"
|
||||
@slink $(LIB)startup.o simple.o to $@ lib $(LIB)c.lib addsym \
|
||||
@slink $(STARTUP) $*.o to $@ lib $(LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
fstat_stdout_test: fstat_stdout_test.o
|
||||
@echo "Linking $@"
|
||||
@slink $(LIB)startup.o fstat_stdout_test.o to $@ lib $(LIB)c.lib addsym \
|
||||
@slink $(STARTUP) $*.o to $@ lib $(LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
simple_sprintf: simple_sprintf.o
|
||||
@echo "Linking $@"
|
||||
@slink simple_sprintf.o to $@ lib $(LIB)c.lib addsym \
|
||||
@slink $*.o to $@ lib $(LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
factorial: factorial.o
|
||||
factorial: factorial.mo
|
||||
@echo "Linking $@"
|
||||
@slink $(LIB)startup.o factorial.o to $@ lib $(LIB)c.lib addsym \
|
||||
@slink $(STARTUP) $*.mo to $@ lib $(MATH_LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
execvp_test: execvp_test.o
|
||||
@echo "Linking $@"
|
||||
@slink $(STARTUP) $*.o to $@ lib $(LIB)/unix.lib $(LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
setlocale: setlocale.o
|
||||
@echo "Linking $@"
|
||||
@slink $(STARTUP) $*.o to $@ lib $(LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
rand: rand.o
|
||||
@echo "Linking $@"
|
||||
@slink $(STARTUP) $*.o to $@ lib $(LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
fstat_test: fstat_test.o
|
||||
@echo "Linking $@"
|
||||
@slink $(STARTUP) $*.o to $@ lib $(LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
base_dir_nametest: base_dir_nametest.o
|
||||
@echo "Linking $@"
|
||||
@slink $(STARTUP) $*.o to $@ lib $(LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
malloc-test: malloc-test.mo
|
||||
@echo "Linking $@"
|
||||
@slink $(STARTUP) $*.mo to $@ lib $(MATH_LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
slab-test: slab-test.o
|
||||
@echo "Linking $@"
|
||||
@slink $(STARTUP) $*.o to $@ lib $(LIBS) addsym \
|
||||
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
|
||||
|
||||
##############################################################################
|
||||
|
||||
@ -77,6 +77,8 @@ main(int argc,char ** argv)
|
||||
long n,r;
|
||||
char time_buffer[100];
|
||||
|
||||
free(malloc(4));
|
||||
|
||||
for(i = 0 ; i < argc ; i++)
|
||||
printf("%2d) \"%s\"\n",i,argv[i]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user