Changeset 213


Ignore:
Timestamp:
May 21, 2003, 11:57:27 PM (22 years ago)
Author:
zap
Message:

o Added OS/2 Unicode API headers and import file.
o Modified most standard functions in .s files to use the _std_ prefix.
o Fixed c_alias.a build rules so that it uses the correct c.a file (either

debug or optimized depending on build mode).

Location:
trunk/src/emx
Files:
6 added
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/Makefile

    • Property cvs2svn:cvs-rev changed from 1.11 to 1.12
    r212 r213  
    8282DO.LINK.dll = $(LD) $(strip $(LDFLAGS.DLL) $(filter-out -l%,$1)) -o $@ $(^O) $(^DEF) $(^LIB) $(filter -l%,$1)
    8383
    84 # emxbind tool - you can depend on EMXBIND.BUILT :-)
    85 EMXBIND = $(if $(wildcard $(EMXBIND.BUILT)),$(EMXBIND.BUILT),emxbind$E)
    86 EMXBIND.BUILT = $.$(TOOLFMT)/emxbind$E
     84# emxbind tool
     85EMXBIND = $(call FINDTOOL,emxbind)
    8786# emxbind flags
    8887EMXBINDFLAGS = -q $(EMXBINDFLAGS.$(MODE))
     
    103102DO.LIBRARY = $(call RM,$@); $(AR) $(ARFLAGS)$1 $@ $(^O)
    104103
    105 # The tool to extract exports from object files and archives
    106 EMXEXP = $(if $(wildcard $(EMXEXP.BUILT)),$(EMXEXP.BUILT),emxexp$E)
    107 EMXEXP.BUILT = $./$(TOOLFMT)/emxexp$E
     104# The tool to extract exports from object files and archives,
     105# removing unused stuff (like empty lines and comments)
     106# and sorting alphabetically (looks nicer).
     107EMXEXP = $(call FINDTOOL,emxexp)
     108EMXEXPFLAGS = -u
     109DO.EMXEXP = $(EMXEXP) $(strip $(EMXEXPFLAGS) $1) $^ | sed -e "/^$$/d" -e "/^ *;/d" | sort -d >>$@
    108110
    109111# The tool to create import libraries
    110 IMPLIB = $(if $(wildcard $(IMPLIB.BUILT)),$(IMPLIB.BUILT),emximp$E)
    111 IMPLIB.BUILT = $./$(TOOLFMT)/emximp$E
     112IMPLIB = $(call FINDTOOL,emximp)
    112113IMPLIBFLAGS.prof = -m
    113114IMPLIBFLAGS.KIND = $(foreach x,$(subst -, ,$(firstword $(subst /, ,$(subst $.,,$@)))),$(IMPLIBFLAGS.$x))
     
    122123
    123124# How to convert an a.out file to the OMF format
    124 EMXOMF = $(if $(wildcard $(EMXOMF.BUILT)),$(EMXOMF.BUILT),emxomf$E)
    125 EMXOMF.BUILT = $./$(TOOLFMT)/emxomf$E
    126 DO.AOUT2OMF = $(EMXOMF) $(strip $1 -o) $@ $<
     125EMXOMF = $(call FINDTOOL,emxomf)
     126DO.EMXOMF = $(EMXOMF) $(strip $1 -o) $@ $<
    127127
    128128# How to filter just the object files from $^
     
    134134# How to filter the libraries from $^
    135135^LIB = $(filter %.$(if $(findstring omf,$(.TKIND)),lib,a),$^)
     136# This function finds a tool: if it has been already built, prefer it
     137FINDTOOL = $(firstword $(wildcard $.$(TOOLFMT)/$1$E) $(wildcard $(OUT)dbg/aout/$1$E) $1)
    136138
    137139# A newline
     
    187189TARGDEPEND :=
    188190
    189 .PHONY: default help all clean install cleandep cleandepend dep depend depdone
     191.PHONY: default help all tools clean install cleandep cleandepend dep depend depdone
    190192.SUFFIXES:
    191193.SUFFIXES: .c .cpp .asm .s .o .exe .dll .a .lib .obj
     
    207209help:
    208210        @$(call ECHO,$(SEP))
    209         @$(call ECHO,Welcome to $(PACKAGE) build system!)
     211        @$(call ECHO,Welcome to $(PACKAGE) version $(VERSION) build system!)
    210212        @$(call ECHO,$(COPYRIGHT))
    211213        @$(call ECHO,To build something, type 'make {target} {vars}', where {target} is one of:)
    212214        @$(call ECHO,    all - build all available modules)
    213215        @$(call ECHO,    {module-name} - build just a particular module)
     216        @$(call ECHO,    tools - build just the tools)
    214217        @$(call ECHO,    clean - remove all generated files (remove all built files))
    215218        @$(call ECHO,    install - generate a installation tree in $(INS))
     
    247250# bird: add rule for forcibly re-generating the rules.
    248251rules:
    249         @$(call RM,$(OUT)genrules.smak)
    250         $(MAKE) $(OUT)genrules.smak
    251 
    252 $(OUT)genrules.smak: $(SUBMAK) # Makefile $(wildcard *.smak)
    253         @$(call MKDIR,$(OUT))
     252        @$(call RM,$.genrules.smak)
     253        $(MAKE) $.genrules.smak
     254
     255$.genrules.smak: $(SUBMAK) # Makefile $(wildcard *.smak)
     256        @$(call MKDIR,$.)
    254257        @$(call ECHO,Please wait, rebuilding make rules ...)
    255258        @$(call RM,$@)
     
    259262# The general a.out -> OMF conversion rule for object files
    260263$.omf/%.obj: $.aout/%.o
    261         $(call DO.AOUT2OMF)
     264        $(call DO.EMXOMF)
    262265
    263266# The general a.out -> OMF conversion rule for libraries
    264267$.omf%.lib: $.aout%.a
    265         $(call DO.AOUT2OMF)
    266 
    267 -include $(OUT)genrules.smak
     268        $(call DO.EMXOMF)
     269
     270-include $.genrules.smak
  • trunk/src/emx/include/emx/asm386.h

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r212 r213  
    7373#define FP_INFINITE     3
    7474#define FP_NAN          4
     75
     76/* Macros for defining standard libc functions */
     77
     78#define CONCAT(x,y) x ## y
     79#define _STD(x) CONCAT(__std_,x)
  • trunk/src/emx/include/emx/syscalls.h

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r212 r213  
    5353struct timeb;
    5454struct timeval;
    55 struct _fd_set;
    5655
    5756struct _find
     
    104103{
    105104  int              nfds;
    106   struct _fd_set * readfds;
    107   struct _fd_set * writefds;
    108   struct _fd_set * exceptfds;
     105  struct fd_set * readfds;
     106  struct fd_set * writefds;
     107  struct fd_set * exceptfds;
    109108  struct timeval * timeout;
    110109};
  • trunk/src/emx/mkexe.smak

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r212 r213  
    44
    55include common.smak
     6
     7tools: $(.MODULE)
    68
    79# Linking rule
  • trunk/src/emx/src/emxexp/emxexp.c

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r212 r213  
    209209      }
    210210    else if ((sym_ptr[i].type == N_EXT ||
     211              sym_ptr[i].type == (N_BSS|N_EXT) ||
    211212              (weak_flag && sym_ptr[i].type == N_WEAKB)) &&
    212213             sym_ptr[i].value != 0)
  • trunk/src/emx/src/lib/alias/alias.smak

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r212 r213  
    1414include common.smak
    1515
    16 ALIAS.FUNCS = $(shell gawk -f src/lib/alias/aliasfuncs.awk _)
    17 ALIAS._FUNCS = $(shell gawk -f src/lib/alias/aliasfuncs.awk __)
     16ALIAS.FUNCS = $(shell gawk -f src/lib/alias/aliasfuncs.awk $. _)
     17ALIAS._FUNCS = $(shell gawk -f src/lib/alias/aliasfuncs.awk $. __)
    1818
    1919$(.MODULE): $.$(.TARG)
  • trunk/src/emx/src/lib/alias/aliasfuncs.awk

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r212 r213  
    3535
    3636BEGIN {
    37   gulp("out/dbg/aout/c.a");
    38   gulp("out/dbg/aout/c_app.a");
     37  gulp(ARGV[1]"aout/c.a");
     38  gulp(ARGV[1]"aout/c_app.a");
    3939
    40   prefix = ARGV[1];
     40  prefix = ARGV[2];
    4141
    4242  for (x in stdfuncs)
  • trunk/src/emx/src/lib/app/Attic/386/crt2.s

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r212 r213  
    99
    1010        .globl  __entry1
    11         .globl  __std_environ
     11        .globl  _STD(environ)
    1212        .globl  __org_environ
    1313
     
    1919        xorl    %ebp, %ebp      /* End of stack frames */
    2020        leal    (%esp), %edi    /* argv[] */
    21         movl    %edi, __std_environ
     21        movl    %edi, _STD(environ)
    2222        movl    %edi, __org_environ
    2323        pushl   %edi            /* envp */
     
    3939        .bss
    4040
    41 __std_environ:  .space  4
     41_STD(environ):  .space  4
    4242__org_environ:  .space  4
  • trunk/src/emx/src/lib/str/386/memchr.s

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r212 r213  
    33#include <emx/asm386.h>
    44
    5         .globl _memchr
     5        .globl _STD(memchr)
    66
    77/ void *memchr (const void *s, int c, size_t n)
     
    2323        ALIGN
    2424
    25 _memchr:
     25_STD(memchr):
    2626        PROFILE_NOFRAME
    2727        pushl   %edi
  • trunk/src/emx/src/lib/str/386/memcmp.s

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r212 r213  
    33#include <emx/asm386.h>
    44
    5         .globl _memcmp
     5        .globl _STD(memcmp)
    66
    77/ int memcmp (const void *s1, const void *s2, size_t n)
     
    2525        ALIGN
    2626
    27 _memcmp:
     27_STD(memcmp):
    2828        PROFILE_NOFRAME
    2929        pushl   %esi
  • trunk/src/emx/src/lib/str/386/memcpy.s

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r212 r213  
    33#include <emx/asm386.h>
    44
    5         .globl _memcpy
     5        .globl _STD(memcpy)
    66
    77/ void *memcpy (void *s1, const void *s2, size_t n)
     
    2020        ALIGN
    2121
    22 _memcpy:
     22_STD(memcpy):
    2323        PROFILE_NOFRAME
    2424        pushl   %esi
  • trunk/src/emx/src/lib/str/386/memmove.s

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r212 r213  
    33#include <emx/asm386.h>
    44
    5         .globl _memmove
     5        .globl _STD(memmove)
    66
    77/ void *memmove (void *s1, const void *s2, size_t n)
     
    2424        ALIGN
    2525
    26 _memmove:
     26_STD(memmove):
    2727        PROFILE_NOFRAME
    2828        pushl   %esi
  • trunk/src/emx/src/lib/str/386/memset.s

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r212 r213  
    33#include <emx/asm386.h>
    44
    5         .globl _memset
     5        .globl _STD(memset)
    66
    77/ void *memset (void *s, int c, size_t n)
     
    2020        ALIGN
    2121
    22 _memset:
     22_STD(memset):
    2323        PROFILE_NOFRAME
    2424        pushl   %edi
  • trunk/src/emx/src/lib/str/386/strcat.s

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r212 r213  
    33#include <emx/asm386.h>
    44
    5         .globl _strcat
     5        .globl _STD(strcat)
    66
    77/ char *strcat (char *string1, const char *string2)
     
    2323        ALIGN
    2424
    25 _strcat:
     25_STD(strcat):
    2626        PROFILE_NOFRAME
    2727        pushl   %esi
  • trunk/src/emx/src/lib/str/386/strchr.s

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r212 r213  
    33#include <emx/asm386.h>
    44
    5         .globl _strchr
     5        .globl _STD(strchr)
    66
    77/ char *strchr (const char *string, int c)
     
    1919        ALIGN
    2020
    21 _strchr:
     21_STD(strchr):
    2222        PROFILE_NOFRAME
    2323        pushl   %esi
  • trunk/src/emx/src/lib/str/386/strcmp.s

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r212 r213  
    33#include <emx/asm386.h>
    44
    5         .globl _strcmp
     5        .globl _STD(strcmp)
    66
    77/ int strcmp (const char *string1, const char *string2)
     
    2424        ALIGN
    2525
    26 _strcmp:
     26_STD(strcmp):
    2727        PROFILE_NOFRAME
    2828        pushl   %esi
  • trunk/src/emx/src/lib/str/386/strcpy.s

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r212 r213  
    33#include <emx/asm386.h>
    44
    5         .globl _strcpy
     5        .globl _STD(strcpy)
    66
    77/ char *strcpy (char *string1, const char *string2)
     
    2121        ALIGN
    2222
    23 _strcpy:
     23_STD(strcpy):
    2424        PROFILE_NOFRAME
    2525        pushl   %esi
  • trunk/src/emx/src/lib/str/386/strlen.s

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r212 r213  
    33#include <emx/asm386.h>
    44
    5         .globl _strlen
     5        .globl _STD(strlen)
    66
    77/ size_t strlen (const char *string)
     
    2020        ALIGN
    2121
    22 _strlen:
     22_STD(strlen):
    2323        PROFILE_NOFRAME
    2424        pushl   %edi
  • trunk/src/emx/src/lib/str/386/strrchr.s

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r212 r213  
    33#include <emx/asm386.h>
    44
    5         .globl _strrchr
     5        .globl _STD(strrchr)
    66 
    77/ char *strrchr (const char *string, int c)
     
    2323        ALIGN
    2424
    25 _strrchr:
     25_STD(strrchr):
    2626        PROFILE_NOFRAME
    2727        pushl   %edi
  • trunk/src/emx/src/lib/sys/__fork.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
  • trunk/src/emx/src/lib/sys/__select.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
  • trunk/src/emx/src/lib/sys/__settime.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
  • trunk/src/emx/src/lib/sys/__ttyname.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
Note: See TracChangeset for help on using the changeset viewer.