[bffb938] | 1 | # |
---|
| 2 | # Config file for the go32 BSP .. CPU model defaults to an i486DX |
---|
| 3 | # unless set otherwise by a custom configuration file which overrides. |
---|
| 4 | # |
---|
| 5 | # $Id$ |
---|
| 6 | # |
---|
| 7 | |
---|
| 8 | # default to i486dx as cpu |
---|
| 9 | ifeq ($(RTEMS_GO32_CPU_MODEL),) |
---|
[3d4e5906] | 10 | TARGET_ARCH=o-go32 |
---|
[bffb938] | 11 | RTEMS_CPU_MODEL=i486dx |
---|
| 12 | else |
---|
| 13 | ifeq ($(RTEMS_GO32_CPU_MODEL),pentium) |
---|
| 14 | TARGET_ARCH=o-go32_p5 |
---|
| 15 | RTEMS_CPU_MODEL=pentium |
---|
| 16 | endif # pentium |
---|
| 17 | endif # i486dx |
---|
| 18 | |
---|
| 19 | include $(RTEMS_ROOT)/make/custom/default.cfg |
---|
| 20 | |
---|
| 21 | # Sharing a single bsp among multiple cpu models results in us having to |
---|
| 22 | # explicitly set some values normally taken care of in the defaults.cfg |
---|
| 23 | # file. |
---|
| 24 | |
---|
| 25 | RTEMS_CPU=i386 |
---|
| 26 | |
---|
| 27 | # This is the actual bsp directory used during the build process. |
---|
| 28 | RTEMS_BSP_FAMILY=go32 |
---|
| 29 | |
---|
| 30 | ## Target compiler config file, if any |
---|
| 31 | CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg |
---|
| 32 | |
---|
| 33 | # We may install in a CPU model based directory but this is still |
---|
| 34 | # a go32 based bsp. |
---|
| 35 | RTEMS_BSP=go32 |
---|
| 36 | |
---|
| 37 | # This contains the compiler options necessary to select the CPU model |
---|
| 38 | # and (hopefully) optimize for it. |
---|
| 39 | # |
---|
| 40 | # NOTE: As gcc grows to include more options, this section should also grow. |
---|
| 41 | # |
---|
| 42 | ifeq ($(RTEMS_CPU_MODEL),i486dx) |
---|
| 43 | CPU_CFLAGS = -m486 |
---|
| 44 | else |
---|
| 45 | ifeq ($(RTEMS_CPU_MODEL),pentium) |
---|
| 46 | CPU_CFLAGS = -m486 |
---|
| 47 | else |
---|
| 48 | CPU_CFLAGS = |
---|
| 49 | endif # pentium |
---|
| 50 | endif # i486dx |
---|
| 51 | |
---|
| 52 | # optimize flag: typically -0, could use -O4 or -fast |
---|
| 53 | # -O4 is ok for RTEMS |
---|
[123d4b7d] | 54 | # -fomit-frame-pointer breaks debugging and C++ exceptions |
---|
| 55 | CFLAGS_OPTIMIZE_V=-O4 |
---|
[bffb938] | 56 | |
---|
[0280cb6] | 57 | # This target does NOT support the TCP/IP stack so ignore requests |
---|
| 58 | # to enable it. |
---|
| 59 | HAS_NETWORKING=no |
---|
| 60 | |
---|
[bffb938] | 61 | # Base name of start file |
---|
| 62 | # go32 does not use the rtems start file |
---|
| 63 | START_BASE= |
---|
| 64 | |
---|
| 65 | # This section makes the target dependent options file. |
---|
| 66 | |
---|
| 67 | # NDEBUG (C library) |
---|
| 68 | # if defined asserts do not generate code. This is commonly used |
---|
| 69 | # as a command line option. |
---|
| 70 | # |
---|
| 71 | # RTEMS_TEST_NO_PAUSE (RTEMS tests) |
---|
| 72 | # do not pause between screens of output in the rtems tests |
---|
| 73 | # |
---|
| 74 | # RTEMS_DEBUG (RTEMS) |
---|
| 75 | # If defined, debug checks in RTEMS and support library code are enabled. |
---|
| 76 | |
---|
| 77 | define make-target-options |
---|
| 78 | @echo "/* #define NDEBUG 1 */ " >>$@ |
---|
| 79 | @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@ |
---|
| 80 | @echo "/* #define RTEMS_DEBUG 1 */" >>$@ |
---|
| 81 | endef |
---|
| 82 | |
---|
| 83 | # Ultimately, it would be nice to do this when in a cross environment: |
---|
| 84 | # $(COFF2EXE) $(basename $@).out |
---|
| 85 | |
---|
| 86 | # The following are definitions of make-exe which will work using ld as |
---|
| 87 | # is currently required. It is expected that as of gcc 2.8, the end user |
---|
| 88 | # will be able to override parts of the compilers specs and link using gcc. |
---|
| 89 | |
---|
| 90 | # may need to reference libpc.a |
---|
| 91 | |
---|
| 92 | ifeq ($(RTEMS_USE_GCC272),yes) |
---|
| 93 | define make-exe |
---|
| 94 | $(LD) $(LDFLAGS) -N -o $(basename $@).exe \ |
---|
| 95 | $(shell $(CC) $(CPU_CFLAGS) -print-file-name=crt0.o) \ |
---|
| 96 | $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group \ |
---|
[98100d2] | 97 | $(shell $(CC) $(CPU_CFLAGS) -print-file-name=libcgo32.a $(GCCSED)) \ |
---|
| 98 | $(shell $(CC) $(CPU_CFLAGS) -print-file-name=libpc.a $(GCCSED)) |
---|
[bffb938] | 99 | $(NM) -g -n $(basename $@).exe > $(basename $@).num |
---|
| 100 | $(SIZE) $(basename $@).exe |
---|
| 101 | endef |
---|
| 102 | |
---|
| 103 | else |
---|
| 104 | define make-exe |
---|
[54d3d1e] | 105 | $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \ |
---|
[98100d2] | 106 | $(LINK_OBJS) $(LINK_LIBS) |
---|
[bffb938] | 107 | $(NM) -g -n $(basename $@).exe > $(basename $@).num |
---|
| 108 | $(SIZE) $(basename $@).exe |
---|
| 109 | endef |
---|
| 110 | |
---|
| 111 | endif |
---|
| 112 | |
---|
| 113 | |
---|
| 114 | # Miscellaneous additions go here |
---|