Changeset 1128


Ignore:
Timestamp:
Jan 31, 2004, 10:02:54 AM (21 years ago)
Author:
bird
Message:

Use archiver scripts to work around too long parameter lists.

Location:
trunk/src/emx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/emx/mklib.smak

    • Property cvs2svn:cvs-rev changed from 1.7 to 1.8
    r1127 r1128  
    1717
    1818# The rule for building an archive
     19ifneq ($(findstring aout,$(.TKIND)),)
     20$(eval $(call def_lib_ar))
     21else
    1922$(eval $(call def_lib))
     23endif
    2024
    2125# Rule for stripping debug info.
  • TabularUnified trunk/src/emx/templates.smak

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r1127 r1128  
    3131endef
    3232
    33 # The rule for building an archive
     33# generic rule for building libs.
    3434define def_lib
    3535$$.$(.TARG): $(.OBJS) $(.DEPS)
    36         $$(DO.LIBRARY)
     36        $$(call DO.LIBRARY,$(^O))
     37endef
     38       
     39# The rule for building an archive with lot's of arguments.
     40define def_lib_ar
     41$$.$(.TARG): $(.OBJS) $(.DEPS)
     42        echo "CREATE $$@" > $$@.ar-script
     43        $(foreach x, $(filter %.o, $(sort $(.OBJS) $(.DEPS))), $(call def_lib_ar_addmod))
     44        echo "SAVE" >> $$@.ar-script
     45        echo "END" >> $$@.ar-script
     46        rm -f $$@
     47        ar -M < $$@.ar-script
     48       
     49endef
     50
     51# defined used by def_lib_ar to add a module to the script file.
     52define def_lib_ar_addmod
     53        echo "ADDMOD $(x)" >> $$@.ar-script
     54       
    3755endef
    3856
Note: See TracChangeset for help on using the changeset viewer.