diff options
| author | Keith Packard <keithp@keithp.com> | 2008-12-19 19:07:37 -0800 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2008-12-19 19:07:37 -0800 |
| commit | cc8db276bc4f2fd7eb00168a5c0689a8457a5c6f (patch) | |
| tree | 097a136640ae4168c4dfda1966e24865526e4eaa /blink/Makefile | |
| parent | 82e2d7ebed6682062dc400478c736bd6c91195c9 (diff) | |
Move blink example to subdir
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'blink/Makefile')
| -rw-r--r-- | blink/Makefile | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/blink/Makefile b/blink/Makefile new file mode 100644 index 00000000..1f18f529 --- /dev/null +++ b/blink/Makefile @@ -0,0 +1,44 @@ +CC=sdcc +NO_OPT=--nogcse --noinvariant --noinduction --nojtbound --noloopreverse \ + --nolabelopt --nooverlay --peep-asm +DEBUG=--debug + +CFLAGS=--model-large $(DEBUG) --less-pedantic \ + --no-peep --int-long-reent --float-reent \ + --data-loc 0x30 + +LDFLAGS=-L/usr/share/sdcc/lib/large --out-fmt-ihx +LDFLAGS_RAM=$(LDFLAGS) --code-loc 0xf000 --xram-loc 0xf400 --xram-size 1024 + +LDFLAGS_FLASH=$(LDFLAGS) --code-loc 0x0000 --xram-loc 0xf000 --xram-size 1024 + +SRC=blink.c +ADB=$(SRC:.c=.adb) +ASM=$(SRC:.c=.asm) +LNK=$(SRC:.c=.lnk) +LST=$(SRC:.c=.lst) +REL=$(SRC:.c=.rel) +RST=$(SRC:.c=.rst) +SYM=$(SRC:.c=.sym) + +PROGS=blink-flash.ihx blink-ram.ihx +PCDB=$(PROGS:.ihx=.cdb) +PLNK=$(PROGS:.ihx=.lnk) +PMAP=$(PROGS:.ihx=.map) +PMEM=$(PROGS:.ihx=.mem) +PAOM=$(PROGS:.ihx=) + +%.rel : %.c + $(CC) -c $(CFLAGS) -o$*.rel $< + +all: $(PROGS) + +blink-ram.ihx: $(REL) Makefile + $(CC) $(LDFLAGS_RAM) $(CFLAGS) -o blink-ram.ihx $(REL) + $(CC) $(LDFLAGS_FLASH) $(CFLAGS) -o blink-flash.ihx $(REL) + +blink-flash.ihx: blink-ram.ihx + +clean: + rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM) + rm -f $(PROGS) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM) |
