source: trunk/src/emx/mklib.smak@ 125

Last change on this file since 125 was 123, checked in by zap, 23 years ago

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.

  • Property cvs2svn:cvs-rev set to 1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.2 KB
Line 
1# This submakefile is included when a module needs to build a library.
2# For a list of additional variables that can be defined prior to including
3# this submakefile see build.txt.
4
5include common.smak
6
7# The rule for building an archive
8RULES += \
9 $(call FECHO,_@,$$.$(.TARG): $(.OBJS) $(.DEPS))$(NL)\
10 $(call FECHO,_@, $$(DO.LIBRARY))$(NL)
11
12# The rule for building the OMF variant of library from a.out format
13ifneq ($(findstring aout,$(.TKIND)),)
14# Remove the .a suffix from library name
15.TARGET := $(patsubst %$A,%,$(.TARGET))
16# Replace 'aout' with 'omf' in .TKIND
17.TKIND := $(subst aout,omf,$(.TKIND))
18# Compute the new output file directory
19.TKIND.DIR := $(subst $(SPACE),-,$(.TKIND))/
20# Append the .lib suffix to target name
21.TARGET := $(.TARGET)$A
22# Compute the name of target file to build
23.TARG@OMF := $(.TKIND.DIR)$(.TARGET)
24# The rule for building the xxx@omf variant of target
25.PHONY: $(.MODULE)@omf
26MODULES += $(.MODULE)@omf
27DO.INSTALL += $(call CP,$.$(.TARG@OMF),$(INS)$(.INSDIR)$(.TARGET))$(NL)
28.DIRS@OMF := $(dir $.$(.TARG@OMF))
29TARGDIRS += $(.DIRS@OMF)
30$(.MODULE)@omf: $(.MODULE) $(.DIRS@OMF) $.$(.TARG@OMF)
31endif # neq ($(findstring aout,$(.TKIND)),)
32
33include comend.smak
Note: See TracBrowser for help on using the repository browser.