From 81815b1eef1d0a4f4562c7401ae6ed885d6bffe5 Mon Sep 17 00:00:00 2001 From: Stefan `Sec` Zehl Date: Fri, 5 Aug 2011 00:21:20 +0200 Subject: [PATCH] Try to be more iggy-friendly --- firmware/l0dable/Makefile | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/firmware/l0dable/Makefile b/firmware/l0dable/Makefile index c97d8de..3799bb0 100644 --- a/firmware/l0dable/Makefile +++ b/firmware/l0dable/Makefile @@ -5,6 +5,8 @@ SRCS = $(wildcard *.c) OBJS = $(foreach mod,$(SRCS),$(subst .c,.o,$(mod))) ELFS = $(foreach mod,$(SRCS),$(subst .c,.elf,$(mod))) BINS = $(foreach mod,$(SRCS),$(subst .c,.bin,$(mod))) +CODS = $(foreach mod,$(SRCS),$(subst .c,.c0d,$(mod))) +NIKS = $(foreach mod,$(wildcard nick_*.c),$(subst .c,.nik,$(subst nick_,,$(mod)))) ########################################################################## # GNU GCC compiler flags @@ -22,7 +24,10 @@ LDSRCFILE=ram.ld LDFILE=loadable.ld CFLAGS+=-mlong-calls -fno-toplevel-reorder -all: $(OBJS) $(ELFS) $(BINS) +CRYPT=cp +CRYPTFLAGS=-p + +all: $(OBJS) $(ELFS) $(BINS) $(CODS) $(NIKS) 1boot.int $(LDFILE): -@echo "MEMORY" > $(LDFILE) @@ -41,6 +46,15 @@ $(LDFILE): %.bin: %.elf $(OBJCOPY) $(OCFLAGS) -O binary $< $@ +%.c0d: %.bin + $(CRYPT) $(CRYPTFLAGS) $< $@ + +%.nik: .PHONY + @a=$@;a=nick_$${a%.nik}.c0d;echo mv $$a $@;mv $$a $@ + +1boot.int: 1boot.c0d .PHONY + mv $< $@ + clean: rm -f *.o *.elf *.bin usetable.h