1 | # |
---|
2 | # Config file for Gameboy Advance ARM -- |
---|
3 | # |
---|
4 | # $Id$ |
---|
5 | # |
---|
6 | |
---|
7 | include $(RTEMS_ROOT)/make/custom/default.cfg |
---|
8 | |
---|
9 | RTEMS_CPU=arm |
---|
10 | RTEMS_CPU_MODEL=arm7tdmi |
---|
11 | |
---|
12 | # This is the actual bsp directory used during the build process. |
---|
13 | RTEMS_BSP_FAMILY=gba |
---|
14 | |
---|
15 | # This contains the compiler options necessary to select the CPU model |
---|
16 | # and (hopefully) optimize for it. |
---|
17 | # |
---|
18 | #CPU_CFLAGS = -mcpu=$(RTEMS_CPU_MODEL) -mthumb -mthumb-interwork -msoft-float -mstructure-size-boundary=8 |
---|
19 | CPU_CFLAGS = -mcpu=$(RTEMS_CPU_MODEL) -msoft-float -mstructure-size-boundary=8 |
---|
20 | |
---|
21 | # optimize flag: typically -O2 |
---|
22 | CFLAGS_OPTIMIZE_V = -O2 |
---|
23 | CXXFLAGS_OPTIMIZE_V = -O3 |
---|
24 | |
---|
25 | define make-exe |
---|
26 | $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \ |
---|
27 | -Wl,-Map,$(basename $@).map -o $(basename $@).elf \ |
---|
28 | $(LINK_OBJS) $(LINK_LIBS) |
---|
29 | $(OBJCOPY) -O binary $(basename $@).elf $@ |
---|
30 | $(OBJCOPY) -O binary --remove-section=.comment \ |
---|
31 | --remove-section=.note --strip-unneeded \ |
---|
32 | $(basename $@).elf $(basename $@).gba |
---|
33 | $(NM) -g -n $(basename $@).elf > $(basename $@).num |
---|
34 | $(SIZE) $(basename $@).elf |
---|
35 | endef |
---|
36 | |
---|
37 | define make-cxx-exe |
---|
38 | $(LINK.cc) $(AM_CFLAGS) $(AM_CXXFLAGS) $(AM_LDFLAGS) \ |
---|
39 | -Wl,-Map,$(basename $@).map -o $(basename $@).elf \ |
---|
40 | $(LINK_OBJS) $(LINK_LIBS) |
---|
41 | $(OBJCOPY) -O binary $(basename $@).elf $@ |
---|
42 | $(OBJCOPY) -O binary --remove-section=.comment \ |
---|
43 | --remove-section=.note --strip-unneeded \ |
---|
44 | $(basename $@).elf $(basename $@).gba |
---|
45 | $(NM) -g -n $(basename $@).elf > $(basename $@).num |
---|
46 | $(SIZE) $(basename $@).elf |
---|
47 | endef |
---|
48 | |
---|
49 | # Miscellaneous additions go here |
---|