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]
Other format: [Raw text]

Custom build steps in CDL


I'm trying to set up a set of custom build steps in a CDL component that I
am assembling.  I've been trying to use the instructions in the CDL
documentation, but they appear to be a little out of date.

Basically, I have a set of binary files in my "current/src" directory that
all end in "*.bin".  I'd like to take all these files and package them into
.o files with the following command:

	$(OBJCOPY) -I binary -O elf32-big <SRC .bin file> <DST .o file>

Then, I'd like the resulting .o files to end up in the libtarget.a file
where their symbols will be linked into my code.

I've tried using the "make_object" CDL option in my CDL file to build these
files, but have had a lot of trouble with pathnames and object file
prefixes.  So far, the best I've been able to do is:

	make_object {
		hres.o: src/hres.bin
			$(OBJCOPY) -I binary -O elf32-big $< $@
	}

However, this eventually fails with the AR command looking for
"$(OBJECT_PREFIX)_hres.o".  If I use OBJECT_PREFIX to generate the "correct"
target, then the AR command fails while looking for
"$(OBJECT_PREFIX)_$(OBJECT_PREFIX)_hres.o".

Anyways, I'm not convinced this is the correct way to do this and it's also
somewhat painful since I need to copy the make_object block about 20 times
to do all my files.  Is there a way to set-up a rule to build this, or a
better way to do this?

Thanks in advance.

--
Dan Jakubiec
Systech Corporation
dan@systech.com


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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