This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

how to compile with shared object in arm-elf-gcc


Hi,

I ever compiled an application using arm-linux-gcc
with shared object *.so and now I want to compile the
same application with arm-elf-gcc, because it seems
that arm-elf-gcc using independent library.

-Can any one tell/give me some examples, how to
compile in arm-elf-gcc (the setting, etc)?

this is a bit of the makefile:

#   the common header file directory.

DBSTARINC = $(RELHOME)/include
INCLUDE   = -I$(DBSTARINC)

## Compilation/linking options
------------------------

CFLAGS          = $(DEBUG) $(OPTIMIZE) $(INCLUDE)
LDBINFLAGS      = $(DEBUG)

#directory where to put object
PLATFORM   = lnx    

CC         = arm-linux-gcc
CFLAGS     += -DUNIX -DLINUX -I/usr/local/arm/include
LDBIN      = arm-linux-gcc
LDBINFLAGS += -o
LD         = arm-linux-gcc
LDFLAGS    += $(DEBUG) -shared -o
SYSLIBS    +=
LIBSFX     = so
THREADLIBS = -lpthread

#######################################################
#   db.* libraries

RTSRC  = $(RELHOME)/runtime
RTLDIR = $(RELHOME)/runtime/$(PLATFORM)
PSPDIR = $(RELHOME)/psp/$(PLATFORM)

RTLIB  = $(RTLDIR)/libdbstar.$(LIBSFX)
PSPLIB = $(PSPDIR)/libpsp.$(LIBSFX)

RTLIBLINK  = -L$(RTLDIR) -ldbstar
PSPLIBLINK = -L$(PSPDIR) -lpsp

#######################################################
#   Target variables

APPS    = $(addprefix $(PLATFORM)/, $(APP))

LIBS    = $(addsuffix .$(LIBSFX), $(addprefix
$(PLATFORM)/, $(LIB)))

#######################################################
#   Default compilation rules

$(PLATFORM)/%.o: %.c
	$(CC) $(CCONLY) $(CFLAGS) -c $< -o $@

$(PLATFORM)/%.o: $(RTSRC)/%.c
	$(CC) $(CCONLY) $(CFLAGS) -DNOLIB -c $< -o $@



Best regards,
Piteir


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]