summaryrefslogtreecommitdiff
path: root/utils/hwstub/stmp/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'utils/hwstub/stmp/Makefile')
-rw-r--r--utils/hwstub/stmp/Makefile74
1 files changed, 0 insertions, 74 deletions
diff --git a/utils/hwstub/stmp/Makefile b/utils/hwstub/stmp/Makefile
deleted file mode 100644
index 4185dcbbc9..0000000000
--- a/utils/hwstub/stmp/Makefile
+++ /dev/null
@@ -1,74 +0,0 @@
1#
2# common
3#
4CC=arm-elf-eabi-gcc
5LD=arm-elf-eabi-gcc
6AS=arm-elf-eabi-gcc
7OC=arm-elf-eabi-objcopy
8CFLAGS=-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99 -mcpu=arm926ej-s -fomit-frame-pointer -Wno-pointer-sign -Wno-override-init -ffunction-sections
9ASFLAGS=$(CFLAGS) -D__ASSEMBLER__
10OCFLAGS=
11LINKER_FILE=hwstub.lds
12TMP_LDS=link.lds
13TMP_MAP=hwstub.map
14LDFLAGS=-lgcc -Os -nostdlib -T$(TMP_LDS) -Wl,-Map,$(TMP_MAP)
15SRC_C=$(wildcard *.c)
16SRC_S=$(wildcard *.S)
17OBJ_C=$(SRC_C:.c=.o)
18OBJ_S=$(SRC_S:.S=.o)
19OBJ=$(OBJ_C) $(OBJ_S)
20OBJ_EXCEPT_CRT0=$(filter-out crt0.o,$(OBJ))
21DEPS=$(OBJ:.o=.d)
22EXEC_ELF=hwstub.elf
23
24#
25# image production
26#
27TOOLS=../../../tools
28SBTOOLS=../../imxtools/sbtools
29
30# sb (stmp37xx)
31EXEC_SB=hwstub.sb
32ELF2SB=$(SBTOOLS)/elftosb -d
33ELF2SB_CMD=-c hwstub.db
34ELF2SB_KEY?=-z
35
36# sb1 (stmp36xx)
37EXEC_SB1=hwstub.sb1
38ELF2SB1_CMD=-loadjump $(EXEC_ELF)
39ELF2SB1_KEY?=
40ELF2SB1=$(SBTOOLS)/elftosb1 -d
41
42EXEC=$(EXEC_ELF) $(EXEC_SB) $(EXEC_SB1)
43
44all: $(EXEC)
45
46# pull in dependency info for *existing* .o files
47-include $(DEPS)
48
49%.o: %.c
50 $(CC) $(CFLAGS) -c -o $@ $<
51 $(CC) -MM $(CFLAGS) $*.c > $*.d
52 @cp -f $*.d $*.d.tmp
53 @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | \
54 sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
55 @rm -f $*.d.tmp
56
57%.o: %.S
58 $(AS) $(ASFLAGS) -c -o $@ $<
59
60$(TMP_LDS): $(LINKER_FILE)
61 $(CC) -E -x c - < $< | sed '/#/d' > $@
62
63$(EXEC_ELF): $(OBJ) $(TMP_LDS)
64 $(LD) $(LDFLAGS) -o $@ $(OBJ_EXCEPT_CRT0)
65
66$(EXEC_SB): $(EXEC_ELF)
67 $(ELF2SB) $(ELF2SB_CMD) $(ELF2SB_KEY) -o $@
68
69$(EXEC_SB1): $(EXEC_ELF)
70 $(ELF2SB1) $(ELF2SB1_CMD) $(ELF2SB1_KEY) -o $@
71
72clean:
73 rm -rf $(OBJ) $(DEPS) $(EXEC) $(TMP_LDS) $(TMP_MAP)
74