Changeset 107 for trunk/m2

Show
Ignore:
Timestamp:
04/03/06 21:55:07 (3 years ago)
Author:
krobillard
Message:

m2 - Can now build Mac OS universal binaries.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/m2/m2_macx.r

    r93 r107  
    55 
    66macx: func [blk] [do blk] 
     7 
     8bundle:    does [m2/ct/cfg_bundle: true] 
     9universal: does [m2/ct/cfg_universal: true] 
    710 
    811eol: "^/"  
     
    9295    built_obj_rule: none 
    9396 
     97    cfg_bundle: none 
     98    cfg_universal: none 
     99 
    94100    obj_macro: none 
    95101 
     
    110116        if cfg/release [ 
    111117            cflags {-O3 -DNDEBUG} 
     118        ] 
     119 
     120        if cfg_universal [ 
     121            cflags {-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386} 
     122            lflags {-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386} 
    112123        ] 
    113124 
     
    122133            ][ 
    123134                include_from {/Library/Frameworks/QtCore.framework/Headers} 
    124                 lflags {-framework QtCore} 
     135                cflags {-F/Library/Frameworks} 
     136                lflags {-F/Library/Frameworks -framework QtCore} 
     137                lflags {-framework Carbon} 
    125138                do bind cfg/qt in qt-includes 'gui 
    126139            ] 
     
    143156                libs_from %"$(QTDIR)/lib" {qt} 
    144157                ; If Qt is compiled as a static library. 
    145                 lflags {-framework carbon -lz} 
     158                lflags {-framework Carbon -lz} 
    146159            ] 
    147160            ;[ 
    148                 ;    lflags {-bind_at_load -framework QtGui -framework QtCore} 
    149             ;    lflags {-framework carbon} 
     161            ;    lflags {-bind_at_load -framework QtGui -framework QtCore} 
     162            ;    lflags {-framework Carbon} 
    150163            ;] 
    151164        ] 
     
    196209            { $(} uc {_LIBS)} eol 
    197210        ] 
     211 
     212        ;if cfg_bundle [ emit {^/# bundle} ] 
    198213    ] 
    199214] 
     
    209224    [ 
    210225        emit [ eol output_file ": " obj_macro 
    211             "^/^(tab)ar rc $@ " obj_macro " $(" uppercase name "_LFLAGS)" 
     226            "^/^(tab)ar rc $@ " obj_macro  ; " $(" uppercase name "_LFLAGS)" 
    212227            "^/^(tab)ranlib $@^/" 
    213228        ] 
     
    249264CC       = gcc 
    250265CXX      = g++ 
    251 LINK    = gcc 
     266LINK    = gcc 
    252267LINK_CXX = g++ 
    253268TAR      = tar -cf 
    254 GZIP    = gzip -9f 
     269GZIP    = gzip -9f 
    255270MOC      = <moc_exe> 
    256271