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.hex target3.hex > >$(libs:%=%_target1.rel) : %_target1.rel : %.c > $(CC) $(CFLAGS) -c -DTARGET1 $< -o $@ > >$(libs:%=%_target2.rel) : %_target2.rel : %.c > $(CC) $(CFLAGS) -c -DTARGET2 $< -o $@ > >$(libs:%=%_target3.rel) : %_target3.rel : %.c > $(CC) $(CFLAGS) -c -DTARGET3 $< -o $@ > >target1.hex: application.c $(libs:%=%_target1.rel) > $(CC) $(CFLAGS) $(LFLAGS) application.c $(libs:%=%_target1.rel) > -DTARGET1 -o $@ > >target2.hex: application.c $(libs:%=%_target2.rel) > $(CC) $(CFLAGS) $(LFLAGS) application.c $(libs:%=%_target2.rel) > -DTARGET2 -o $@ > >target3.hex: application.c $(libs:%=%_target3.rel) > $(CC) $(CFLAGS) $(LFLAGS) application.c $(libs:%=%_target3.rel) > -DTARGET3 -o $@ > ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user