Re: [Sdcc-user] Makefile multiple targets with define variable

2011-10-24 Thread Gerard van den Bosch
Thank you all for the solutions, I can get it working now :). Regards, Gerard On Sun, Oct 23, 2011 at 9:37 PM, Jan Waclawek wrote: > What I would perhaps do, rather than juggle with the names, I'd place the > binaries for every target into a separate subdirectory. > > Jan > > - Original Mes

Re: [Sdcc-user] Makefile multiple targets with define variable

2011-10-23 Thread Jan Waclawek
What I would perhaps do, rather than juggle with the names, I'd place the binaries for every target into a separate subdirectory. Jan - Original Message --- >Hi Gerard, > >Right, something like this (I left out packihx): > > >libs = file1 file2 file3 > >all: target1.hex target2.h

Re: [Sdcc-user] Makefile multiple targets with define variable

2011-10-23 Thread Bodo Wenzel
Hi Gerard, Right, something like this (I left out packihx): libs = file1 file2 file3 all: target1.hex target2.hex target3.hex $(libs:%=%_target1.rel) : %_target1.rel : %.c $(CC) $(CFLAGS) -c -DTARGET1 $< -o $@ $(libs:%=%_target2.rel) : %_target2.rel : %.c $(CC) $(CFLAGS) -c -D

Re: [Sdcc-user] Makefile multiple targets with define variable

2011-10-23 Thread Gerard van den Bosch
Hi Bodo, > But actually I want that the define is also passed at compile time to > > the lib files (file1,file2 and file3). > Because of obvious reasons. ;-) > > > Can anyone point me to an example of a Makefile for SDCC with such a > > construction or a hint on how this can be solved? > In my Mak

Re: [Sdcc-user] Makefile multiple targets with define variable

2011-10-22 Thread Bodo Wenzel
Hi Gerard, > But actually I want that the define is also passed at compile time to > the lib files (file1,file2 and file3). Because of obvious reasons. ;-) > Can anyone point me to an example of a Makefile for SDCC with such a > construction or a hint on how this can be solved? In my Makefiles I