Take a look at this makefile of my multisegment application:

>OBJ=app.o app_segments.o
>SRC=app.c 
>
>all: app.prc
>
>app.prc: app.def app.ro app $(SRC)
>       build-prc.exe -o app.prc app.def app app.ro
>       
>app_segments.ld app_segments.s: app.def
>       m68k-palmos-multigen.exe -b app_segments app.def
>       
>app.ro: app.rcp
>       pilrc.exe -ro app.rcp
>       
>$(OBJ): $(SRC) app_segments.s
>       m68k-palmos-gcc.exe -c $^ app_segments.s
>       
>app: app_segments.ld $(OBJ) $(SRC)
>       m68k-palmos-gcc.exe -o app $(OBJ) app_segments.ld -lPalmOSGlue
>


The multisegment definition is obtained by using this definition in app.def:
>multiple code { "SEGMENT2"}

and than declaring each function that I want to place in the segment named SEGMENT2 as 
the example below:

>#define Seg2 __attribute__ (section("SEGMENT2"))
>Int16 MyFunc(param1, param2, ...) Seg2;

Than, using multigen as the makefile and including generated scripts and asm code as 
shown, the application will easily be working.

BrownB
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to