1
0
mirror of https://github.com/adtools/clib2.git synced 2025-12-08 14:59:05 +00:00
Files
amiga-clib2/library/smakefile
Olaf Barthel 83f0977c0c - Added stubs for the Rexx Variables Interface code that used to
be part of amiga.lib. While comparable functionality is available
  in rexxsyslib.library V45, the new stubs might be helpful during
  porting. Care must be taken since these functions don't work
  exactly like the originals.

- Integrated strlcpy() and strlcat() which are intended to be safer
  replacements for strncpy() and strncat().

- The program's task priority is now configurable through an external
  variable '__priority'.

- The process name to be used when detaching can be configured through
  the new '__process_name' variable.

- The minimum required operating system version can be configured
  through the new '__minimum_os_lib_version' variable; a matching
  error message can be provided through the new '__minimum_os_lib_error'
  variable.

- The default console window specification can be overriden through
  the new '__stdio_window_specification' variable.

- The socket initialization code did not set up a reference to the
  'h_errno' variable correctly. This had the effect of making name
  and address resolution errors trash the 'errno' variable instead
  and leaving 'h_errno' always set to 0. Fixed.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14771 87f5fb63-7c3d-0410-a384-fd976d0f7a62
2004-11-14 11:06:29 +00:00

781 lines
16 KiB
Plaintext

#
# $Id: smakefile,v 1.11 2004-11-14 11:06:27 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
#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__
##############################################################################
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_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_data.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_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_setlocale.o
MATH_OBJ = \
math_acos.o \
math_asin.o \
math_atan.o \
math_atan2.o \
math_ceil.o \
math_cos.o \
math_cosh.o \
math_data.o \
math_exp.o \
math_fabs.o \
math_floor.o \
math_fmod.o \
math_frexp.o \
math_hypot.o \
math_init_exit.o \
math_isinf.o \
math_isnan.o \
math_ldexp.o \
math_log.o \
math_log10.o \
math_logb.o \
math_modf.o \
math_pow.o \
math_rint.o \
math_rintf.o \
math_sin.o \
math_sinh.o \
math_sqrt.o \
math_tan.o \
math_tanh.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_data.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_data.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_data.o \
stdio_dropiobreadbuffer.o \
stdio_duplicate_fd.o \
stdio_fclose.o \
stdio_fdhookentry.o \
stdio_feof.o \
stdio_ferror.o \
stdio_fflush.o \
stdio_flush.o \
stdio_fgetc.o \
stdio_fgetpos.o \
stdio_fgets.o \
stdio_filliobreadbuffer.o \
stdio_findvacantfdentry.o \
stdio_findvacantiobentry.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_fsetpos.o \
stdio_ftell.o \
stdio_fwrite.o \
stdio_getc.o \
stdio_getchar.o \
stdio_get_file_descriptor.o \
stdio_gets.o \
stdio_growfdtable.o \
stdio_growiobtable.o \
stdio_initializefd.o \
stdio_initializeiob.o \
stdio_init_exit.o \
stdio_iobhookentry.o \
stdio_locksemaphorename.o \
stdio_nostdio.o \
stdio_openiob.o \
stdio_perror.o \
stdio_popen.o \
stdio_printf.o \
stdio_putc.o \
stdio_putchar.o \
stdio_puts.o \
stdio_remove.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_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
STDLIB_OBJ = \
stdlib_abort.o \
stdlib_abs.o \
stdlib_assertion_failure.o \
stdlib_atexit.o \
stdlib_atof.o \
stdlib_atoi.o \
stdlib_atol.o \
stdlib_bsearch.o \
stdlib_calloc.o \
stdlib_checkdetach.o \
stdlib_constructor_begin.o \
stdlib_constructor.o \
stdlib_constructor_end.o \
stdlib_data.o \
stdlib_default_pool_size.o \
stdlib_default_puddle_size.o \
stdlib_destructor.o \
stdlib_detach.o \
stdlib_dosbase.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_init_exit.o \
stdlib_isresident.o \
stdlib_labs.o \
stdlib_ldiv.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_putenv.o \
stdlib_qsort.o \
stdlib_rand.o \
stdlib_realloc.o \
stdlib_red_black.o \
stdlib_setenv.o \
stdlib_setjmp.o \
stdlib_shell_escape.o \
stdlib_showerror.o \
stdlib_srand.o \
stdlib_stackcheck.o \
stdlib_stackoverflow.o \
stdlib_stackargbytes.o \
stdlib_stacksafezone.o \
stdlib_stacksize.o \
stdlib_stack_usage.o \
stdlib_startup.o \
stdlib_strtod.o \
stdlib_strtol.o \
stdlib_strtoul.o \
stdlib_strtoll.o \
stdlib_strtoull.o \
stdlib_swapstack.o \
stdlib_system.o \
stdlib_unsetenv.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_strxfrm.o
STRINGS_OBJ = \
strings_strcasecmp.o \
strings_strncasecmp.o
TIME_OBJ = \
time_asctime.o \
time_clock.o \
time_converttime.o \
time_ctime.o \
time_data.o \
time_difftime.o \
time_gettimeofday.o \
time_gmtime.o \
time_localtime.o \
time_mktime.o \
time_numbertostring.o \
time_strftime.o \
time_time.o
UNISTD_OBJ = \
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_fdopen.o \
unistd_fileno.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_time_delay.o \
unistd_timer.o \
unistd_translatea2u.o \
unistd_translaterel.o \
unistd_translateu2a.o \
unistd_truncate.o \
unistd_unix_path_semantics.o \
unistd_unlink.o \
unistd_usleep.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
##############################################################################
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_mem_debug.h
stdlib_data.o : stdlib_data.c stdlib_mem_debug.h
stdio_openiob.o : stdio_openiob.c stdlib_mem_debug.h
stdlib_alloca.o : stdlib_alloca.c stdlib_mem_debug.h
stdlib_calloc.o : stdlib_calloc.c stdlib_mem_debug.h
stdlib_free.o : stdlib_free.c stdlib_mem_debug.h
stdlib_init_exit.o : stdlib_init_exit.c stdlib_mem_debug.h
stdlib_malloc.o : stdlib_malloc.c stdlib_mem_debug.h
stdlib_realloc.o : stdlib_realloc.c stdlib_mem_debug.h
stdlib_red_black.o : stdlib_red_black.c stdlib_mem_debug.h
dirent_closedir.o : dirent_closedir.c stdlib_mem_debug.h
dirent_opendir.o : dirent_opendir.c stdlib_mem_debug.h
fcntl_open.o : fcntl_open.c stdlib_mem_debug.h
socket_select.o : socket_select.c stdlib_mem_debug.h
stdio_fclose.o : stdio_fclose.c stdlib_mem_debug.h
stdio_growfdtable.o : stdio_growfdtable.c stdlib_mem_debug.h
stdio_growiobtable.o : stdio_growiobtable.c stdlib_mem_debug.h
stdio_init_exit.o : stdio_init_exit.c stdlib_mem_debug.h
stdio_popen.o : stdio_popen.c stdlib_mem_debug.h
stdio_setvbuf.o : stdio_setvbuf.c stdlib_mem_debug.h
stdio_tmpfile.o : stdio_tmpfile.c stdlib_mem_debug.h
stdlib_atexit.o : stdlib_atexit.c stdlib_mem_debug.h
stdlib_setenv.o : stdlib_setenv.c stdlib_mem_debug.h
stdlib_startup.o : stdlib_startup.c stdlib_mem_debug.h
stdlib_system.o : stdlib_system.c stdlib_mem_debug.h
stdlib_unsetenv.o : stdlib_unsetenv.c stdlib_mem_debug.h
unistd_getcwd.o : unistd_getcwd.c stdlib_mem_debug.h
unistd_unlink.o : unistd_unlink.c stdlib_mem_debug.h
unistd_wildcard_expand.o : unistd_wildcard_expand.c stdlib_mem_debug.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
##############################################################################
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:$@ <T:$@.cmd
@copy buf=0 T:$@ $@
@-delete T:$@ T:$@.cmd
##############################################################################
mkid:
mkid \#?.(c|h|asm|i) include/\#?.(c|h|asm|i) include/sys/\#?.(c|h|asm|i)
update:
mkid -v -u