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 -g |
---|
23 | |
---|
24 | define make-exe |
---|
25 | $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \ |
---|
26 | -Wl,-Map,$(basename $@).map -o $(basename $@).nxe \ |
---|
27 | $(LINK_OBJS) $(LINK_LIBS) |
---|
28 | $(OBJCOPY) -O binary $(basename $@).nxe $@ |
---|
29 | $(OBJCOPY) -O binary --remove-section=.comment \ |
---|
30 | --remove-section=.note --strip-unneeded \ |
---|
31 | $(basename $@).nxe $(basename $@).gba |
---|
32 | $(NM) -g -n $(basename $@).nxe > $(basename $@).num |
---|
33 | $(SIZE) $(basename $@).nxe |
---|
34 | endef |
---|
35 | |
---|
36 | define make-cxx-exe |
---|
37 | $(LINK.cc) $(AM_CFLAGS) $(AM_CXXFLAGS) $(AM_LDFLAGS) \ |
---|
38 | -Wl,-Map,$(basename $@).map -o $(basename $@).nxe \ |
---|
39 | $(LINK_OBJS) $(LINK_LIBS) |
---|
40 | $(OBJCOPY) -O binary $(basename $@).nxe $@ |
---|
41 | $(OBJCOPY) -O binary --remove-section=.comment \ |
---|
42 | --remove-section=.note --strip-unneeded \ |
---|
43 | $(basename $@).nxe $(basename $@).gba |
---|
44 | $(NM) -g -n $(basename $@).nxe > $(basename $@).num |
---|
45 | $(SIZE) $(basename $@).nxe |
---|
46 | endef |
---|
47 | |
---|
48 | # Miscellaneous additions go here |
---|