From 3480ec40b30431a998be6508dafe1a1ef070bb87 Mon Sep 17 00:00:00 2001 From: Olaf Barthel Date: Sun, 16 Oct 2005 09:14:28 +0000 Subject: [PATCH] - Updated the build files so that atanh() and atanhf() are built for the respective math libraries. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15046 87f5fb63-7c3d-0410-a384-fd976d0f7a62 --- library/GNUmakefile.68k | 2528 ++++++++++++++++++++------------------- library/GNUmakefile.os4 | 2476 +++++++++++++++++++------------------- library/smakefile | 1930 +++++++++++++++--------------- 3 files changed, 3470 insertions(+), 3464 deletions(-) diff --git a/library/GNUmakefile.68k b/library/GNUmakefile.68k index 4a95038..f628241 100644 --- a/library/GNUmakefile.68k +++ b/library/GNUmakefile.68k @@ -1,1263 +1,1265 @@ -# -# $Id: GNUmakefile.68k,v 1.69 2005-10-11 11:24:53 obarthel Exp $ -# -# :ts=8 -# - -############################################################################## - -CC = gcc -AR = ar -q -RANLIB = ranlib -COPY = copy clone buf=0 -DELETE = delete all quiet -MAKEDIR = makedir -MAKE = $(MAKE_COMMAND) -f GNUmakefile.68k - -############################################################################## - -ifeq (,$(TYPE)) -LIBC_OBJS = libc_objs -LIBUNIX_OBJS = libunix_objs -LIBM_OBJS = libm_objs -LIBM881_OBJS = libm881_objs -LIBSTACK_OBJS = libstack_objs -LIBNET_OBJS = libnet_objs -LIBDEBUG_OBJS = libdebug_objs -LIBAMIGA_OBJS = libamiga_objs -else -LIBC_OBJS = $(TYPE)/libc_objs -LIBUNIX_OBJS = $(TYPE)/libunix_objs -LIBM_OBJS = $(TYPE)/libm_objs -LIBM881_OBJS = $(TYPE)/libm881_objs -LIBSTACK_OBJS = $(TYPE)/libstack_objs -LIBNET_OBJS = $(TYPE)/libnet_objs -LIBDEBUG_OBJS = $(TYPE)/libdebug_objs -LIBAMIGA_OBJS = $(TYPE)/libamiga_objs -endif - -############################################################################## - -.c.o: - @echo "Compiling $<" - @$(CC) -c $(CFLAGS) $< - -$(LIBC_OBJS)/%.o : %.c - @echo "Compiling $< [$(TYPE):c]" - @$(CC) -o $(LIBC_OBJS)/$*.o -c $(CFLAGS) $< - -$(LIBUNIX_OBJS)/%.o : %.c - @echo "Compiling $< [$(TYPE):unix]" - @$(CC) -o $(LIBUNIX_OBJS)/$*.o -c $(CFLAGS) -DUNIX_PATH_SEMANTICS $< - -$(LIBM_OBJS)/%.o : %.c - @echo "Compiling $< [$(TYPE):m]" - @$(CC) -o $(LIBM_OBJS)/$*.o -c $(CFLAGS) -DIEEE_FLOATING_POINT_SUPPORT $< - -$(LIBM881_OBJS)/%.o : %.c - @echo "Compiling $< [$(TYPE):m881]" - @$(CC) -o $(LIBM881_OBJS)/$*.o -c $(CFLAGS) -DM68881_FLOATING_POINT_SUPPORT -m68881 $< - -$(LIBSTACK_OBJS)/%.o : %.c - @echo "Compiling $< [$(TYPE):stack]" - @$(CC) -o $(LIBSTACK_OBJS)/$*.o -c $(CFLAGS) -DSTACK_EXTENSION $< - -$(LIBNET_OBJS)/%.o : %.c - @echo "Compiling $< [$(TYPE):net]" - @$(CC) -o $(LIBNET_OBJS)/$*.o -c $(CFLAGS) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT $< - -$(LIBDEBUG_OBJS)/%.o : %.c - @echo "Compiling $< [$(TYPE):debug]" - @$(CC) -o $(LIBDEBUG_OBJS)/$*.o -c $(CFLAGS) $< - -$(LIBAMIGA_OBJS)/%.o : %.c - @echo "Compiling $< [$(TYPE):amiga]" - @$(CC) -o $(LIBAMIGA_OBJS)/$*.o -c $(CFLAGS) $< - -############################################################################## - -ifeq (small_data_020,$(TYPE)) -CODE_TYPE := -m68020-60 -CODE_FLAGS := -fbaserel -DSMALL_DATA -DM68020 -DUSE_64_BIT_INTS -endif - -ifeq (small_data,$(TYPE)) -CODE_TYPE := -m68000 -CODE_FLAGS := -fbaserel -DSMALL_DATA -endif - -ifeq (small_data32,$(TYPE)) -CODE_TYPE := -m68020-60 -CODE_FLAGS := -fbaserel32 -DSMALL_DATA32 -DM68020 -DUSE_64_BIT_INTS -endif - -ifeq (large_data_020,$(TYPE)) -CODE_TYPE := -m68020-60 -CODE_FLAGS := -DM68020 -DUSE_64_BIT_INTS -endif - -ifeq (large_data,$(TYPE)) -CODE_TYPE := -m68000 -CODE_FLAGS := -endif - -############################################################################## - -WARNINGS = \ - -Wall -W -Wpointer-arith -Wsign-compare -Wmissing-prototypes \ - -Wundef -Wbad-function-cast -Wmissing-declarations -Wunused - -# -Wconversion -Wshadow - -INCLUDES = -Iinclude -I. -Inetinclude -#OPTIONS = -fno-builtin -fno-common -DDEBUG - OPTIONS = -fno-builtin -fno-common -DNDEBUG -#OPTIONS = -fno-builtin -fno-common -D__MEM_DEBUG -#OPTIONS = -fno-builtin -fno-common -DDEBUG -D__MEM_DEBUG -DNO_INLINE_STDARG - OPTIMIZE = -O -fomit-frame-pointer -fstrength-reduce -finline-functions -#OPTIMIZE = -O2 -fomit-frame-pointer -#DEBUG = -g - -CFLAGS = \ - $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) \ - $(CODE_FLAGS) $(CODE_TYPE) $(INCLUDES) - -############################################################################## - -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_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_mkdir.o \ - stat_rmdir.o \ - stat_stat.o \ - stat_umask.o \ - stdio_asprintf.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_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_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_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_getdefstacksize.o \ - stdlib_getenv.o \ - stdlib_getsp.o \ - stdlib_get_errno.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_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_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_srand.o \ - stdlib_stackargbytes.o \ - stdlib_stackcheck.o \ - stdlib_stackoverflow.o \ - stdlib_stacksafezone.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_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 \ - 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_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 - -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 \ - stat_chmod.o \ - stat_fstat.o \ - stat_lstat.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_arg.o \ - stdlib_main.o \ - stdlib_mkdtemp.o \ - stdlib_mkstemp.o \ - stdlib_mktemp.o \ - stdlib_system.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 \ - uio_readv.o \ - uio_writev.o \ - unistd_access.o \ - unistd_chdir.o \ - unistd_chdir_exit.o \ - unistd_chown.o \ - unistd_getcwd.o \ - unistd_lchown.o \ - unistd_link.o \ - unistd_readlink.o \ - unistd_realpath.o \ - unistd_restorepathname.o \ - unistd_setcurrentpath.o \ - unistd_strip_double_slash.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 \ - 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_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_floor.o \ - math_floorf.o \ - math_fma.o \ - math_fmaf.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_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 - -STACK_LIB = \ - stack.lib_rev.o \ - stdlib_setjmp.o \ - stdlib_stackextension.o \ - stdlib_stackminframe.o \ - stdlib_stackoverflow.o \ - stdlib_stacksafezone.o - -NET_LIB = \ - net.lib_rev.o \ - socket_accept.o \ - socket_bind.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_recv.o \ - socket_recvfrom.o \ - socket_recvmsg.o \ - socket_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 \ - 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 - -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 - -MEMDEBUG_LIB = \ - stdio_vasprintf_debug.o \ - stdio_vasprintf_debug.o \ - stdio_vasprintf_hook_entry_debug.o \ - stdlib_alloca_debug.o \ - stdlib_calloc_debug.o \ - stdlib_free_debug.o \ - stdlib_malloc_debug.o \ - string_strdup_debug.o \ - unistd_getcwd_debug.o - -############################################################################## - -LIBS_68K := $(LIBC_OBJS)/libc.a $(LIBSTACK_OBJS)/libstack.a $(LIBUNIX_OBJS)/libunix.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) - -############################################################################## - -# The 881 math library won't build in plain 68k mode -ifneq (,$(findstring 68020,$(CODE_FLAGS))) -LIBS := $(LIBS_020) -else -LIBS := $(LIBS_68K) -endif - -############################################################################## - -STARTUPS := nrcrt0.o nbcrt0.o nr32crt0.o nb32crt0.o ncrt0.o - -############################################################################## - -all: \ - lib/nrcrt0.o \ - lib/nbcrt0.o \ - lib/ncrt0.o \ - lib/n32bcrt0.o \ - lib/n32rcrt0.o \ - lib/libm020/libm.a \ - lib/libm.a \ - lib/libb/libm.a \ - lib/libb/libm020/libm.a \ - lib/libb32/libm020/libm.a - -############################################################################## - -clean: - -$(DELETE) $(TYPE) $(LIBS_020) $(STARTUPS) \ - $(LIBC_OBJS) $(LIBUNIX_OBJS) $(LIBM_OBJS) \ - $(LIBM881_OBJS) $(LIBSTACK_OBJS) $(LIBNET_OBJS) $(LIBDEBUG_OBJS) \ - $(LIBAMIGA_OBJS) - -realclean: - $(MAKE) clean - -$(DELETE) lib small_data_020 small_data small_data32 large_data_020 \ - large_data - -############################################################################## - -version: - copy clone c.lib_rev.rev amiga.lib_rev.rev - copy clone c.lib_rev.rev debug.lib_rev.rev - copy clone c.lib_rev.rev m.lib_rev.rev - copy clone c.lib_rev.rev m881.lib_rev.rev - copy clone c.lib_rev.rev net.lib_rev.rev - copy clone c.lib_rev.rev stack.lib_rev.rev - copy clone c.lib_rev.rev unix.lib_rev.rev - bumprev 1 amiga.lib - bumprev 1 c.lib - bumprev 1 debug.lib - bumprev 1 m.lib - bumprev 1 m881.lib - bumprev 1 net.lib - bumprev 1 stack.lib - bumprev 1 unix.lib - -############################################################################## - -cvs-tag: - cvs -q tag V1_`type c.lib_rev.rev` - -############################################################################## - -kitchen_sink: $(TYPE) $(LIBS) $(STARTUPS) - -############################################################################## - -ifneq (,$(TYPE)) -$(TYPE): - $(MAKEDIR) $@ -endif - -############################################################################## - -lib: - -$(MAKEDIR) $@ - -lib/libb : lib - -$(MAKEDIR) $@ - -lib/libb/libm020 : lib lib/libb - -$(MAKEDIR) $@ - -lib/libb32/libm020 : lib lib/libb32 - -$(MAKEDIR) $@ - -lib/libb32 : lib - -$(MAKEDIR) $@ - -lib/libm020 : lib - -$(MAKEDIR) $@ - -lib/libb/libm020/libm.a: lib lib/libb/libm020 - $(MAKE) TYPE=small_data_020 kitchen_sink - @$(COPY) $(foreach file,$(LIBS_020),small_data_020/$(file)) lib/libb/libm020 - -lib/libb/libm.a: lib lib/libb - $(MAKE) TYPE=small_data kitchen_sink - @$(COPY) $(foreach file,$(LIBS_68K),small_data/$(file)) lib/libb - -lib/libb32/libm020/libm.a: lib lib/libb32 lib/libb32/libm020 - $(MAKE) TYPE=small_data32 kitchen_sink - @$(COPY) $(foreach file,$(LIBS_020),small_data32/$(file)) lib/libb32/libm020 - -lib/libm020/libm.a: lib lib/libm020 - $(MAKE) TYPE=large_data_020 kitchen_sink - @$(COPY) $(foreach file,$(LIBS_020),large_data_020/$(file)) lib/libm020 - -lib/libm.a: lib - $(MAKE) TYPE=large_data kitchen_sink - @$(COPY) $(foreach file,$(LIBS_68K),large_data/$(file)) lib - -lib/nrcrt0.o : lib nrcrt0.o - @$(COPY) nrcrt0.o lib - -lib/nbcrt0.o : lib nbcrt0.o - @$(COPY) nbcrt0.o lib - -lib/ncrt0.o : lib ncrt0.o - @$(COPY) ncrt0.o lib - -lib/n32bcrt0.o : lib nb32crt0.o - @$(COPY) nb32crt0.o lib - -lib/n32rcrt0.o : lib nr32crt0.o - @$(COPY) nr32crt0.o lib - -############################################################################## - -$(LIBAMIGA_OBJS)/amiga_hookentry.o : amiga_hookentry.c - -$(LIBC_OBJS)/stdlib_getsp.o : stdlib_getsp.c - -$(LIBC_OBJS)/stdlib_swapstack.o : stdlib_swapstack.c - -$(LIBC_OBJS)/stdlib_setjmp.o : stdlib_setjmp.c - -$(LIBSTACK_OBJS)/stdlib_setjmp.o : stdlib_setjmp.c - -############################################################################## - -$(LIBC_OBJS)/c.lib_rev.o : c.lib_rev.c c.lib_rev.h - -$(LIBUNIX_OBJS)/unix.lib_rev.o : unix.lib_rev.c unix.lib_rev.h - -$(LIBM_OBJS)/m.lib_rev.o : m.lib_rev.c m.lib_rev.h - -$(LIBM881_OBJS)/m881.lib_rev.o : m881.lib_rev.c m881.lib_rev.h - -$(LIBSTACK_OBJS)/stack.lib_rev.o : stack.lib_rev.c stack.lib_rev.h - -$(LIBNET_OBJS)/net.lib_rev.o : net.lib_rev.c net.lib_rev.h - -$(LIBDEBUG_OBJS)/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h - -$(LIBAMIGA_OBJS)/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h - -############################################################################## - -$(LIBC_OBJS)/stdlib_stacksize.o : stdlib_stacksize.c stdlib_gcc_help.h - -$(LIBC_OBJS)/stdlib_getdefstacksize.o : stdlib_getdefstacksize.c stdlib_gcc_help.h - -$(LIBC_OBJS)/stdlib_shell_escape.o : stdlib_shell_escape.c stdlib_gcc_help.h - -$(LIBC_OBJS)/stdlib_alloca.o : stdlib_alloca.c stdlib_memory.h - -$(LIBC_OBJS)/stdlib_calloc.o : stdlib_calloc.c stdlib_memory.h - -$(LIBC_OBJS)/stdlib_free.o : stdlib_free.c stdlib_memory.h - -$(LIBC_OBJS)/stdlib_malloc.o : stdlib_malloc.c stdlib_memory.h - -$(LIBC_OBJS)/stdlib_realloc.o : stdlib_realloc.c stdlib_memory.h - -$(LIBC_OBJS)/stdlib_red_black.o : stdlib_red_black.c stdlib_memory.h - -############################################################################## - -# The -fbaserel32 option requires the CPU type to be 68020, too. -ifneq (,$(findstring fbaserel32,$(CODE_FLAGS))) -LOCAL_CODE_FLAGS := $(CODE_FLAGS) $(CODE_TYPE) -else -LOCAL_CODE_FLAGS := $(CODE_FLAGS) -endif - -$(LIBM881_OBJS)/math_init_exit.o : math_init_exit.c - @echo "Compiling $< [$(TYPE):m881]" - @$(CC) -o $(LIBM881_OBJS)/math_init_exit.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(LOCAL_CODE_FLAGS) -DM68881_FLOATING_POINT_SUPPORT $(INCLUDES) $< - -$(LIBC_OBJS)/stdlib_machine_test.o : stdlib_machine_test.c - @echo "Compiling $< [$(TYPE):c]" - @$(CC) -o $(LIBC_OBJS)/stdlib_machine_test.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(LOCAL_CODE_FLAGS) $(INCLUDES) $< - -$(LIBC_OBJS)/stdlib_showerror.o : stdlib_showerror.c - @echo "Compiling $< [$(TYPE):c]" - @$(CC) -o $(LIBC_OBJS)/stdlib_showerror.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(LOCAL_CODE_FLAGS) $(INCLUDES) $< - -$(LIBC_OBJS)/stdlib_main.o : stdlib_main.c - @echo "Compiling $< [$(TYPE):c]" - @$(CC) -o $(LIBC_OBJS)/stdlib_main.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(LOCAL_CODE_FLAGS) $(INCLUDES) stdlib_main.c - -############################################################################## - -$(LIBC_OBJS)/stdlib_alloca_debug.o : stdlib_alloca.c - @echo "Compiling $< [$(TYPE):c debug]" - @$(CC) -o $(LIBC_OBJS)/stdlib_alloca_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_alloca.c - -$(LIBC_OBJS)/stdlib_calloc_debug.o : stdlib_calloc.c - @echo "Compiling $< [$(TYPE):c debug]" - @$(CC) -o $(LIBC_OBJS)/stdlib_calloc_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_calloc.c - -$(LIBC_OBJS)/stdlib_free_debug.o : stdlib_free.c - @echo "Compiling $< [$(TYPE):c debug]" - @$(CC) -o $(LIBC_OBJS)/stdlib_free_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_free.c - -$(LIBC_OBJS)/stdlib_malloc_debug.o : stdlib_malloc.c - @echo "Compiling $< [$(TYPE):c debug]" - @$(CC) -o $(LIBC_OBJS)/stdlib_malloc_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_malloc.c - -$(LIBC_OBJS)/stdlib_realloc_debug.o : stdlib_realloc.c - @echo "Compiling $< [$(TYPE):c debug]" - @$(CC) -o $(LIBC_OBJS)/stdlib_realloc_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_realloc.c - -$(LIBC_OBJS)/stdio_vasprintf_hook_entry_debug.o : stdio_vasprintf_hook_entry.c - @echo "Compiling $< [$(TYPE):c debug]" - @$(CC) -o $(LIBC_OBJS)/stdio_vasprintf_hook_entry_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdio_vasprintf_hook_entry.c - -$(LIBC_OBJS)/stdio_vasprintf_debug.o : stdio_vasprintf.c - @echo "Compiling $< [$(TYPE):c debug]" - @$(CC) -o $(LIBC_OBJS)/stdio_vasprintf_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdio_vasprintf.c - -$(LIBM_OBJS)/stdio_vasprintf_debug.o : stdio_vasprintf.c - @echo "Compiling $< [$(TYPE):m debug]" - @$(CC) -o $(LIBM_OBJS)/stdio_vasprintf_debug.o -c $(CFLAGS) -DIEEE_FLOATING_POINT_SUPPORT -D__USE_MEM_TREES -D__MEM_DEBUG stdio_vasprintf.c - -$(LIBC_OBJS)/string_strdup_debug.o : string_strdup.c - @echo "Compiling $< [$(TYPE):c debug]" - @$(CC) -o $(LIBC_OBJS)/string_strdup_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG string_strdup.c - -$(LIBC_OBJS)/unistd_getcwd_debug.o : unistd_getcwd.c - @echo "Compiling $< [$(TYPE):c debug]" - @$(CC) -o $(LIBC_OBJS)/unistd_getcwd_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG unistd_getcwd.c - -$(LIBUNIX_OBJS)/unistd_getcwd_debug.o : unistd_getcwd.c - @echo "Compiling $< [$(TYPE):unix debug]" - @$(CC) -o $(LIBUNIX_OBJS)/unistd_getcwd_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG -DUNIX_PATH_SEMANTICS unistd_getcwd.c - -############################################################################## - -$(LIBC_OBJS) : - $(MAKEDIR) $@ - -$(LIBC_OBJS)/libc.a : $(LIBC_OBJS) $(foreach file,$(C_LIB),$(LIBC_OBJS)/$(file)) - -$(DELETE) $@ - @$(AR) $@ $(foreach file,$(C_LIB),$(LIBC_OBJS)/$(file)) - $(RANLIB) $@ - -############################################################################## - -$(LIBUNIX_OBJS) : - $(MAKEDIR) $@ - -$(LIBUNIX_OBJS)/libunix.a : $(LIBUNIX_OBJS) $(foreach file,$(UNIX_LIB),$(LIBUNIX_OBJS)/$(file)) - -$(DELETE) $@ - @$(AR) $@ $(foreach file,$(UNIX_LIB),$(LIBUNIX_OBJS)/$(file)) - $(RANLIB) $@ - -############################################################################## - -$(LIBM_OBJS) : - $(MAKEDIR) $@ - -$(LIBM_OBJS)/libm.a : $(LIBM_OBJS) $(foreach file,$(MATH_LIB_IEEE),$(LIBM_OBJS)/$(file)) - -$(DELETE) $@ - @$(AR) $@ $(foreach file,$(MATH_LIB_IEEE),$(LIBM_OBJS)/$(file)) - $(RANLIB) $@ - -############################################################################## - -$(LIBM881_OBJS) : - $(MAKEDIR) $@ - -$(LIBM881_OBJS)/libm881.a : $(LIBM881_OBJS) $(foreach file,$(MATH_LIB_881),$(LIBM881_OBJS)/$(file)) - -$(DELETE) $@ - @$(AR) $@ $(foreach file,$(MATH_LIB_881),$(LIBM881_OBJS)/$(file)) - $(RANLIB) $@ - -############################################################################## - -$(LIBSTACK_OBJS) : - $(MAKEDIR) $@ - -$(LIBSTACK_OBJS)/libstack.a : $(LIBSTACK_OBJS) $(foreach file,$(STACK_LIB),$(LIBSTACK_OBJS)/$(file)) - -$(DELETE) $@ - @$(AR) $@ $(foreach file,$(STACK_LIB),$(LIBSTACK_OBJS)/$(file)) - $(RANLIB) $@ - -############################################################################## - -$(LIBNET_OBJS) : - $(MAKEDIR) $@ - -$(LIBNET_OBJS)/libnet.a : $(LIBNET_OBJS) $(foreach file,$(NET_LIB),$(LIBNET_OBJS)/$(file)) - -$(DELETE) $@ - @$(AR) $@ $(foreach file,$(NET_LIB),$(LIBNET_OBJS)/$(file)) - $(RANLIB) $@ - -############################################################################## - -$(LIBDEBUG_OBJS) : - $(MAKEDIR) $@ - -$(LIBDEBUG_OBJS)/libdebug.a : $(LIBDEBUG_OBJS) $(foreach file,$(DEBUG_LIB),$(LIBDEBUG_OBJS)/$(file)) - -$(DELETE) $@ - @$(AR) $@ $(foreach file,$(DEBUG_LIB),$(LIBDEBUG_OBJS)/$(file)) - $(RANLIB) $@ - -############################################################################## - -$(LIBAMIGA_OBJS) : - $(MAKEDIR) $@ - -$(LIBAMIGA_OBJS)/libamiga.a : $(LIBAMIGA_OBJS) $(foreach file,$(AMIGA_LIB),$(LIBAMIGA_OBJS)/$(file)) - -$(DELETE) $@ - @$(AR) $@ $(foreach file,$(AMIGA_LIB),$(LIBAMIGA_OBJS)/$(file)) - $(RANLIB) $@ - -############################################################################## - -nrcrt0.o : nrcrt0.S - @echo "Assembling $< [resident]" - @$(CC) -traditional -o $@ -c nrcrt0.S - -nr32crt0.o : nrcrt0.S - @echo "Assembling $< [resident32]" - @$(CC) -traditional -m68020 -DSMALL_DATA32 -o $@ -c nrcrt0.S - -nbcrt0.o : ncrt0.S - @echo "Assembling $< [small_data]" - @$(CC) -traditional -DSMALL_DATA -o $@ -c ncrt0.S - -nb32crt0.o : ncrt0.S - @echo "Assembling $< [small_data32]" - @$(CC) -traditional -m68020 -DSMALL_DATA32 -o $@ -c ncrt0.S - -ncrt0.o : ncrt0.S - @echo "Assembling $< [large_data]" - @$(CC) -traditional -o $@ -c ncrt0.S - -############################################################################## - -CONSTRUCTOR_FILES = \ - amiga_rexxvars.c \ - dirent_closedir.c \ - locale_init_exit.c \ - math_init_exit.c \ - sas_profile.c \ - socket_init_exit.c \ - stdio_file_init.c \ - stdio_init_exit.c \ - stdlib_alloca.c \ - stdlib_arg.c \ - stdlib_malloc.c \ - stdlib_program_name.c \ - stdlib_setenv.c \ - stdlib_stackcheck.c \ - stdlib_stackextension.c \ - time_clock.c \ - unistd_chdir_exit.c \ - unistd_init_exit.c \ - unistd_timer.c \ - unistd_wildcard_expand.c \ - usergroup_init_exit.c - -touch_constructor_files: - touch $(CONSTRUCTOR_FILES) +# +# $Id: GNUmakefile.68k,v 1.70 2005-10-16 09:14:28 obarthel Exp $ +# +# :ts=8 +# + +############################################################################## + +CC = gcc +AR = ar -q +RANLIB = ranlib +COPY = copy clone buf=0 +DELETE = delete all quiet +MAKEDIR = makedir +MAKE = $(MAKE_COMMAND) -f GNUmakefile.68k + +############################################################################## + +ifeq (,$(TYPE)) +LIBC_OBJS = libc_objs +LIBUNIX_OBJS = libunix_objs +LIBM_OBJS = libm_objs +LIBM881_OBJS = libm881_objs +LIBSTACK_OBJS = libstack_objs +LIBNET_OBJS = libnet_objs +LIBDEBUG_OBJS = libdebug_objs +LIBAMIGA_OBJS = libamiga_objs +else +LIBC_OBJS = $(TYPE)/libc_objs +LIBUNIX_OBJS = $(TYPE)/libunix_objs +LIBM_OBJS = $(TYPE)/libm_objs +LIBM881_OBJS = $(TYPE)/libm881_objs +LIBSTACK_OBJS = $(TYPE)/libstack_objs +LIBNET_OBJS = $(TYPE)/libnet_objs +LIBDEBUG_OBJS = $(TYPE)/libdebug_objs +LIBAMIGA_OBJS = $(TYPE)/libamiga_objs +endif + +############################################################################## + +.c.o: + @echo "Compiling $<" + @$(CC) -c $(CFLAGS) $< + +$(LIBC_OBJS)/%.o : %.c + @echo "Compiling $< [$(TYPE):c]" + @$(CC) -o $(LIBC_OBJS)/$*.o -c $(CFLAGS) $< + +$(LIBUNIX_OBJS)/%.o : %.c + @echo "Compiling $< [$(TYPE):unix]" + @$(CC) -o $(LIBUNIX_OBJS)/$*.o -c $(CFLAGS) -DUNIX_PATH_SEMANTICS $< + +$(LIBM_OBJS)/%.o : %.c + @echo "Compiling $< [$(TYPE):m]" + @$(CC) -o $(LIBM_OBJS)/$*.o -c $(CFLAGS) -DIEEE_FLOATING_POINT_SUPPORT $< + +$(LIBM881_OBJS)/%.o : %.c + @echo "Compiling $< [$(TYPE):m881]" + @$(CC) -o $(LIBM881_OBJS)/$*.o -c $(CFLAGS) -DM68881_FLOATING_POINT_SUPPORT -m68881 $< + +$(LIBSTACK_OBJS)/%.o : %.c + @echo "Compiling $< [$(TYPE):stack]" + @$(CC) -o $(LIBSTACK_OBJS)/$*.o -c $(CFLAGS) -DSTACK_EXTENSION $< + +$(LIBNET_OBJS)/%.o : %.c + @echo "Compiling $< [$(TYPE):net]" + @$(CC) -o $(LIBNET_OBJS)/$*.o -c $(CFLAGS) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT $< + +$(LIBDEBUG_OBJS)/%.o : %.c + @echo "Compiling $< [$(TYPE):debug]" + @$(CC) -o $(LIBDEBUG_OBJS)/$*.o -c $(CFLAGS) $< + +$(LIBAMIGA_OBJS)/%.o : %.c + @echo "Compiling $< [$(TYPE):amiga]" + @$(CC) -o $(LIBAMIGA_OBJS)/$*.o -c $(CFLAGS) $< + +############################################################################## + +ifeq (small_data_020,$(TYPE)) +CODE_TYPE := -m68020-60 +CODE_FLAGS := -fbaserel -DSMALL_DATA -DM68020 -DUSE_64_BIT_INTS +endif + +ifeq (small_data,$(TYPE)) +CODE_TYPE := -m68000 +CODE_FLAGS := -fbaserel -DSMALL_DATA +endif + +ifeq (small_data32,$(TYPE)) +CODE_TYPE := -m68020-60 +CODE_FLAGS := -fbaserel32 -DSMALL_DATA32 -DM68020 -DUSE_64_BIT_INTS +endif + +ifeq (large_data_020,$(TYPE)) +CODE_TYPE := -m68020-60 +CODE_FLAGS := -DM68020 -DUSE_64_BIT_INTS +endif + +ifeq (large_data,$(TYPE)) +CODE_TYPE := -m68000 +CODE_FLAGS := +endif + +############################################################################## + +WARNINGS = \ + -Wall -W -Wpointer-arith -Wsign-compare -Wmissing-prototypes \ + -Wundef -Wbad-function-cast -Wmissing-declarations -Wunused + +# -Wconversion -Wshadow + +INCLUDES = -Iinclude -I. -Inetinclude +#OPTIONS = -fno-builtin -fno-common -DDEBUG + OPTIONS = -fno-builtin -fno-common -DNDEBUG +#OPTIONS = -fno-builtin -fno-common -D__MEM_DEBUG +#OPTIONS = -fno-builtin -fno-common -DDEBUG -D__MEM_DEBUG -DNO_INLINE_STDARG + OPTIMIZE = -O -fomit-frame-pointer -fstrength-reduce -finline-functions +#OPTIMIZE = -O2 -fomit-frame-pointer +#DEBUG = -g + +CFLAGS = \ + $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) \ + $(CODE_FLAGS) $(CODE_TYPE) $(INCLUDES) + +############################################################################## + +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_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_mkdir.o \ + stat_rmdir.o \ + stat_stat.o \ + stat_umask.o \ + stdio_asprintf.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_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_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_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_getdefstacksize.o \ + stdlib_getenv.o \ + stdlib_getsp.o \ + stdlib_get_errno.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_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_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_srand.o \ + stdlib_stackargbytes.o \ + stdlib_stackcheck.o \ + stdlib_stackoverflow.o \ + stdlib_stacksafezone.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_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 \ + 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_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 + +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 \ + stat_chmod.o \ + stat_fstat.o \ + stat_lstat.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_arg.o \ + stdlib_main.o \ + stdlib_mkdtemp.o \ + stdlib_mkstemp.o \ + stdlib_mktemp.o \ + stdlib_system.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 \ + uio_readv.o \ + uio_writev.o \ + unistd_access.o \ + unistd_chdir.o \ + unistd_chdir_exit.o \ + unistd_chown.o \ + unistd_getcwd.o \ + unistd_lchown.o \ + unistd_link.o \ + unistd_readlink.o \ + unistd_realpath.o \ + unistd_restorepathname.o \ + unistd_setcurrentpath.o \ + unistd_strip_double_slash.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 \ + 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_floor.o \ + math_floorf.o \ + math_fma.o \ + math_fmaf.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_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 + +STACK_LIB = \ + stack.lib_rev.o \ + stdlib_setjmp.o \ + stdlib_stackextension.o \ + stdlib_stackminframe.o \ + stdlib_stackoverflow.o \ + stdlib_stacksafezone.o + +NET_LIB = \ + net.lib_rev.o \ + socket_accept.o \ + socket_bind.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_recv.o \ + socket_recvfrom.o \ + socket_recvmsg.o \ + socket_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 \ + 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 + +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 + +MEMDEBUG_LIB = \ + stdio_vasprintf_debug.o \ + stdio_vasprintf_debug.o \ + stdio_vasprintf_hook_entry_debug.o \ + stdlib_alloca_debug.o \ + stdlib_calloc_debug.o \ + stdlib_free_debug.o \ + stdlib_malloc_debug.o \ + string_strdup_debug.o \ + unistd_getcwd_debug.o + +############################################################################## + +LIBS_68K := $(LIBC_OBJS)/libc.a $(LIBSTACK_OBJS)/libstack.a $(LIBUNIX_OBJS)/libunix.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) + +############################################################################## + +# The 881 math library won't build in plain 68k mode +ifneq (,$(findstring 68020,$(CODE_FLAGS))) +LIBS := $(LIBS_020) +else +LIBS := $(LIBS_68K) +endif + +############################################################################## + +STARTUPS := nrcrt0.o nbcrt0.o nr32crt0.o nb32crt0.o ncrt0.o + +############################################################################## + +all: \ + lib/nrcrt0.o \ + lib/nbcrt0.o \ + lib/ncrt0.o \ + lib/n32bcrt0.o \ + lib/n32rcrt0.o \ + lib/libm020/libm.a \ + lib/libm.a \ + lib/libb/libm.a \ + lib/libb/libm020/libm.a \ + lib/libb32/libm020/libm.a + +############################################################################## + +clean: + -$(DELETE) $(TYPE) $(LIBS_020) $(STARTUPS) \ + $(LIBC_OBJS) $(LIBUNIX_OBJS) $(LIBM_OBJS) \ + $(LIBM881_OBJS) $(LIBSTACK_OBJS) $(LIBNET_OBJS) $(LIBDEBUG_OBJS) \ + $(LIBAMIGA_OBJS) + +realclean: + $(MAKE) clean + -$(DELETE) lib small_data_020 small_data small_data32 large_data_020 \ + large_data + +############################################################################## + +version: + copy clone c.lib_rev.rev amiga.lib_rev.rev + copy clone c.lib_rev.rev debug.lib_rev.rev + copy clone c.lib_rev.rev m.lib_rev.rev + copy clone c.lib_rev.rev m881.lib_rev.rev + copy clone c.lib_rev.rev net.lib_rev.rev + copy clone c.lib_rev.rev stack.lib_rev.rev + copy clone c.lib_rev.rev unix.lib_rev.rev + bumprev 1 amiga.lib + bumprev 1 c.lib + bumprev 1 debug.lib + bumprev 1 m.lib + bumprev 1 m881.lib + bumprev 1 net.lib + bumprev 1 stack.lib + bumprev 1 unix.lib + +############################################################################## + +cvs-tag: + cvs -q tag V1_`type c.lib_rev.rev` + +############################################################################## + +kitchen_sink: $(TYPE) $(LIBS) $(STARTUPS) + +############################################################################## + +ifneq (,$(TYPE)) +$(TYPE): + $(MAKEDIR) $@ +endif + +############################################################################## + +lib: + -$(MAKEDIR) $@ + +lib/libb : lib + -$(MAKEDIR) $@ + +lib/libb/libm020 : lib lib/libb + -$(MAKEDIR) $@ + +lib/libb32/libm020 : lib lib/libb32 + -$(MAKEDIR) $@ + +lib/libb32 : lib + -$(MAKEDIR) $@ + +lib/libm020 : lib + -$(MAKEDIR) $@ + +lib/libb/libm020/libm.a: lib lib/libb/libm020 + $(MAKE) TYPE=small_data_020 kitchen_sink + @$(COPY) $(foreach file,$(LIBS_020),small_data_020/$(file)) lib/libb/libm020 + +lib/libb/libm.a: lib lib/libb + $(MAKE) TYPE=small_data kitchen_sink + @$(COPY) $(foreach file,$(LIBS_68K),small_data/$(file)) lib/libb + +lib/libb32/libm020/libm.a: lib lib/libb32 lib/libb32/libm020 + $(MAKE) TYPE=small_data32 kitchen_sink + @$(COPY) $(foreach file,$(LIBS_020),small_data32/$(file)) lib/libb32/libm020 + +lib/libm020/libm.a: lib lib/libm020 + $(MAKE) TYPE=large_data_020 kitchen_sink + @$(COPY) $(foreach file,$(LIBS_020),large_data_020/$(file)) lib/libm020 + +lib/libm.a: lib + $(MAKE) TYPE=large_data kitchen_sink + @$(COPY) $(foreach file,$(LIBS_68K),large_data/$(file)) lib + +lib/nrcrt0.o : lib nrcrt0.o + @$(COPY) nrcrt0.o lib + +lib/nbcrt0.o : lib nbcrt0.o + @$(COPY) nbcrt0.o lib + +lib/ncrt0.o : lib ncrt0.o + @$(COPY) ncrt0.o lib + +lib/n32bcrt0.o : lib nb32crt0.o + @$(COPY) nb32crt0.o lib + +lib/n32rcrt0.o : lib nr32crt0.o + @$(COPY) nr32crt0.o lib + +############################################################################## + +$(LIBAMIGA_OBJS)/amiga_hookentry.o : amiga_hookentry.c + +$(LIBC_OBJS)/stdlib_getsp.o : stdlib_getsp.c + +$(LIBC_OBJS)/stdlib_swapstack.o : stdlib_swapstack.c + +$(LIBC_OBJS)/stdlib_setjmp.o : stdlib_setjmp.c + +$(LIBSTACK_OBJS)/stdlib_setjmp.o : stdlib_setjmp.c + +############################################################################## + +$(LIBC_OBJS)/c.lib_rev.o : c.lib_rev.c c.lib_rev.h + +$(LIBUNIX_OBJS)/unix.lib_rev.o : unix.lib_rev.c unix.lib_rev.h + +$(LIBM_OBJS)/m.lib_rev.o : m.lib_rev.c m.lib_rev.h + +$(LIBM881_OBJS)/m881.lib_rev.o : m881.lib_rev.c m881.lib_rev.h + +$(LIBSTACK_OBJS)/stack.lib_rev.o : stack.lib_rev.c stack.lib_rev.h + +$(LIBNET_OBJS)/net.lib_rev.o : net.lib_rev.c net.lib_rev.h + +$(LIBDEBUG_OBJS)/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h + +$(LIBAMIGA_OBJS)/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h + +############################################################################## + +$(LIBC_OBJS)/stdlib_stacksize.o : stdlib_stacksize.c stdlib_gcc_help.h + +$(LIBC_OBJS)/stdlib_getdefstacksize.o : stdlib_getdefstacksize.c stdlib_gcc_help.h + +$(LIBC_OBJS)/stdlib_shell_escape.o : stdlib_shell_escape.c stdlib_gcc_help.h + +$(LIBC_OBJS)/stdlib_alloca.o : stdlib_alloca.c stdlib_memory.h + +$(LIBC_OBJS)/stdlib_calloc.o : stdlib_calloc.c stdlib_memory.h + +$(LIBC_OBJS)/stdlib_free.o : stdlib_free.c stdlib_memory.h + +$(LIBC_OBJS)/stdlib_malloc.o : stdlib_malloc.c stdlib_memory.h + +$(LIBC_OBJS)/stdlib_realloc.o : stdlib_realloc.c stdlib_memory.h + +$(LIBC_OBJS)/stdlib_red_black.o : stdlib_red_black.c stdlib_memory.h + +############################################################################## + +# The -fbaserel32 option requires the CPU type to be 68020, too. +ifneq (,$(findstring fbaserel32,$(CODE_FLAGS))) +LOCAL_CODE_FLAGS := $(CODE_FLAGS) $(CODE_TYPE) +else +LOCAL_CODE_FLAGS := $(CODE_FLAGS) +endif + +$(LIBM881_OBJS)/math_init_exit.o : math_init_exit.c + @echo "Compiling $< [$(TYPE):m881]" + @$(CC) -o $(LIBM881_OBJS)/math_init_exit.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(LOCAL_CODE_FLAGS) -DM68881_FLOATING_POINT_SUPPORT $(INCLUDES) $< + +$(LIBC_OBJS)/stdlib_machine_test.o : stdlib_machine_test.c + @echo "Compiling $< [$(TYPE):c]" + @$(CC) -o $(LIBC_OBJS)/stdlib_machine_test.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(LOCAL_CODE_FLAGS) $(INCLUDES) $< + +$(LIBC_OBJS)/stdlib_showerror.o : stdlib_showerror.c + @echo "Compiling $< [$(TYPE):c]" + @$(CC) -o $(LIBC_OBJS)/stdlib_showerror.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(LOCAL_CODE_FLAGS) $(INCLUDES) $< + +$(LIBC_OBJS)/stdlib_main.o : stdlib_main.c + @echo "Compiling $< [$(TYPE):c]" + @$(CC) -o $(LIBC_OBJS)/stdlib_main.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(LOCAL_CODE_FLAGS) $(INCLUDES) stdlib_main.c + +############################################################################## + +$(LIBC_OBJS)/stdlib_alloca_debug.o : stdlib_alloca.c + @echo "Compiling $< [$(TYPE):c debug]" + @$(CC) -o $(LIBC_OBJS)/stdlib_alloca_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_alloca.c + +$(LIBC_OBJS)/stdlib_calloc_debug.o : stdlib_calloc.c + @echo "Compiling $< [$(TYPE):c debug]" + @$(CC) -o $(LIBC_OBJS)/stdlib_calloc_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_calloc.c + +$(LIBC_OBJS)/stdlib_free_debug.o : stdlib_free.c + @echo "Compiling $< [$(TYPE):c debug]" + @$(CC) -o $(LIBC_OBJS)/stdlib_free_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_free.c + +$(LIBC_OBJS)/stdlib_malloc_debug.o : stdlib_malloc.c + @echo "Compiling $< [$(TYPE):c debug]" + @$(CC) -o $(LIBC_OBJS)/stdlib_malloc_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_malloc.c + +$(LIBC_OBJS)/stdlib_realloc_debug.o : stdlib_realloc.c + @echo "Compiling $< [$(TYPE):c debug]" + @$(CC) -o $(LIBC_OBJS)/stdlib_realloc_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_realloc.c + +$(LIBC_OBJS)/stdio_vasprintf_hook_entry_debug.o : stdio_vasprintf_hook_entry.c + @echo "Compiling $< [$(TYPE):c debug]" + @$(CC) -o $(LIBC_OBJS)/stdio_vasprintf_hook_entry_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdio_vasprintf_hook_entry.c + +$(LIBC_OBJS)/stdio_vasprintf_debug.o : stdio_vasprintf.c + @echo "Compiling $< [$(TYPE):c debug]" + @$(CC) -o $(LIBC_OBJS)/stdio_vasprintf_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdio_vasprintf.c + +$(LIBM_OBJS)/stdio_vasprintf_debug.o : stdio_vasprintf.c + @echo "Compiling $< [$(TYPE):m debug]" + @$(CC) -o $(LIBM_OBJS)/stdio_vasprintf_debug.o -c $(CFLAGS) -DIEEE_FLOATING_POINT_SUPPORT -D__USE_MEM_TREES -D__MEM_DEBUG stdio_vasprintf.c + +$(LIBC_OBJS)/string_strdup_debug.o : string_strdup.c + @echo "Compiling $< [$(TYPE):c debug]" + @$(CC) -o $(LIBC_OBJS)/string_strdup_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG string_strdup.c + +$(LIBC_OBJS)/unistd_getcwd_debug.o : unistd_getcwd.c + @echo "Compiling $< [$(TYPE):c debug]" + @$(CC) -o $(LIBC_OBJS)/unistd_getcwd_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG unistd_getcwd.c + +$(LIBUNIX_OBJS)/unistd_getcwd_debug.o : unistd_getcwd.c + @echo "Compiling $< [$(TYPE):unix debug]" + @$(CC) -o $(LIBUNIX_OBJS)/unistd_getcwd_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG -DUNIX_PATH_SEMANTICS unistd_getcwd.c + +############################################################################## + +$(LIBC_OBJS) : + $(MAKEDIR) $@ + +$(LIBC_OBJS)/libc.a : $(LIBC_OBJS) $(foreach file,$(C_LIB),$(LIBC_OBJS)/$(file)) + -$(DELETE) $@ + @$(AR) $@ $(foreach file,$(C_LIB),$(LIBC_OBJS)/$(file)) + $(RANLIB) $@ + +############################################################################## + +$(LIBUNIX_OBJS) : + $(MAKEDIR) $@ + +$(LIBUNIX_OBJS)/libunix.a : $(LIBUNIX_OBJS) $(foreach file,$(UNIX_LIB),$(LIBUNIX_OBJS)/$(file)) + -$(DELETE) $@ + @$(AR) $@ $(foreach file,$(UNIX_LIB),$(LIBUNIX_OBJS)/$(file)) + $(RANLIB) $@ + +############################################################################## + +$(LIBM_OBJS) : + $(MAKEDIR) $@ + +$(LIBM_OBJS)/libm.a : $(LIBM_OBJS) $(foreach file,$(MATH_LIB_IEEE),$(LIBM_OBJS)/$(file)) + -$(DELETE) $@ + @$(AR) $@ $(foreach file,$(MATH_LIB_IEEE),$(LIBM_OBJS)/$(file)) + $(RANLIB) $@ + +############################################################################## + +$(LIBM881_OBJS) : + $(MAKEDIR) $@ + +$(LIBM881_OBJS)/libm881.a : $(LIBM881_OBJS) $(foreach file,$(MATH_LIB_881),$(LIBM881_OBJS)/$(file)) + -$(DELETE) $@ + @$(AR) $@ $(foreach file,$(MATH_LIB_881),$(LIBM881_OBJS)/$(file)) + $(RANLIB) $@ + +############################################################################## + +$(LIBSTACK_OBJS) : + $(MAKEDIR) $@ + +$(LIBSTACK_OBJS)/libstack.a : $(LIBSTACK_OBJS) $(foreach file,$(STACK_LIB),$(LIBSTACK_OBJS)/$(file)) + -$(DELETE) $@ + @$(AR) $@ $(foreach file,$(STACK_LIB),$(LIBSTACK_OBJS)/$(file)) + $(RANLIB) $@ + +############################################################################## + +$(LIBNET_OBJS) : + $(MAKEDIR) $@ + +$(LIBNET_OBJS)/libnet.a : $(LIBNET_OBJS) $(foreach file,$(NET_LIB),$(LIBNET_OBJS)/$(file)) + -$(DELETE) $@ + @$(AR) $@ $(foreach file,$(NET_LIB),$(LIBNET_OBJS)/$(file)) + $(RANLIB) $@ + +############################################################################## + +$(LIBDEBUG_OBJS) : + $(MAKEDIR) $@ + +$(LIBDEBUG_OBJS)/libdebug.a : $(LIBDEBUG_OBJS) $(foreach file,$(DEBUG_LIB),$(LIBDEBUG_OBJS)/$(file)) + -$(DELETE) $@ + @$(AR) $@ $(foreach file,$(DEBUG_LIB),$(LIBDEBUG_OBJS)/$(file)) + $(RANLIB) $@ + +############################################################################## + +$(LIBAMIGA_OBJS) : + $(MAKEDIR) $@ + +$(LIBAMIGA_OBJS)/libamiga.a : $(LIBAMIGA_OBJS) $(foreach file,$(AMIGA_LIB),$(LIBAMIGA_OBJS)/$(file)) + -$(DELETE) $@ + @$(AR) $@ $(foreach file,$(AMIGA_LIB),$(LIBAMIGA_OBJS)/$(file)) + $(RANLIB) $@ + +############################################################################## + +nrcrt0.o : nrcrt0.S + @echo "Assembling $< [resident]" + @$(CC) -traditional -o $@ -c nrcrt0.S + +nr32crt0.o : nrcrt0.S + @echo "Assembling $< [resident32]" + @$(CC) -traditional -m68020 -DSMALL_DATA32 -o $@ -c nrcrt0.S + +nbcrt0.o : ncrt0.S + @echo "Assembling $< [small_data]" + @$(CC) -traditional -DSMALL_DATA -o $@ -c ncrt0.S + +nb32crt0.o : ncrt0.S + @echo "Assembling $< [small_data32]" + @$(CC) -traditional -m68020 -DSMALL_DATA32 -o $@ -c ncrt0.S + +ncrt0.o : ncrt0.S + @echo "Assembling $< [large_data]" + @$(CC) -traditional -o $@ -c ncrt0.S + +############################################################################## + +CONSTRUCTOR_FILES = \ + amiga_rexxvars.c \ + dirent_closedir.c \ + locale_init_exit.c \ + math_init_exit.c \ + sas_profile.c \ + socket_init_exit.c \ + stdio_file_init.c \ + stdio_init_exit.c \ + stdlib_alloca.c \ + stdlib_arg.c \ + stdlib_malloc.c \ + stdlib_program_name.c \ + stdlib_setenv.c \ + stdlib_stackcheck.c \ + stdlib_stackextension.c \ + time_clock.c \ + unistd_chdir_exit.c \ + unistd_init_exit.c \ + unistd_timer.c \ + unistd_wildcard_expand.c \ + usergroup_init_exit.c + +touch_constructor_files: + touch $(CONSTRUCTOR_FILES) diff --git a/library/GNUmakefile.os4 b/library/GNUmakefile.os4 index 1e37fc6..b14a8f9 100644 --- a/library/GNUmakefile.os4 +++ b/library/GNUmakefile.os4 @@ -1,1237 +1,1239 @@ -# -# $Id: GNUmakefile.os4,v 1.78 2005-10-11 11:24:53 obarthel Exp $ -# -# :ts=8 -# -# -*- mode: makefile; -*- - -############################################################################## - -# You may have to tweak this for the native OS4 compiler -SDK_INCLUDE = $(V)/include -NET_INCLUDE = netinclude - -# These are for the cross compiler -CC = ppc-amigaos-gcc -AR = ppc-amigaos-ar -q -RANLIB = ppc-amigaos-ranlib -COPY = cp -a -DELETE = rm -rf -MAKEDIR = mkdir - -# The following are for the native OS4 compiler -# CC = gcc -# AR = ar -q -# RANLIB = ranlib -# COPY = copy -# DELETE = delete all quiet -# MAKEDIR = makedir - -MAKE = $(MAKE_COMMAND) -f GNUmakefile.os4 - -############################################################################## - -ifeq (,$(TYPE)) -LIBC_OBJS = libc_objs -LIBUNIX_OBJS = libunix_objs -LIBM_OBJS = libm_objs -LIBNET_OBJS = libnet_objs -LIBDEBUG_OBJS = libdebug_objs -LIBAMIGA_OBJS = libamiga_objs -LIBPROFILE_OBJS = libprofile_objs -else -LIBC_OBJS = $(TYPE)/libc_objs -LIBUNIX_OBJS = $(TYPE)/libunix_objs -LIBM_OBJS = $(TYPE)/libm_objs -LIBNET_OBJS = $(TYPE)/libnet_objs -LIBDEBUG_OBJS = $(TYPE)/libdebug_objs -LIBAMIGA_OBJS = $(TYPE)/libamiga_objs -LIBPROFILE_OBJS = $(TYPE)/libprofile_objs -endif - -############################################################################## - -# General build rules for all object files and the individual libraries -%.o : %.c - @echo "Compiling $<" - @$(CC) -c $(CFLAGS) $< - -$(LIBC_OBJS)/%.o : %.c - @echo "Compiling $< [$(TYPE):c]" - @$(CC) -o $(LIBC_OBJS)/$*.o -c $(CFLAGS) $< - -$(LIBUNIX_OBJS)/%.o : %.c - @echo "Compiling $< [$(TYPE):unix]" - @$(CC) -o $(LIBUNIX_OBJS)/$*.o -c $(CFLAGS) -DUNIX_PATH_SEMANTICS $< - -$(LIBM_OBJS)/%.o : %.c - @echo "Compiling $< [$(TYPE):m]" - @$(CC) -o $(LIBM_OBJS)/$*.o -c $(CFLAGS) $(FLOAT_TYPE) $< - -$(LIBNET_OBJS)/%.o : %.c - @echo "Compiling $< [$(TYPE):net]" - @$(CC) -o $(LIBNET_OBJS)/$*.o -c $(CFLAGS) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT $< - -$(LIBDEBUG_OBJS)/%.o : %.c - @echo "Compiling $< [$(TYPE):debug]" - @$(CC) -o $(LIBDEBUG_OBJS)/$*.o -c $(CFLAGS) $< - -$(LIBAMIGA_OBJS)/%.o : %.c - @echo "Compiling $< [$(TYPE):amiga]" - @$(CC) -o $(LIBAMIGA_OBJS)/$*.o -c $(CFLAGS) $< - -$(LIBPROFILE_OBJS)/%.o : %.c - @echo "Compiling $< [$(TYPE):profile]" - @$(CC) -o $(LIBPROFILE_OBJS)/$*.o -c $(CFLAGS) $< - -$(LIBPROFILE_OBJS)/%.o : %.S - @echo "Assembling $< [$(TYPE):profile]" - @$(CC) -o $(LIBPROFILE_OBJS)/$*.o -Wa,-mregnames -c $(CFLAGS) $< - - - -############################################################################## - -# Build options for the individual libraries -ifeq (small_data,$(TYPE)) -CODE_TYPE := -msdata=sysv -DSMALL_DATA -FLOAT_TYPE := -DPPC_FLOATING_POINT_SUPPORT -endif - -ifeq (large_data,$(TYPE)) -CODE_TYPE := -msdata=data -FLOAT_TYPE := -DPPC_FLOATING_POINT_SUPPORT -endif - -ifeq (large_data_softfloat,$(TYPE)) -CODE_TYPE := -msdata=data -msoft-float -FLOAT_TYPE := -endif - -ifeq (baserel,$(TYPE)) -CODE_TYPE := -mbaserel -DBASEREL_DATA -FLOAT_TYPE := -DPPC_FLOATING_POINT_SUPPORT -endif - -############################################################################## - -WARNINGS = \ - -Wall -W -Wpointer-arith -Wsign-compare -Wmissing-prototypes \ - -Wundef -Wbad-function-cast -Wmissing-declarations -Wunused - -# -Wconversion -Wshadow - -INCLUDES = -Iinclude -I. -I$(SDK_INCLUDE) - OPTIONS = -D__THREAD_SAFE -DNDEBUG -DUSE_64_BIT_INTS -D__USE_INLINE__ -Wa,-mregnames -fno-common -std=gnu99 -#OPTIONS = -DNDEBUG -DUSE_64_BIT_INTS -D__USE_INLINE__ -Wa,-mregnames -fno-common -std=gnu99 -OPTIMIZE = -O3 -#DEBUG = -ggdb - -CFLAGS = $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(CODE_TYPE) $(INCLUDES) - -############################################################################## - -# All objects files which make up libc.a -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_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_mkdir.o \ - stat_rmdir.o \ - stat_stat.o \ - stat_umask.o \ - stdio_asprintf.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_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_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_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_getdefstacksize.o \ - stdlib_getenv.o \ - stdlib_getsp.o \ - stdlib_get_errno.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_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_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_srand.o \ - stdlib_stackargbytes.o \ - stdlib_stackcheck.o \ - stdlib_stackoverflow.o \ - stdlib_stacksafezone.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_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 \ - 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_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 - -# All objects files which make up libunix.a -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 \ - stat_chmod.o \ - stat_fstat.o \ - stat_lstat.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_arg.o \ - stdlib_main.o \ - stdlib_mkdtemp.o \ - stdlib_mkstemp.o \ - stdlib_mktemp.o \ - stdlib_system.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 \ - uio_readv.o \ - uio_writev.o \ - unistd_access.o \ - unistd_chdir.o \ - unistd_chdir_exit.o \ - unistd_chown.o \ - unistd_getcwd.o \ - unistd_lchown.o \ - unistd_link.o \ - unistd_readlink.o \ - unistd_realpath.o \ - unistd_restorepathname.o \ - unistd_setcurrentpath.o \ - unistd_strip_double_slash.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 - -# All objects files which make up libm.a -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 \ - 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_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_floor.o \ - math_floorf.o \ - math_fma.o \ - math_fmaf.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_scalbn.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_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_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 - -# All objects files which make up libnet.a -NET_LIB = \ - net.lib_rev.o \ - socket_accept.o \ - socket_bind.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_recv.o \ - socket_recvfrom.o \ - socket_recvmsg.o \ - socket_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 \ - 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 - -# All objects files which make up libdebug.a -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 - -# All objects files which make up libamiga.a -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 - -MEMDEBUG_LIB = \ - stdio_vasprintf_debug.o \ - stdio_vasprintf_hook_entry_debug.o \ - stdlib_alloca_debug.o \ - stdlib_calloc_debug.o \ - stdlib_free_debug.o \ - stdlib_malloc_debug.o \ - string_strdup_debug.o \ - unistd_getcwd_debug.o - -PROFILE_LIB = \ - profile__mcount.o \ - profile_gmon.o \ - profile_mcount.o - -############################################################################## - -# The libraries to be built, prefixed by the respective path names -LIBS := \ - $(LIBC_OBJS)/libc.a \ - $(LIBUNIX_OBJS)/libunix.a \ - $(LIBDEBUG_OBJS)/libdebug.a \ - $(LIBAMIGA_OBJS)/libamiga.a \ - $(LIBM_OBJS)/libm.a \ - $(LIBNET_OBJS)/libnet.a \ - $(LIBPROFILE_OBJS)/libprofile.a - -############################################################################## - -# The startup object files to be built -STARTUPS := crt0.o crtbegin.o crtend.o - -############################################################################## - -# This is the first target: it creates the necessary directories, then proceeds -# to build the startup object files and finally the libraries -all: \ - lib \ - lib/soft-float \ - lib/small-data \ - lib/baserel \ - small_data \ - large_data \ - large_data_softfloat \ - baserel \ - lib/crt0.o \ - lib/crtbegin.o \ - lib/crtend.o \ - lib/libm.a \ - lib/small-data/crt0.o \ - lib/small-data/crtbegin.o \ - lib/small-data/crtend.o \ - lib/small-data/libm.a \ - lib/soft-float/libm.a \ - lib/baserel/crt0.o \ - lib/baserel/crtbegin.o \ - lib/baserel/crtend.o \ - lib/baserel/libm.a - -############################################################################## - -# Delete all object files and libraries -clean: - -$(DELETE) $(STARTUPS) lib small_data large_data large_data_softfloat baserel - -############################################################################## - -# Update the version numbers bound to the individual libraries -version: - cp c.lib_rev.rev amiga.lib_rev.rev - cp c.lib_rev.rev debug.lib_rev.rev - cp c.lib_rev.rev m.lib_rev.rev - cp c.lib_rev.rev m881.lib_rev.rev - cp c.lib_rev.rev net.lib_rev.rev - cp c.lib_rev.rev stack.lib_rev.rev - cp c.lib_rev.rev unix.lib_rev.rev - cp c.lib_rev.rev profile.lib_rev.rev - bumprev 1 amiga.lib - bumprev 1 c.lib - bumprev 1 debug.lib - bumprev 1 m.lib - bumprev 1 m881.lib - bumprev 1 net.lib - bumprev 1 stack.lib - bumprev 1 unix.lib - bumprev 1 profile.lib - -############################################################################## - -# Tag all files with a certain version number -cvs-tag: - cvs -q tag V1_`cat c.lib_rev.rev` - -############################################################################## - -# This target first creates a directory to store the object files in, then -# proceeds to build the libraries from the code. It is invoked by the -# individual library build targets below. -all_libraries: $(TYPE) $(LIBS) - -############################################################################## - -# These create the required subdirectories to store object files and -# libraries in -lib: - -$(MAKEDIR) $@ - -lib/small-data: lib - -$(MAKEDIR) $@ - -lib/soft-float: lib - -$(MAKEDIR) $@ - -lib/baserel: lib - -$(MAKEDIR) $@ - -small_data: - -$(MAKEDIR) $@ - -large_data: - -$(MAKEDIR) $@ - -large_data_softfloat: - -$(MAKEDIR) $@ - -baserel: - -$(MAKEDIR) $@ - -############################################################################## - -# Dependencies for libm.a (large data variant with hardware floating point code -# support): this actually ends up building all the libraries rather than just -# libm.a -lib/libm.a: large_data large_data/libm.a - -large_data/libm.a: - $(MAKE) TYPE=large_data all_libraries - $(COPY) $(foreach file,$(LIBS),large_data/$(file)) lib - -############################################################################## - -# Dependencies for libm.a (large data variant with software floating point code -# support): this actually ends up building all the libraries rather than just -# libm.a -lib/soft-float/libm.a: large_data_softfloat large_data_softfloat/libm.a - -large_data_softfloat/libm.a: - $(MAKE) TYPE=large_data_softfloat all_libraries - $(COPY) $(foreach file,$(LIBS),large_data_softfloat/$(file)) lib/soft-float - -############################################################################## - -# Dependencies for libm.a (small data variant): this actually ends up building all -# the libraries rather than just libm.a -lib/small-data/libm.a: small_data small_data/libm.a - -small_data/libm.a: - $(MAKE) TYPE=small_data all_libraries - $(COPY) $(foreach file,$(LIBS),small_data/$(file)) lib/small-data - -############################################################################## - -# Dependencies for libm.a (baserel variant) - -lib/baserel/libm.a: baserel baserel/libm.a - -baserel/libm.a: - $(MAKE) TYPE=baserel all_libraries - $(COPY) $(foreach file,$(LIBS),baserel/$(file)) lib/baserel - -############################################################################## - -# Rules to build and move the startup code -lib/crt0.o : lib crt0.o - $(COPY) crt0.o lib - -lib/crtbegin.o : lib crtbegin.o - $(COPY) crtbegin.o lib - -lib/crtend.o : lib crtend.o - $(COPY) crtend.o lib - -lib/small-data/crt0.o : lib small_data/crt0.o - $(COPY) small_data/crt0.o lib/small-data - -lib/small-data/crtbegin.o : lib small_data/crtbegin.o - $(COPY) small_data/crtbegin.o lib/small-data - -lib/small-data/crtend.o : lib small_data/crtend.o - $(COPY) small_data/crtend.o lib/small-data - -lib/baserel/crt0.o : lib baserel/crt0.o - $(COPY) baserel/crt0.o lib/baserel - -lib/baserel/crtbegin.o : lib baserel/crtbegin.o - $(COPY) baserel/crtbegin.o lib/baserel - -lib/baserel/crtend.o : lib baserel/crtend.o - $(COPY) baserel/crtend.o lib/baserel - -############################################################################## - -# Individual dependencies which tell make to build the object files from -# 'C' source files rather than the assembly language source files of the -# same name (e.g. stdlib_getsp.c instead of stdlib_getsp.asm). -$(LIBC_OBJS)/stdlib_getsp.o : stdlib_getsp.c - -$(LIBC_OBJS)/stdlib_swapstack.o : stdlib_swapstack.c - -$(LIBC_OBJS)/stdlib_setjmp.o : stdlib_setjmp.c - -############################################################################## - -# Build rules for version information that goes into each library -$(LIBC_OBJS)/c.lib_rev.o : c.lib_rev.c c.lib_rev.h - -$(LIBUNIX_OBJS)/unix.lib_rev.o : unix.lib_rev.c unix.lib_rev.h - -$(LIBM_OBJS)/m.lib_rev.o : m.lib_rev.c m.lib_rev.h - -$(LIBNET_OBJS)/net.lib_rev.o : net.lib_rev.c net.lib_rev.h - -$(LIBDEBUG_OBJS)/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h - -$(LIBAMIGA_OBJS)/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h - -$(LIBPROFILE_OBJS)/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h - -############################################################################## - -# Build rules for the debug version of the library which has special -# memory allocation debugging code, controlled by the contents of -# the stdlib_memory.h file. -$(LIBC_OBJS)/stdlib_alloca.o : stdlib_alloca.c stdlib_memory.h - -$(LIBC_OBJS)/stdlib_calloc.o : stdlib_calloc.c stdlib_memory.h - -$(LIBC_OBJS)/stdlib_free.o : stdlib_free.c stdlib_memory.h - -$(LIBC_OBJS)/stdlib_malloc.o : stdlib_malloc.c stdlib_memory.h - -$(LIBC_OBJS)/stdlib_realloc.o : stdlib_realloc.c stdlib_memory.h - -$(LIBC_OBJS)/stdlib_red_black.o : stdlib_red_black.c stdlib_memory.h - -############################################################################## - -# Peculiar build rules for the debug versions of memory allocation functions, -# or at least those which use memory allocation functionality. -$(LIBC_OBJS)/stdlib_alloca_debug.o : stdlib_alloca.c - @echo "Compiling $< [$(TYPE):c debug]" - @$(CC) -o $(LIBC_OBJS)/stdlib_alloca_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_alloca.c - -$(LIBC_OBJS)/stdlib_calloc_debug.o : stdlib_calloc.c - @echo "Compiling $< [$(TYPE):c debug]" - @$(CC) -o $(LIBC_OBJS)/stdlib_calloc_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_calloc.c - -$(LIBC_OBJS)/stdlib_free_debug.o : stdlib_free.c - @echo "Compiling $< [$(TYPE):c debug]" - @$(CC) -o $(LIBC_OBJS)/stdlib_free_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_free.c - -$(LIBC_OBJS)/stdlib_malloc_debug.o : stdlib_malloc.c - @echo "Compiling $< [$(TYPE):c debug]" - @$(CC) -o $(LIBC_OBJS)/stdlib_malloc_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_malloc.c - -$(LIBC_OBJS)/stdlib_realloc_debug.o : stdlib_realloc.c - @echo "Compiling $< [$(TYPE):c debug]" - @$(CC) -o $(LIBC_OBJS)/stdlib_realloc_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_realloc.c - -$(LIBC_OBJS)/stdio_vasprintf_hook_entry_debug.o : stdio_vasprintf_hook_entry.c - @echo "Compiling $< [$(TYPE):c debug]" - @$(CC) -o $(LIBC_OBJS)/stdio_vasprintf_hook_entry_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdio_vasprintf_hook_entry.c - -$(LIBC_OBJS)/stdio_vasprintf_debug.o : stdio_vasprintf.c - @echo "Compiling $< [$(TYPE):c debug]" - @$(CC) -o $(LIBC_OBJS)/stdio_vasprintf_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdio_vasprintf.c - -$(LIBM_OBJS)/stdio_vasprintf_debug.o : stdio_vasprintf.c - @echo "Compiling $< [$(TYPE):m debug]" - @$(CC) -o $(LIBM_OBJS)/stdio_vasprintf_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG $(FLOAT_TYPE) stdio_vasprintf.c - -$(LIBC_OBJS)/string_strdup_debug.o : string_strdup.c - @echo "Compiling $< [$(TYPE):c debug]" - @$(CC) -o $(LIBC_OBJS)/string_strdup_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG string_strdup.c - -$(LIBC_OBJS)/unistd_getcwd_debug.o : unistd_getcwd.c - @echo "Compiling $< [$(TYPE):c debug]" - @$(CC) -o $(LIBC_OBJS)/unistd_getcwd_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG unistd_getcwd.c - -$(LIBUNIX_OBJS)/unistd_getcwd_debug.o : unistd_getcwd.c - @echo "Compiling $< [$(TYPE):unix debug]" - @$(CC) -o $(LIBUNIX_OBJS)/unistd_getcwd_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG -DUNIX_PATH_SEMANTICS unistd_getcwd.c - -############################################################################## - -# Individual build rules for libc.a -$(LIBC_OBJS) : - $(MAKEDIR) $@ - -$(LIBC_OBJS)/libc.a : $(LIBC_OBJS) $(foreach file,$(C_LIB),$(LIBC_OBJS)/$(file)) - -$(DELETE) $@ - @$(AR) $@ $(foreach file,$(C_LIB),$(LIBC_OBJS)/$(file)) - $(RANLIB) $@ - -############################################################################## - -# Individual build rules for libunix.a -$(LIBUNIX_OBJS) : - $(MAKEDIR) $@ - -$(LIBUNIX_OBJS)/libunix.a : $(LIBUNIX_OBJS) $(foreach file,$(UNIX_LIB),$(LIBUNIX_OBJS)/$(file)) - -$(DELETE) $@ - @$(AR) $@ $(foreach file,$(UNIX_LIB),$(LIBUNIX_OBJS)/$(file)) - $(RANLIB) $@ - -############################################################################## - -# Individual build rules for libm.a -$(LIBM_OBJS) : - $(MAKEDIR) $@ - -$(LIBM_OBJS)/libm.a : $(LIBM_OBJS) $(foreach file,$(MATH_LIB),$(LIBM_OBJS)/$(file)) - -$(DELETE) $@ - @$(AR) $@ $(foreach file,$(MATH_LIB),$(LIBM_OBJS)/$(file)) - $(RANLIB) $@ - -############################################################################## - -# Individual build rules for libnet.a -$(LIBNET_OBJS) : - $(MAKEDIR) $@ - -$(LIBNET_OBJS)/libnet.a : $(LIBNET_OBJS) $(foreach file,$(NET_LIB),$(LIBNET_OBJS)/$(file)) - -$(DELETE) $@ - @$(AR) $@ $(foreach file,$(NET_LIB),$(LIBNET_OBJS)/$(file)) - $(RANLIB) $@ - -############################################################################## - -# Individual build rules for libdebug.a -$(LIBDEBUG_OBJS) : - $(MAKEDIR) $@ - -$(LIBDEBUG_OBJS)/libdebug.a : $(LIBDEBUG_OBJS) $(foreach file,$(DEBUG_LIB),$(LIBDEBUG_OBJS)/$(file)) - -$(DELETE) $@ - @$(AR) $@ $(foreach file,$(DEBUG_LIB),$(LIBDEBUG_OBJS)/$(file)) - $(RANLIB) $@ - -############################################################################## - -# Individual build rules for libamiga.a -$(LIBAMIGA_OBJS) : - $(MAKEDIR) $@ - -$(LIBAMIGA_OBJS)/libamiga.a : $(LIBAMIGA_OBJS) $(foreach file,$(AMIGA_LIB),$(LIBAMIGA_OBJS)/$(file)) - -$(DELETE) $@ - @$(AR) $@ $(foreach file,$(AMIGA_LIB),$(LIBAMIGA_OBJS)/$(file)) - $(RANLIB) $@ - -############################################################################## - -# Individual build rules for libprofile.a -$(LIBPROFILE_OBJS) : - $(MAKEDIR) $@ - -$(LIBPROFILE_OBJS)/libprofile.a : $(LIBPROFILE_OBJS) $(foreach file,$(PROFILE_LIB),$(LIBPROFILE_OBJS)/$(file)) - -$(DELETE) $@ - @$(AR) $@ $(foreach file,$(PROFILE_LIB),$(LIBPROFILE_OBJS)/$(file)) - $(RANLIB) $@ - -############################################################################## - -# Individual build rules for the startup code. -crt0.o : crt0.S - @echo "Assembling $<" - @$(CC) -Wa,-mregnames -o crt0.o -c crt0.S - -small_data/crt0.o : crt0.S - @echo "Assembling $<" - @$(CC) -DSMALL_DATA -Wa,-mregnames -o small_data/crt0.o -c crt0.S - -small_data/crtbegin.o : crtbegin.c - @echo "Assembling $<" - @$(CC) -o small_data/crtbegin.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(INCLUDES) -msdata=sysv -DSMALL_DATA crtbegin.c - -small_data/crtend.o : crtend.c - @echo "Assembling $<" - @$(CC) -o small_data/crtend.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(INCLUDES) -msdata=sysv -DSMALL_DATA crtend.c - -baserel/crt0.o : crt0.S - @echo "Assembling $<" - @$(CC) -Wa,-mregnames -o baserel/crt0.o -mbaserel -DBASEREL_DATA -c crt0.S - -baserel/crtbegin.o : crtbegin.c - @echo "Assembling $<" - @$(CC) -o baserel/crtbegin.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(INCLUDES) -mbaserel -DBASEREL_DATA crtbegin.c - -baserel/crtend.o : crtend.c - @echo "Assembling $<" - @$(CC) -o baserel/crtend.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(INCLUDES) -mbaserel -DBASEREL_DATA crtend.c - +# +# $Id: GNUmakefile.os4,v 1.79 2005-10-16 09:14:28 obarthel Exp $ +# +# :ts=8 +# +# -*- mode: makefile; -*- + +############################################################################## + +# You may have to tweak this for the native OS4 compiler +SDK_INCLUDE = $(V)/include +NET_INCLUDE = netinclude + +# These are for the cross compiler +CC = ppc-amigaos-gcc +AR = ppc-amigaos-ar -q +RANLIB = ppc-amigaos-ranlib +COPY = cp -a +DELETE = rm -rf +MAKEDIR = mkdir + +# The following are for the native OS4 compiler +# CC = gcc +# AR = ar -q +# RANLIB = ranlib +# COPY = copy +# DELETE = delete all quiet +# MAKEDIR = makedir + +MAKE = $(MAKE_COMMAND) -f GNUmakefile.os4 + +############################################################################## + +ifeq (,$(TYPE)) +LIBC_OBJS = libc_objs +LIBUNIX_OBJS = libunix_objs +LIBM_OBJS = libm_objs +LIBNET_OBJS = libnet_objs +LIBDEBUG_OBJS = libdebug_objs +LIBAMIGA_OBJS = libamiga_objs +LIBPROFILE_OBJS = libprofile_objs +else +LIBC_OBJS = $(TYPE)/libc_objs +LIBUNIX_OBJS = $(TYPE)/libunix_objs +LIBM_OBJS = $(TYPE)/libm_objs +LIBNET_OBJS = $(TYPE)/libnet_objs +LIBDEBUG_OBJS = $(TYPE)/libdebug_objs +LIBAMIGA_OBJS = $(TYPE)/libamiga_objs +LIBPROFILE_OBJS = $(TYPE)/libprofile_objs +endif + +############################################################################## + +# General build rules for all object files and the individual libraries +%.o : %.c + @echo "Compiling $<" + @$(CC) -c $(CFLAGS) $< + +$(LIBC_OBJS)/%.o : %.c + @echo "Compiling $< [$(TYPE):c]" + @$(CC) -o $(LIBC_OBJS)/$*.o -c $(CFLAGS) $< + +$(LIBUNIX_OBJS)/%.o : %.c + @echo "Compiling $< [$(TYPE):unix]" + @$(CC) -o $(LIBUNIX_OBJS)/$*.o -c $(CFLAGS) -DUNIX_PATH_SEMANTICS $< + +$(LIBM_OBJS)/%.o : %.c + @echo "Compiling $< [$(TYPE):m]" + @$(CC) -o $(LIBM_OBJS)/$*.o -c $(CFLAGS) $(FLOAT_TYPE) $< + +$(LIBNET_OBJS)/%.o : %.c + @echo "Compiling $< [$(TYPE):net]" + @$(CC) -o $(LIBNET_OBJS)/$*.o -c $(CFLAGS) -I$(NET_INCLUDE) -DSOCKET_SUPPORT -DUSERGROUP_SUPPORT $< + +$(LIBDEBUG_OBJS)/%.o : %.c + @echo "Compiling $< [$(TYPE):debug]" + @$(CC) -o $(LIBDEBUG_OBJS)/$*.o -c $(CFLAGS) $< + +$(LIBAMIGA_OBJS)/%.o : %.c + @echo "Compiling $< [$(TYPE):amiga]" + @$(CC) -o $(LIBAMIGA_OBJS)/$*.o -c $(CFLAGS) $< + +$(LIBPROFILE_OBJS)/%.o : %.c + @echo "Compiling $< [$(TYPE):profile]" + @$(CC) -o $(LIBPROFILE_OBJS)/$*.o -c $(CFLAGS) $< + +$(LIBPROFILE_OBJS)/%.o : %.S + @echo "Assembling $< [$(TYPE):profile]" + @$(CC) -o $(LIBPROFILE_OBJS)/$*.o -Wa,-mregnames -c $(CFLAGS) $< + + + +############################################################################## + +# Build options for the individual libraries +ifeq (small_data,$(TYPE)) +CODE_TYPE := -msdata=sysv -DSMALL_DATA +FLOAT_TYPE := -DPPC_FLOATING_POINT_SUPPORT +endif + +ifeq (large_data,$(TYPE)) +CODE_TYPE := -msdata=data +FLOAT_TYPE := -DPPC_FLOATING_POINT_SUPPORT +endif + +ifeq (large_data_softfloat,$(TYPE)) +CODE_TYPE := -msdata=data -msoft-float +FLOAT_TYPE := +endif + +ifeq (baserel,$(TYPE)) +CODE_TYPE := -mbaserel -DBASEREL_DATA +FLOAT_TYPE := -DPPC_FLOATING_POINT_SUPPORT +endif + +############################################################################## + +WARNINGS = \ + -Wall -W -Wpointer-arith -Wsign-compare -Wmissing-prototypes \ + -Wundef -Wbad-function-cast -Wmissing-declarations -Wunused + +# -Wconversion -Wshadow + +INCLUDES = -Iinclude -I. -I$(SDK_INCLUDE) + OPTIONS = -D__THREAD_SAFE -DNDEBUG -DUSE_64_BIT_INTS -D__USE_INLINE__ -Wa,-mregnames -fno-common -std=gnu99 +#OPTIONS = -DNDEBUG -DUSE_64_BIT_INTS -D__USE_INLINE__ -Wa,-mregnames -fno-common -std=gnu99 +OPTIMIZE = -O3 +#DEBUG = -ggdb + +CFLAGS = $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(CODE_TYPE) $(INCLUDES) + +############################################################################## + +# All objects files which make up libc.a +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_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_mkdir.o \ + stat_rmdir.o \ + stat_stat.o \ + stat_umask.o \ + stdio_asprintf.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_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_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_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_getdefstacksize.o \ + stdlib_getenv.o \ + stdlib_getsp.o \ + stdlib_get_errno.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_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_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_srand.o \ + stdlib_stackargbytes.o \ + stdlib_stackcheck.o \ + stdlib_stackoverflow.o \ + stdlib_stacksafezone.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_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 \ + 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_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 + +# All objects files which make up libunix.a +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 \ + stat_chmod.o \ + stat_fstat.o \ + stat_lstat.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_arg.o \ + stdlib_main.o \ + stdlib_mkdtemp.o \ + stdlib_mkstemp.o \ + stdlib_mktemp.o \ + stdlib_system.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 \ + uio_readv.o \ + uio_writev.o \ + unistd_access.o \ + unistd_chdir.o \ + unistd_chdir_exit.o \ + unistd_chown.o \ + unistd_getcwd.o \ + unistd_lchown.o \ + unistd_link.o \ + unistd_readlink.o \ + unistd_realpath.o \ + unistd_restorepathname.o \ + unistd_setcurrentpath.o \ + unistd_strip_double_slash.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 + +# All objects files which make up libm.a +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 \ + 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_floor.o \ + math_floorf.o \ + math_fma.o \ + math_fmaf.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_scalbn.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_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_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 + +# All objects files which make up libnet.a +NET_LIB = \ + net.lib_rev.o \ + socket_accept.o \ + socket_bind.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_recv.o \ + socket_recvfrom.o \ + socket_recvmsg.o \ + socket_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 \ + 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 + +# All objects files which make up libdebug.a +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 + +# All objects files which make up libamiga.a +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 + +MEMDEBUG_LIB = \ + stdio_vasprintf_debug.o \ + stdio_vasprintf_hook_entry_debug.o \ + stdlib_alloca_debug.o \ + stdlib_calloc_debug.o \ + stdlib_free_debug.o \ + stdlib_malloc_debug.o \ + string_strdup_debug.o \ + unistd_getcwd_debug.o + +PROFILE_LIB = \ + profile__mcount.o \ + profile_gmon.o \ + profile_mcount.o + +############################################################################## + +# The libraries to be built, prefixed by the respective path names +LIBS := \ + $(LIBC_OBJS)/libc.a \ + $(LIBUNIX_OBJS)/libunix.a \ + $(LIBDEBUG_OBJS)/libdebug.a \ + $(LIBAMIGA_OBJS)/libamiga.a \ + $(LIBM_OBJS)/libm.a \ + $(LIBNET_OBJS)/libnet.a \ + $(LIBPROFILE_OBJS)/libprofile.a + +############################################################################## + +# The startup object files to be built +STARTUPS := crt0.o crtbegin.o crtend.o + +############################################################################## + +# This is the first target: it creates the necessary directories, then proceeds +# to build the startup object files and finally the libraries +all: \ + lib \ + lib/soft-float \ + lib/small-data \ + lib/baserel \ + small_data \ + large_data \ + large_data_softfloat \ + baserel \ + lib/crt0.o \ + lib/crtbegin.o \ + lib/crtend.o \ + lib/libm.a \ + lib/small-data/crt0.o \ + lib/small-data/crtbegin.o \ + lib/small-data/crtend.o \ + lib/small-data/libm.a \ + lib/soft-float/libm.a \ + lib/baserel/crt0.o \ + lib/baserel/crtbegin.o \ + lib/baserel/crtend.o \ + lib/baserel/libm.a + +############################################################################## + +# Delete all object files and libraries +clean: + -$(DELETE) $(STARTUPS) lib small_data large_data large_data_softfloat baserel + +############################################################################## + +# Update the version numbers bound to the individual libraries +version: + cp c.lib_rev.rev amiga.lib_rev.rev + cp c.lib_rev.rev debug.lib_rev.rev + cp c.lib_rev.rev m.lib_rev.rev + cp c.lib_rev.rev m881.lib_rev.rev + cp c.lib_rev.rev net.lib_rev.rev + cp c.lib_rev.rev stack.lib_rev.rev + cp c.lib_rev.rev unix.lib_rev.rev + cp c.lib_rev.rev profile.lib_rev.rev + bumprev 1 amiga.lib + bumprev 1 c.lib + bumprev 1 debug.lib + bumprev 1 m.lib + bumprev 1 m881.lib + bumprev 1 net.lib + bumprev 1 stack.lib + bumprev 1 unix.lib + bumprev 1 profile.lib + +############################################################################## + +# Tag all files with a certain version number +cvs-tag: + cvs -q tag V1_`cat c.lib_rev.rev` + +############################################################################## + +# This target first creates a directory to store the object files in, then +# proceeds to build the libraries from the code. It is invoked by the +# individual library build targets below. +all_libraries: $(TYPE) $(LIBS) + +############################################################################## + +# These create the required subdirectories to store object files and +# libraries in +lib: + -$(MAKEDIR) $@ + +lib/small-data: lib + -$(MAKEDIR) $@ + +lib/soft-float: lib + -$(MAKEDIR) $@ + +lib/baserel: lib + -$(MAKEDIR) $@ + +small_data: + -$(MAKEDIR) $@ + +large_data: + -$(MAKEDIR) $@ + +large_data_softfloat: + -$(MAKEDIR) $@ + +baserel: + -$(MAKEDIR) $@ + +############################################################################## + +# Dependencies for libm.a (large data variant with hardware floating point code +# support): this actually ends up building all the libraries rather than just +# libm.a +lib/libm.a: large_data large_data/libm.a + +large_data/libm.a: + $(MAKE) TYPE=large_data all_libraries + $(COPY) $(foreach file,$(LIBS),large_data/$(file)) lib + +############################################################################## + +# Dependencies for libm.a (large data variant with software floating point code +# support): this actually ends up building all the libraries rather than just +# libm.a +lib/soft-float/libm.a: large_data_softfloat large_data_softfloat/libm.a + +large_data_softfloat/libm.a: + $(MAKE) TYPE=large_data_softfloat all_libraries + $(COPY) $(foreach file,$(LIBS),large_data_softfloat/$(file)) lib/soft-float + +############################################################################## + +# Dependencies for libm.a (small data variant): this actually ends up building all +# the libraries rather than just libm.a +lib/small-data/libm.a: small_data small_data/libm.a + +small_data/libm.a: + $(MAKE) TYPE=small_data all_libraries + $(COPY) $(foreach file,$(LIBS),small_data/$(file)) lib/small-data + +############################################################################## + +# Dependencies for libm.a (baserel variant) + +lib/baserel/libm.a: baserel baserel/libm.a + +baserel/libm.a: + $(MAKE) TYPE=baserel all_libraries + $(COPY) $(foreach file,$(LIBS),baserel/$(file)) lib/baserel + +############################################################################## + +# Rules to build and move the startup code +lib/crt0.o : lib crt0.o + $(COPY) crt0.o lib + +lib/crtbegin.o : lib crtbegin.o + $(COPY) crtbegin.o lib + +lib/crtend.o : lib crtend.o + $(COPY) crtend.o lib + +lib/small-data/crt0.o : lib small_data/crt0.o + $(COPY) small_data/crt0.o lib/small-data + +lib/small-data/crtbegin.o : lib small_data/crtbegin.o + $(COPY) small_data/crtbegin.o lib/small-data + +lib/small-data/crtend.o : lib small_data/crtend.o + $(COPY) small_data/crtend.o lib/small-data + +lib/baserel/crt0.o : lib baserel/crt0.o + $(COPY) baserel/crt0.o lib/baserel + +lib/baserel/crtbegin.o : lib baserel/crtbegin.o + $(COPY) baserel/crtbegin.o lib/baserel + +lib/baserel/crtend.o : lib baserel/crtend.o + $(COPY) baserel/crtend.o lib/baserel + +############################################################################## + +# Individual dependencies which tell make to build the object files from +# 'C' source files rather than the assembly language source files of the +# same name (e.g. stdlib_getsp.c instead of stdlib_getsp.asm). +$(LIBC_OBJS)/stdlib_getsp.o : stdlib_getsp.c + +$(LIBC_OBJS)/stdlib_swapstack.o : stdlib_swapstack.c + +$(LIBC_OBJS)/stdlib_setjmp.o : stdlib_setjmp.c + +############################################################################## + +# Build rules for version information that goes into each library +$(LIBC_OBJS)/c.lib_rev.o : c.lib_rev.c c.lib_rev.h + +$(LIBUNIX_OBJS)/unix.lib_rev.o : unix.lib_rev.c unix.lib_rev.h + +$(LIBM_OBJS)/m.lib_rev.o : m.lib_rev.c m.lib_rev.h + +$(LIBNET_OBJS)/net.lib_rev.o : net.lib_rev.c net.lib_rev.h + +$(LIBDEBUG_OBJS)/debug.lib_rev.o : debug.lib_rev.c debug.lib_rev.h + +$(LIBAMIGA_OBJS)/amiga.lib_rev.o : amiga.lib_rev.c amiga.lib_rev.h + +$(LIBPROFILE_OBJS)/profile.lib_rev.o : profile.lib_rev.c profile.lib_rev.h + +############################################################################## + +# Build rules for the debug version of the library which has special +# memory allocation debugging code, controlled by the contents of +# the stdlib_memory.h file. +$(LIBC_OBJS)/stdlib_alloca.o : stdlib_alloca.c stdlib_memory.h + +$(LIBC_OBJS)/stdlib_calloc.o : stdlib_calloc.c stdlib_memory.h + +$(LIBC_OBJS)/stdlib_free.o : stdlib_free.c stdlib_memory.h + +$(LIBC_OBJS)/stdlib_malloc.o : stdlib_malloc.c stdlib_memory.h + +$(LIBC_OBJS)/stdlib_realloc.o : stdlib_realloc.c stdlib_memory.h + +$(LIBC_OBJS)/stdlib_red_black.o : stdlib_red_black.c stdlib_memory.h + +############################################################################## + +# Peculiar build rules for the debug versions of memory allocation functions, +# or at least those which use memory allocation functionality. +$(LIBC_OBJS)/stdlib_alloca_debug.o : stdlib_alloca.c + @echo "Compiling $< [$(TYPE):c debug]" + @$(CC) -o $(LIBC_OBJS)/stdlib_alloca_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_alloca.c + +$(LIBC_OBJS)/stdlib_calloc_debug.o : stdlib_calloc.c + @echo "Compiling $< [$(TYPE):c debug]" + @$(CC) -o $(LIBC_OBJS)/stdlib_calloc_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_calloc.c + +$(LIBC_OBJS)/stdlib_free_debug.o : stdlib_free.c + @echo "Compiling $< [$(TYPE):c debug]" + @$(CC) -o $(LIBC_OBJS)/stdlib_free_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_free.c + +$(LIBC_OBJS)/stdlib_malloc_debug.o : stdlib_malloc.c + @echo "Compiling $< [$(TYPE):c debug]" + @$(CC) -o $(LIBC_OBJS)/stdlib_malloc_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_malloc.c + +$(LIBC_OBJS)/stdlib_realloc_debug.o : stdlib_realloc.c + @echo "Compiling $< [$(TYPE):c debug]" + @$(CC) -o $(LIBC_OBJS)/stdlib_realloc_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdlib_realloc.c + +$(LIBC_OBJS)/stdio_vasprintf_hook_entry_debug.o : stdio_vasprintf_hook_entry.c + @echo "Compiling $< [$(TYPE):c debug]" + @$(CC) -o $(LIBC_OBJS)/stdio_vasprintf_hook_entry_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdio_vasprintf_hook_entry.c + +$(LIBC_OBJS)/stdio_vasprintf_debug.o : stdio_vasprintf.c + @echo "Compiling $< [$(TYPE):c debug]" + @$(CC) -o $(LIBC_OBJS)/stdio_vasprintf_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG stdio_vasprintf.c + +$(LIBM_OBJS)/stdio_vasprintf_debug.o : stdio_vasprintf.c + @echo "Compiling $< [$(TYPE):m debug]" + @$(CC) -o $(LIBM_OBJS)/stdio_vasprintf_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG $(FLOAT_TYPE) stdio_vasprintf.c + +$(LIBC_OBJS)/string_strdup_debug.o : string_strdup.c + @echo "Compiling $< [$(TYPE):c debug]" + @$(CC) -o $(LIBC_OBJS)/string_strdup_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG string_strdup.c + +$(LIBC_OBJS)/unistd_getcwd_debug.o : unistd_getcwd.c + @echo "Compiling $< [$(TYPE):c debug]" + @$(CC) -o $(LIBC_OBJS)/unistd_getcwd_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG unistd_getcwd.c + +$(LIBUNIX_OBJS)/unistd_getcwd_debug.o : unistd_getcwd.c + @echo "Compiling $< [$(TYPE):unix debug]" + @$(CC) -o $(LIBUNIX_OBJS)/unistd_getcwd_debug.o -c $(CFLAGS) -D__USE_MEM_TREES -D__MEM_DEBUG -DUNIX_PATH_SEMANTICS unistd_getcwd.c + +############################################################################## + +# Individual build rules for libc.a +$(LIBC_OBJS) : + $(MAKEDIR) $@ + +$(LIBC_OBJS)/libc.a : $(LIBC_OBJS) $(foreach file,$(C_LIB),$(LIBC_OBJS)/$(file)) + -$(DELETE) $@ + @$(AR) $@ $(foreach file,$(C_LIB),$(LIBC_OBJS)/$(file)) + $(RANLIB) $@ + +############################################################################## + +# Individual build rules for libunix.a +$(LIBUNIX_OBJS) : + $(MAKEDIR) $@ + +$(LIBUNIX_OBJS)/libunix.a : $(LIBUNIX_OBJS) $(foreach file,$(UNIX_LIB),$(LIBUNIX_OBJS)/$(file)) + -$(DELETE) $@ + @$(AR) $@ $(foreach file,$(UNIX_LIB),$(LIBUNIX_OBJS)/$(file)) + $(RANLIB) $@ + +############################################################################## + +# Individual build rules for libm.a +$(LIBM_OBJS) : + $(MAKEDIR) $@ + +$(LIBM_OBJS)/libm.a : $(LIBM_OBJS) $(foreach file,$(MATH_LIB),$(LIBM_OBJS)/$(file)) + -$(DELETE) $@ + @$(AR) $@ $(foreach file,$(MATH_LIB),$(LIBM_OBJS)/$(file)) + $(RANLIB) $@ + +############################################################################## + +# Individual build rules for libnet.a +$(LIBNET_OBJS) : + $(MAKEDIR) $@ + +$(LIBNET_OBJS)/libnet.a : $(LIBNET_OBJS) $(foreach file,$(NET_LIB),$(LIBNET_OBJS)/$(file)) + -$(DELETE) $@ + @$(AR) $@ $(foreach file,$(NET_LIB),$(LIBNET_OBJS)/$(file)) + $(RANLIB) $@ + +############################################################################## + +# Individual build rules for libdebug.a +$(LIBDEBUG_OBJS) : + $(MAKEDIR) $@ + +$(LIBDEBUG_OBJS)/libdebug.a : $(LIBDEBUG_OBJS) $(foreach file,$(DEBUG_LIB),$(LIBDEBUG_OBJS)/$(file)) + -$(DELETE) $@ + @$(AR) $@ $(foreach file,$(DEBUG_LIB),$(LIBDEBUG_OBJS)/$(file)) + $(RANLIB) $@ + +############################################################################## + +# Individual build rules for libamiga.a +$(LIBAMIGA_OBJS) : + $(MAKEDIR) $@ + +$(LIBAMIGA_OBJS)/libamiga.a : $(LIBAMIGA_OBJS) $(foreach file,$(AMIGA_LIB),$(LIBAMIGA_OBJS)/$(file)) + -$(DELETE) $@ + @$(AR) $@ $(foreach file,$(AMIGA_LIB),$(LIBAMIGA_OBJS)/$(file)) + $(RANLIB) $@ + +############################################################################## + +# Individual build rules for libprofile.a +$(LIBPROFILE_OBJS) : + $(MAKEDIR) $@ + +$(LIBPROFILE_OBJS)/libprofile.a : $(LIBPROFILE_OBJS) $(foreach file,$(PROFILE_LIB),$(LIBPROFILE_OBJS)/$(file)) + -$(DELETE) $@ + @$(AR) $@ $(foreach file,$(PROFILE_LIB),$(LIBPROFILE_OBJS)/$(file)) + $(RANLIB) $@ + +############################################################################## + +# Individual build rules for the startup code. +crt0.o : crt0.S + @echo "Assembling $<" + @$(CC) -Wa,-mregnames -o crt0.o -c crt0.S + +small_data/crt0.o : crt0.S + @echo "Assembling $<" + @$(CC) -DSMALL_DATA -Wa,-mregnames -o small_data/crt0.o -c crt0.S + +small_data/crtbegin.o : crtbegin.c + @echo "Assembling $<" + @$(CC) -o small_data/crtbegin.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(INCLUDES) -msdata=sysv -DSMALL_DATA crtbegin.c + +small_data/crtend.o : crtend.c + @echo "Assembling $<" + @$(CC) -o small_data/crtend.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(INCLUDES) -msdata=sysv -DSMALL_DATA crtend.c + +baserel/crt0.o : crt0.S + @echo "Assembling $<" + @$(CC) -Wa,-mregnames -o baserel/crt0.o -mbaserel -DBASEREL_DATA -c crt0.S + +baserel/crtbegin.o : crtbegin.c + @echo "Assembling $<" + @$(CC) -o baserel/crtbegin.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(INCLUDES) -mbaserel -DBASEREL_DATA crtbegin.c + +baserel/crtend.o : crtend.c + @echo "Assembling $<" + @$(CC) -o baserel/crtend.o -c $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(INCLUDES) -mbaserel -DBASEREL_DATA crtend.c + diff --git a/library/smakefile b/library/smakefile index d53d690..0ff3201 100644 --- a/library/smakefile +++ b/library/smakefile @@ -1,964 +1,966 @@ -# -# $Id: smakefile,v 1.51 2005-10-11 11:24:53 obarthel Exp $ -# -# :ts=8 -# - -############################################################################## - -.c.o: - @echo "Compiling $<" - @sc nover $(CFLAGS) $< - -.asm.o: - @echo "Assembling $<" - @asm $(AFLAGS) $< - -############################################################################## - -# 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 - -############################################################################## - - 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 define=DEBUG -#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__ define=__THREAD_SAFE - -############################################################################## - -CFLAGS = \ - resopt \ - nover \ - memorysize=huge \ - idir=netinclude \ - idlen=64 \ - commentnest \ - nostackcheck \ - stringmerge \ - errorrexx \ - $(PROFILE) $(OPTIMIZE) $(CODE) $(DATA) $(CPU) $(MATH) \ - $(SUPPORT) $(DEBUG) - -AFLAGS = \ - -d -m2 - -############################################################################## - -AMIGA_OBJ = \ - 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 \ - sas_cxamemcpy.o \ - sas_cxamemset.o \ - sas_cxv.o \ - sas_cxv45.o \ - sas_cxv54.o \ - sas_cxferr.o \ - sas_profile.o - -CTYPE_OBJ = \ - 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_tolower.o \ - ctype_toupper.o \ - ctype_table.o - -DEBUG_OBJ = \ - 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 - -DIRENT_OBJ = \ - dirent_closedir.o \ - dirent_opendir.o \ - dirent_readdir.o \ - dirent_rewinddir.o - -ERRNO_OBJ = \ - errno_data.o - -FCNTL_OBJ = \ - fcntl_close.o \ - fcntl_creat.o \ - fcntl_fcntl.o \ - fcntl_lock.o \ - fcntl_lseek.o \ - fcntl_open.o \ - fcntl_read.o \ - fcntl_write.o \ - fcntl_get_default_file.o - -LIBGEN_OBJ = \ - libgen_basename.o \ - libgen_dirname.o - -LOCALE_OBJ = \ - locale_init_exit.o \ - locale_localeconv.o \ - locale_open_locale.o \ - locale_setlocale.o - -MATH_OBJ = \ - 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_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_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_log.o \ - math_log10.o \ - math_log10f.o \ - math_log1p.o \ - math_log1pf.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 - -MOUNT_OBJ = \ - mount_convertinfo.o \ - mount_fstatfs.o \ - mount_statfs.o - -SIGNAL_OBJ = \ - signal_checkabort.o \ - signal_data.o \ - signal_kill.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 - -SOCKET_OBJ = \ - socket_accept.o \ - socket_bind.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_recv.o \ - socket_recvfrom.o \ - socket_recvmsg.o \ - socket_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 - -STAT_OBJ = \ - stat_chmod.o \ - stat_convertfileinfo.o \ - stat_fchmod.o \ - stat_fstat.o \ - stat_lstat.o \ - stat_mkdir.o \ - stat_rmdir.o \ - stat_stat.o \ - stat_umask.o - -STDIO_OBJ = \ - stdio_asprintf.o \ - stdio_clearerr.o \ - stdio_ctermid.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_file_descriptor.o \ - stdio_growfdtable.o \ - stdio_growiobtable.o \ - stdio_grow_file.o \ - stdio_initializefd.o \ - stdio_initializeiob.o \ - stdio_file_init.o \ - stdio_init_exit.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_record_locking.o \ - stdio_remove.o \ - stdio_remove_fd_alias.o \ - stdio_rename.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_OBJ = \ - inttypes_imaxdiv.o \ - inttypes_imaxabs.o \ - inttypes_strtoimax.o \ - inttypes_strtoumax.o \ - stdlib_abort.o \ - stdlib_abs.o \ - stdlib_alloca.o \ - stdlib_assertion_failure.o \ - stdlib_atexit.o \ - stdlib_atof.o \ - stdlib_atoi.o \ - stdlib_atol.o \ - stdlib_atoll.o \ - stdlib_bsearch.o \ - stdlib_calloc.o \ - stdlib_checkdetach.o \ - stdlib_constructor_begin.o \ - stdlib_constructor.o \ - stdlib_default_pool_size.o \ - stdlib_default_puddle_size.o \ - stdlib_destructor.o \ - stdlib_detach.o \ - stdlib_dosbase.o \ - stdlib_get_errno.o \ - stdlib_set_errno.o \ - stdlib_semaphore.o \ - stdlib_sysbase.o \ - stdlib_termination_message.o \ - stdlib_threshold.o \ - stdlib_disablerequesters.o \ - stdlib_div.o \ - stdlib_exit.o \ - stdlib_free.o \ - stdlib_getdefstacksize.o \ - stdlib_getenv.o \ - stdlib_getsp.o \ - stdlib_isresident.o \ - stdlib_labs.o \ - stdlib_ldiv.o \ - stdlib_lib_main.o \ - stdlib_lib_startup.o \ - stdlib_main.o \ - stdlib_malloc.o \ - stdlib_machine_test.o \ - stdlib_mkdtemp.o \ - stdlib_mkstemp.o \ - stdlib_mktemp.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_setenv.o \ - stdlib_setjmp.o \ - stdlib_set_process_window.o \ - stdlib_shell_escape.o \ - stdlib_showerror.o \ - stdlib_srand.o \ - stdlib_arg.o \ - stdlib_stack_usage.o \ - stdlib_stacksize.o \ - stdlib_strtod.o \ - stdlib_strtof.o \ - stdlib_strtol.o \ - stdlib_strtoul.o \ - stdlib_strtoll.o \ - stdlib_strtoull.o \ - stdlib_swapstack.o \ - stdlib_system.o \ - stdlib_unsetenv.o \ - stdlib_utilitybase.o \ - stdlib_wildcard_expand.o \ - stdlib_stdio_window_spec.o - -STRING_OBJ = \ - 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_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 - -STRINGS_OBJ = \ - strings_ffs.o \ - strings_strcasecmp.o \ - strings_strncasecmp.o - -TIME_OBJ = \ - 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_difftime.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 - -UNISTD_OBJ = \ - ftw_ftw.o \ - ftw_nftw.o \ - termios_cfgetispeed.o \ - termios_cfgetospeed.o \ - termios_cfmakeraw.o \ - termios_cfsetispeed.o \ - termios_cfsetospeed.o \ - termios_console_fdhookentry.o \ - termios_headers.h - termios_openserial.o \ - termios_tcdrain.o \ - termios_tcflow.o \ - termios_tcflush.o \ - termios_tcgetattr.o \ - termios_tcsendbreak.o \ - termios_tcsetattr.o \ - uio_readv.o \ - uio_writev.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_readlink.o \ - unistd_realpath.o \ - unistd_restorepathname.o \ - unistd_setcurrentpath.o \ - unistd_sleep.o \ - unistd_strip_double_slash.o \ - unistd_symlink.o \ - unistd_sync_fd.o \ - unistd_time_delay.o \ - unistd_timer.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_usleep.o \ - utsname_uname.o -# \ -# unistd_wildcard_expand.o - -USERGROUP_OBJ = \ - 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 - -UTIME_OBJ = \ - utime_utime.o - -MEMDEBUG_OBJ = \ - stdio_vasprintf_debug.o \ - stdio_vasprintf_hook_debug.o \ - stdlib_alloca_debug.o \ - stdlib_calloc_debug.o \ - stdlib_free_debug.o \ - stdlib_malloc_debug.o \ - string_strdup_debug.o \ - unistd_getcwd_debug.o - -############################################################################## - -all: setup c.lib startup.o cleanup - -clean: - -delete \#?.o \#?.lib \#?.map - -############################################################################## - -setup: - @echo "Setting up include: assignment" - @assign include: include $(INCLUDE_DIR) - -cleanup: - @echo "Cleaning up include: assignment" - @assign include: sc:include - -############################################################################## - -version: - copy clone c.lib_rev.rev amiga.lib_rev.rev - copy clone c.lib_rev.rev debug.lib_rev.rev - copy clone c.lib_rev.rev m.lib_rev.rev - copy clone c.lib_rev.rev m881.lib_rev.rev - copy clone c.lib_rev.rev net.lib_rev.rev - copy clone c.lib_rev.rev stack.lib_rev.rev - copy clone c.lib_rev.rev unix.lib_rev.rev - bumprev 1 amiga.lib - bumprev 1 c.lib - bumprev 1 debug.lib - bumprev 1 m.lib - bumprev 1 m881.lib - bumprev 1 net.lib - bumprev 1 stack.lib - bumprev 1 unix.lib - -############################################################################## - -cvs-tag: - cvs -q tag V1_`type c.lib_rev.rev` - -############################################################################## - -c.lib_rev.o : c.lib_rev.c c.lib_rev.h - -amiga_hookentry.o : amiga_hookentry.asm - -amiga_callhooka.o : amiga_callhooka.asm - -stdlib_getsp.o : stdlib_getsp.asm - -stdlib_setjmp.o : stdlib_setjmp.asm - -stdlib_swapstack.o : stdlib_swapstack.asm - -stdio_fdhookentry.o : stdio_fdhookentry.c stdlib_memory.h - -stdio_openiob.o : stdio_openiob.c stdlib_memory.h - -stdlib_alloca.o : stdlib_alloca.c stdlib_memory.h - -stdlib_calloc.o : stdlib_calloc.c stdlib_memory.h - -stdlib_free.o : stdlib_free.c stdlib_memory.h - -stdlib_malloc.o : stdlib_malloc.c stdlib_memory.h - -stdlib_realloc.o : stdlib_realloc.c stdlib_memory.h - -stdlib_red_black.o : stdlib_red_black.c stdlib_memory.h - -dirent_closedir.o : dirent_closedir.c stdlib_memory.h - -dirent_opendir.o : dirent_opendir.c stdlib_memory.h - -fcntl_open.o : fcntl_open.c stdlib_memory.h - -socket_select.o : socket_select.c stdlib_memory.h - -stdio_fclose.o : stdio_fclose.c stdlib_memory.h - -stdio_growfdtable.o : stdio_growfdtable.c stdlib_memory.h - -stdio_growiobtable.o : stdio_growiobtable.c stdlib_memory.h - -stdio_init_exit.o : stdio_init_exit.c stdlib_memory.h - -stdio_popen.o : stdio_popen.c stdlib_memory.h - -stdio_setvbuf.o : stdio_setvbuf.c stdlib_memory.h - -stdio_tmpfile.o : stdio_tmpfile.c stdlib_memory.h - -stdlib_atexit.o : stdlib_atexit.c stdlib_memory.h - -stdlib_setenv.o : stdlib_setenv.c stdlib_memory.h - -stdlib_arg.o : stdlib_arg.c stdlib_memory.h - -stdlib_system.o : stdlib_system.c stdlib_memory.h - -stdlib_unsetenv.o : stdlib_unsetenv.c stdlib_memory.h - -unistd_getcwd.o : unistd_getcwd.c stdlib_memory.h - -unistd_unlink.o : unistd_unlink.c stdlib_memory.h - -unistd_wildcard_expand.o : unistd_wildcard_expand.c stdlib_memory.h - -stdlib_main.o : stdlib_main.c - @echo "Compiling $<" - @sc $(CFLAGS) noprofile stdlib_main.c - -sas_profile.o : sas_profile.c - @echo "Compiling $<" - @sc $(CFLAGS) noprofile sas_profile.c - -stdio_vasprintf_hook_debug.o : stdio_vasprintf_hook_entry.c - @echo "Compiling $<" - @sc $(CFLAGS) define=__USE_MEM_TREES define=__MEM_DEBUG objname=stdio_vasprintf_hook_debug.o stdio_vasprintf_hook_entry.c - -stdio_vasprintf_debug.o : stdio_vasprintf.c - @echo "Compiling $<" - @sc $(CFLAGS) define=__USE_MEM_TREES define=__MEM_DEBUG objname=stdio_vasprintf_debug.o stdio_vasprintf.c - -stdlib_alloca_debug.o : stdlib_alloca.c - @echo "Compiling $<" - @sc $(CFLAGS) define=__USE_MEM_TREES define=__MEM_DEBUG objname=stdlib_alloca_debug.o stdlib_alloca.c - -stdlib_calloc_debug.o : stdlib_calloc.c - @echo "Compiling $<" - @sc $(CFLAGS) define=__USE_MEM_TREES define=__MEM_DEBUG objname=stdlib_calloc_debug.o stdlib_calloc.c - -stdlib_free_debug.o : stdlib_free.c - @echo "Compiling $<" - @sc $(CFLAGS) define=__USE_MEM_TREES define=__MEM_DEBUG objname=stdlib_free_debug.o stdlib_free.c - -stdlib_malloc_debug.o : stdlib_malloc.c - @echo "Compiling $<" - @sc $(CFLAGS) define=__USE_MEM_TREES define=__MEM_DEBUG objname=stdlib_malloc_debug.o stdlib_malloc.c - -string_strdup_debug.o : string_strdup.c - @echo "Compiling $<" - @sc $(CFLAGS) define=__USE_MEM_TREES define=__MEM_DEBUG objname=string_strdup_debug.o string_strdup.c - -unistd_getcwd_debug.o : unistd_getcwd.c - @echo "Compiling $<" - @sc $(CFLAGS) define=__USE_MEM_TREES define=__MEM_DEBUG objname=unistd_getcwd_debug.o unistd_getcwd.c - -############################################################################## - -ctype.lib : $(CTYPE_OBJ) - @date to $@ - -debug.lib : $(DEBUG_OBJ) - @date to $@ - -dirent.lib : $(DIRENT_OBJ) - @date to $@ - -errno.lib : $(ERRNO_OBJ) - @date to $@ - -fcntl.lib : $(FCNTL_OBJ) - @date to $@ - -libgen.lib : $(LIBGEN_OBJ) - @date to $@ - -locale.lib : $(LOCALE_OBJ) - @date to $@ - -math.lib : $(MATH_OBJ) - @date to $@ - -mount.lib : $(MOUNT_OBJ) - @date to $@ - -signal.lib : $(SIGNAL_OBJ) - @date to $@ - -socket.lib : $(SOCKET_OBJ) - @date to $@ - -stat.lib : $(STAT_OBJ) - @date to $@ - -stdio.lib : $(STDIO_OBJ) - @date to $@ - -stdlib.lib : $(STDLIB_OBJ) - @date to $@ - -string.lib : $(STRING_OBJ) - @date to $@ - -strings.lib : $(STRINGS_OBJ) - @date to $@ - -time.lib : $(TIME_OBJ) - @date to $@ - -unistd.lib : $(UNISTD_OBJ) - @date to $@ - -usergroup.lib : $(USERGROUP_OBJ) - @date to $@ - -utime.lib : $(UTIME_OBJ) - @date to $@ - -amiga.lib : $(AMIGA_OBJ) - @date to $@ - -############################################################################## - -c.lib: \ - c.lib_rev.o \ - amiga.lib ctype.lib debug.lib dirent.lib errno.lib fcntl.lib libgen.lib \ - locale.lib math.lib mount.lib signal.lib socket.lib stat.lib stdio.lib \ - stdlib.lib string.lib strings.lib time.lib unistd.lib usergroup.lib \ - utime.lib - @-delete >NIL: T:$@ T:$@.cmd - @echo >>T:$@.cmd c.lib_rev.o - @echo >>T:$@.cmd $(AMIGA_OBJ) - @echo >>T:$@.cmd $(CTYPE_OBJ) - @echo >>T:$@.cmd $(DEBUG_OBJ) - @echo >>T:$@.cmd $(DIRENT_OBJ) - @echo >>T:$@.cmd $(ERRNO_OBJ) - @echo >>T:$@.cmd $(FCNTL_OBJ) - @echo >>T:$@.cmd $(LIBGEN_OBJ) - @echo >>T:$@.cmd $(LOCALE_OBJ) - @echo >>T:$@.cmd $(MATH_OBJ) - @echo >>T:$@.cmd $(MOUNT_OBJ) - @echo >>T:$@.cmd $(SIGNAL_OBJ) - @echo >>T:$@.cmd $(SOCKET_OBJ) - @echo >>T:$@.cmd $(STAT_OBJ) - @echo >>T:$@.cmd $(STDIO_OBJ) - @echo >>T:$@.cmd $(STDLIB_OBJ) - @echo >>T:$@.cmd $(STRINGS_OBJ) - @echo >>T:$@.cmd $(STRING_OBJ) - @echo >>T:$@.cmd $(TIME_OBJ) - @echo >>T:$@.cmd $(UNISTD_OBJ) - @echo >>T:$@.cmd $(USERGROUP_OBJ) - @echo >>T:$@.cmd $(UTIME_OBJ) - oml T:$@ NIL: T:$@ T:$@.cmd + @echo >>T:$@.cmd c.lib_rev.o + @echo >>T:$@.cmd $(AMIGA_OBJ) + @echo >>T:$@.cmd $(CTYPE_OBJ) + @echo >>T:$@.cmd $(DEBUG_OBJ) + @echo >>T:$@.cmd $(DIRENT_OBJ) + @echo >>T:$@.cmd $(ERRNO_OBJ) + @echo >>T:$@.cmd $(FCNTL_OBJ) + @echo >>T:$@.cmd $(LIBGEN_OBJ) + @echo >>T:$@.cmd $(LOCALE_OBJ) + @echo >>T:$@.cmd $(MATH_OBJ) + @echo >>T:$@.cmd $(MOUNT_OBJ) + @echo >>T:$@.cmd $(SIGNAL_OBJ) + @echo >>T:$@.cmd $(SOCKET_OBJ) + @echo >>T:$@.cmd $(STAT_OBJ) + @echo >>T:$@.cmd $(STDIO_OBJ) + @echo >>T:$@.cmd $(STDLIB_OBJ) + @echo >>T:$@.cmd $(STRINGS_OBJ) + @echo >>T:$@.cmd $(STRING_OBJ) + @echo >>T:$@.cmd $(TIME_OBJ) + @echo >>T:$@.cmd $(UNISTD_OBJ) + @echo >>T:$@.cmd $(USERGROUP_OBJ) + @echo >>T:$@.cmd $(UTIME_OBJ) + oml T:$@