Ignore:
Timestamp:
May 12, 2003, 12:48:43 PM (22 years ago)
Author:
zap
Message:

Started the work for re-designing the EMX C runtime library to not require
EMX.DLL. The new design is projected to be as follows:

  • all emx syscalls are replaced with the routines from the old sys.lib library which is now compilable in both a.out and OMF formats.
  • the sys.a library should be made replaceable and selectable by some gcc switch (e.g. -msyslib=emx would link with emx.a instead of sys.a which would give almost full backward compatibility with emx).
  • All C functions names were renamed to not contain the starting underscore (e.g. fopen and not _fopen). The underscored aliases will be added later with the c_alias library (which will be generated automatically from all public symbols of libc; any exported symbol that do not start with an underscore will be given an underscored alias unless such a symbol is already defined).

Also a lot of updates to the building system. It is now much faster (thanks
to Knut's suggestion of using ash's builtin echo).
Also re-wrote thunk1.asm and thunk2.asm to GAS format; this removes the need
for MASM and makes it possible to use 16-bit functions in a.out programs
without the need for EMX.DLL.
Also made a lot of small changes I don't remember now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/common.smak

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r122 r123  
    1919.tmp := omf
    2020endif # neq ($(findstring aout,$(.TKIND)),)
    21 ifneq ($(findstring mt,$(.TKIND)),)
    22 .tmp += mt
    23 else
    24 .tmp += st
    25 endif # neq ($(findstring mt,$(.TKIND)),)
    2621ifneq ($(findstring prof,$(.TKIND)),)
    2722.tmp += prof
     
    2924.TKIND := $(.tmp)
    3025.TKIND.DIR := $(subst $(SPACE),-,$(.TKIND))/
    31 .tmp :=
     26
     27ifdef .TARGET
    3228
    3329# .TARG is same as .TARGET except that it has a st/ or mt/ prefix
     
    3531
    3632ifdef .INSDIR
    37 DO.INSTALL += cp.exe $.$(.TARG) $(INS)$(.INSDIR)$(.TARGET)$(NL)
     33DO.INSTALL += $(call CP,$.$(.TARG),$(INS)$(.INSDIR)$(.TARGET))$(NL)
    3834INSDIRS += $(INS)$(.INSDIR)
    3935endif # def .INSDIR
     36
     37# We know how to create dependency files for .c and .cpp files
     38.tmp := $(strip $(filter %.c,$(.TSRC)) $(filter %.cpp,$(.TSRC)))
     39ifdef .tmp
     40# Read the dependency file
     41-include $.$(.TKIND.DIR)dep-$(.TARGET).smak
     42
     43TARGDEPEND += $.$(.TKIND.DIR)dep-$(.TARGET).smak
     44
     45ifdef BUILD_DEPS
     46# How to build the dependency file
     47$.$(.TKIND.DIR)dep-$(.TARGET).smak: $(.tmp)
     48        $(DO.DEPS)
     49endif # BUILD_DEPS
     50endif # def .tmp
     51
     52endif # def .TARGET
    4053
    4154# If module has any source files, find respective object file names
     
    4760TARGDIRS += $(.DIRS)
    4861
     62ifdef .MDEP
     63$(.MODULE): $(.MDEP)
     64.MDEP :=
     65endif
     66
     67ifdef .MODULE
    4968$(.MODULE): $(.DIRS) $.$(.TARG)
     69endif
    5070
    5171# Remove the names of files for which we already generated build rules
     
    6181BUILD.RULES += $(.TSRC)
    6282.TSRC := $(filter-out $(.OBJS),$(subst :, ,$(.TSRC)))
    63 
    64 #.TSRC := $(foreach x,$(.TSRC),$(if $(findstring $(call OBJFILE,$x):$x,$(BUILD.RULES)),,$x))
    65 #BUILD.RULES += $(foreach x,$(.TSRC),$(if $(findstring $(call OBJFILE,$x):$x,$(BUILD.RULES)),,$(call OBJFILE,$x):$x))
    6683
    6784# Generate compilation rules for C files
Note: See TracChangeset for help on using the changeset viewer.