# ************************************************************************** # Fichero makefile. # -------------------------------------------------------------------------- # Licencia GPL. # -------------------------------------------------------------------------- #*************************************************************************** #-- Compilador CC = sdcc CFLAGS = -Wl-ainhx8m -mpic14 -p16f876a #-- Obtener todos los ficheros .c sources:= $(wildcard *.c) #-- Compilar todos los ficheros .c all: ${sources:.c=.hex} #-- Regla implicita %.hex : %.c $(CC) $(CFLAGS) -o ${@:.hex= } $< #-------------------- #- LIMPIEZA #-------------------- clean: rm -f *.o *.hex *.lst *.p *.d *.asm *.cod *.map *.cof *~