Changeset 3902


Ignore:
Timestamp:
Oct 23, 2014, 10:17:55 PM (11 years ago)
Author:
bird
Message:

0.6: template.smak: speed things up with kmk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/libc-0.6/src/emx/templates.smak

    r3057 r3902  
    4040define def_lib_ar
    4141$$.$(.TARG): $(.OBJS) $(.DEPS)
     42ifdef KMK_VERSION
     43        @kmk_builtin_append -tn $$@.ar-script \
     44                "CREATE $$(@F)" \
     45                $(foreach x, $(filter %.o, $(sort $(.OBJS) $(.DEPS))), "ADDMOD $(x)") \
     46                "SAVE" \
     47                "END"
     48else
    4249        echo "CREATE $$(@F)" > $$@.ar-script
    4350        $(foreach x, $(filter %.o, $(sort $(.OBJS) $(.DEPS))), $(call def_lib_ar_addmod))
    4451        echo "SAVE" >> $$@.ar-script
    4552        echo "END" >> $$@.ar-script
     53endif
    4654        rm -f $$(@F) $$@
    4755        ar -M < $$@.ar-script
     
    5159
    5260# defined used by def_lib_ar to add a module to the script file. (blank line is imporant!)
    53 ifdef KMK_VERSION
    54 define def_lib_ar_addmod
    55         @kmk_builtin_append $$@.ar-script "ADDMOD $(x)"
    56        
    57 endef
    58 else
    5961define def_lib_ar_addmod
    6062        echo "ADDMOD $(x)" >> $$@.ar-script
    6163       
    6264endef
    63 endif
    6465
    6566# The rule for building an archive with imports
Note: See TracChangeset for help on using the changeset viewer.