[bffb938] | 1 | # |
---|
| 2 | # Config file for a "generic 68360" BSP |
---|
| 3 | # |
---|
| 4 | # $Id$ |
---|
| 5 | # |
---|
| 6 | |
---|
| 7 | RTEMS_CPU=m68k |
---|
| 8 | |
---|
| 9 | ifeq ($(RTEMS_GEN68360_COMPANION_MODE),yes) |
---|
| 10 | TARGET_ARCH=o-gen68360_040 |
---|
| 11 | RTEMS_CPU_MODEL=m68040 |
---|
| 12 | else |
---|
| 13 | TARGET_ARCH=o-gen68360 |
---|
[9d07e59d] | 14 | RTEMS_CPU_MODEL=mcpu32 |
---|
[bffb938] | 15 | endif |
---|
| 16 | |
---|
| 17 | include $(RTEMS_ROOT)/make/custom/default.cfg |
---|
| 18 | |
---|
| 19 | # This is the actual bsp directory used during the build process. |
---|
| 20 | RTEMS_BSP_FAMILY=gen68360 |
---|
| 21 | |
---|
| 22 | # |
---|
[db4aaf8] | 23 | # You must use versions of gcc and gas that support the -mcpu32 option. |
---|
[bffb938] | 24 | # |
---|
| 25 | ifeq ($(RTEMS_GEN68360_COMPANION_MODE),yes) |
---|
| 26 | CPU_CFLAGS= -m68040 |
---|
| 27 | else |
---|
[db4aaf8] | 28 | CPU_CFLAGS = -mcpu32 |
---|
[bffb938] | 29 | endif |
---|
| 30 | |
---|
| 31 | # optimize flag: typically -0, could use -O4 or -fast |
---|
| 32 | # -O4 is ok for RTEMS |
---|
| 33 | CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer |
---|
| 34 | |
---|
| 35 | # Override default start file |
---|
| 36 | START_BASE=start360 |
---|
| 37 | |
---|
| 38 | # This section makes the target dependent options file. |
---|
| 39 | # NDEBUG (C library) |
---|
| 40 | # if defined asserts do not generate code. This is commonly used |
---|
| 41 | # as a command line option. |
---|
| 42 | # |
---|
| 43 | # RTEMS_TEST_NO_PAUSE (RTEMS tests) |
---|
| 44 | # do not pause between screens of output in the rtems tests |
---|
| 45 | # |
---|
| 46 | # RTEMS_DEBUG (RTEMS) |
---|
| 47 | # If defined, debug checks in RTEMS and support library code are enabled. |
---|
| 48 | # |
---|
| 49 | |
---|
[a0b7a07] | 50 | ifeq ($(RTEMS_GEN68360_COMPANION_MODE),yes) |
---|
| 51 | define make-target-options |
---|
| 52 | @echo "/* #define NDEBUG 1 */ " >>$@ |
---|
| 53 | @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@ |
---|
| 54 | @echo "/* #define RTEMS_DEBUG 1 */" >>$@ |
---|
| 55 | endef |
---|
| 56 | else |
---|
[bffb938] | 57 | define make-target-options |
---|
| 58 | @echo "/* #define NDEBUG 1 */ " >>$@ |
---|
| 59 | @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@ |
---|
| 60 | @echo "/* #define RTEMS_DEBUG 1 */" >>$@ |
---|
[43b78f15] | 61 | @echo "#define RTEMS__mcpu32p__ 1" >>$@ |
---|
[bffb938] | 62 | endef |
---|
[a0b7a07] | 63 | endif |
---|
[bffb938] | 64 | |
---|
| 65 | # The following are definitions of make-exe which will work using ld as |
---|
| 66 | # is currently required. It is expected that as of gcc 2.8, the end user |
---|
| 67 | # will be able to override parts of the compilers specs and link using gcc. |
---|
| 68 | |
---|
| 69 | ifeq ($(RTEMS_USE_GCC272),yes) |
---|
| 70 | |
---|
| 71 | # override default location of Standard C Library |
---|
| 72 | LIBC_LIBC=$(RTEMS_LIBC_DIR)/lib/m68000/msoft-float/libc.a |
---|
| 73 | LIBC_LIBM=$(RTEMS_LIBC_DIR)/lib/m68000/msoft-float/libm.a |
---|
| 74 | |
---|
| 75 | define make-exe |
---|
[61bbe543] | 76 | @ echo |
---|
| 77 | @ echo "WARNING: newlib may use bit test instructions!!" |
---|
| 78 | @ echo |
---|
[bffb938] | 79 | $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).exe \ |
---|
| 80 | $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group |
---|
| 81 | $(NM) -g -n $(basename $@).exe > $(basename $@).num |
---|
| 82 | $(SIZE) $(basename $@).exe |
---|
| 83 | endef |
---|
| 84 | else |
---|
| 85 | |
---|
| 86 | define make-exe |
---|
[98100d2] | 87 | $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \ |
---|
| 88 | $(LINK_OBJS) $(LINK_LIBS) |
---|
[bffb938] | 89 | $(NM) -g -n $(basename $@).exe > $(basename $@).num |
---|
| 90 | $(SIZE) $(basename $@).exe |
---|
| 91 | endef |
---|
| 92 | endif |
---|
| 93 | |
---|
| 94 | |
---|
| 95 | # Miscellaneous additions go here |
---|