Here is the skeleton of what I'm doing

# create a .a file  empty
AR_CREATE = if [ ! -f $(PRD_TREE)/$(1)/$(2)/lib/lib$(2).a ] ; then \
                $(AR) $(AR_CREATE_OPT)
$(PRD_TREE)/$(1)/$(2)/lib/lib$(2).a ; \
                $$(CHMOD) $(PRD_TREE)/$(1)/$(2)/lib/lib$(2).a ; \
            fi

# add a file to a archive
AR_ADD = $(NM) $@ | grep "main.*extern|entry.*CODE" > /dev/null ; \
        if [ $$? -ne 0 ] ; then $(AR) $(AR_OPT) $(LIB) $@ > /dev/null ;
fi

# short hand to create dependencies
MKDEP = $(MAKEDEPEND) -proj $(1) -bb $(2) -ifile $$< $$(INCLUDE)

# compile .c files to .o
COMP_CC = @$$(CC) $$(CCFLAGS) $$(INCLUDE) -o $$@ -c $$< ; \
        $(MKDEP) ; $(AR_CREATE); $$(AR_ADD)

$(PRD_TREE)/$(1)/$(2)/%.o : $(SRC_TREE)/$(1)/$(2)/$(3)/src/%.c ;
$(COMP_CC)

> -----Original Message-----
> From: Paul Smith [mailto:[EMAIL PROTECTED] On Behalf Of Paul D. Smith
> Sent: Thursday, May 18, 2006 8:36 AM
> To: PATTON, BILLY (SBCSI)
> Cc: [email protected]
> Subject: RE: serial vs parallel for ar
> 
> 
> %% "PATTON, BILLY \(SBCSI\)" <[EMAIL PROTECTED]> writes:
> 
>   pb> I have to put everything in an archive and I have to parallel
>   pb> process These things ar not optional.
> 
> You have to provide the basic information in order for us to advise
> you.  These are not optional either :-).
> 
> 
> Cheers!
> 
> -- 
> --------------------------------------------------------------
> -----------------
>  Paul D. Smith <[EMAIL PROTECTED]>          Find some GNU make tips at:
>  http://www.gnu.org                      http://make.paulandlesley.org
>  "Please remain calm...I may be mad, but I am a 
> professional." --Mad Scientist
> 


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to