summaryrefslogtreecommitdiff
path: root/www/example/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'www/example/Makefile')
-rw-r--r--www/example/Makefile40
1 files changed, 40 insertions, 0 deletions
diff --git a/www/example/Makefile b/www/example/Makefile
new file mode 100644
index 0000000000..7d8f2fdefd
--- /dev/null
+++ b/www/example/Makefile
@@ -0,0 +1,40 @@
1HPATH = /usr/local/sh-gcc/bin
2CC = $(HPATH)/sh-elf-gcc
3LD = $(HPATH)/sh-elf-ld
4AR = $(HPATH)/sh-elf-ar
5AS = $(HPATH)/sh-elf-as
6OC = $(HPATH)/sh-elf-objcopy
7
8INCLUDES=-I.
9
10CFLAGS = -Os -Wall -m1 -nostdlib -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns $(INCLUDES)
11AFLAGS += -small -relax
12
13OBJS= start.o main.o
14
15%.o: %.s
16 $(CC) -o $@ $(CFLAGS) $(INCLUDES) $(DEFS) -c $<
17
18
19all : archos.mod # archos.asm
20
21main.o: main.c
22
23archos.elf : $(OBJS) app.lds
24 $(CC) -nostdlib -o archos.elf $(OBJS) -lgcc -Tapp.lds -Wl,-Map,archos.map
25
26archos.bin : archos.elf
27 $(OC) -O binary archos.elf archos.bin
28
29archos.asm: archos.bin
30 sh2d -sh1 archos.bin > archos.asm
31
32archos.mod : archos.bin
33 scramble archos.bin archos.mod
34
35dist:
36 tar czvf dist.tar.gz Makefile main.c start.s app.lds
37
38clean:
39 -rm -f *.x *.i *.o *.elf *.bin *.map *.mod *.bak *~
40