# $Id: Makefile,v 1.10 2004/03/17 04:45:54 jmuelmen Exp $ SDCC = sdcc SDCCFLAGS = -I. -I../../inc LFLAGS = --xram-loc 0x1b40 EEHX = ./create_ezhid_e2.pl DEPFLAGS = -I/usr/local/share/sdcc/include SOURCES = firm.c i2c.c usb_irq.c lookup.c .PHONY: all all: firm.ee %.d: %.c @ set -e ; $(CC) -I. -I../../inc -M $(DEPFLAGS) $< \ | sed 's/\($*\)\.o[ :]*/\1.rel $@ : /g' > $@; \ [ -s $@ ] || rm -f $@ %.rel: %.c $(SDCC) $(SDCCFLAGS) $< -c firm.ihx: $(SOURCES:.c=.rel) $(SDCC) $(CFLAGS) $(LFLAGS) $(SOURCES:.c=.rel) %.ee: %.ihx $(EEHX) < $< > $@ .PHONY: clean clean: rm -f *.d *~ *.rel *.sym *.asm *.lst *.ihx *.rst *.map *.ee -include $(SOURCES:.c=.d)