For assembling you can use either GPUTILS'
gpasm.exe or MPLAB's mpasmwin.exe. GPUTILS are available from http://sourceforge.net/projects/gputils.
For linking you can use either GPUTILS' gplink or MPLAB's mplink.exe.
If you use MPLAB and an interrupt function then the linker script
file vectors section will need to be enlarged to link with mplink.
Here is a Makefile using GPUTILS:
.c.o:Here is a Makefile using MPLAB:
sdcc -V -mpic14 -p16f877 -c $<
$(PRJ).hex: $(OBJS)
gplink -m -s $(PRJ).lkr -o $(PRJ).hex $(OBJS) libsdcc.lib
.c.o:Please note that indentations within a Makefile have to be done with a tabulator character.
sdcc -S -V -mpic14 -p16f877 $<
mpasmwin /q /o $*.asm
$(PRJ).hex: $(OBJS)
mplink /v $(PRJ).lkr /m $(PRJ).map /o $(PRJ).hex $(OBJS) libsdcc.lib