summaryrefslogblamecommitdiffstats
path: root/make/custom/go32.cfg
blob: d7c91db34341cd2e7906f7e7f65a2949f146440a (plain) (tree)
























































































































                                                                              
#
#  Config file for the go32 BSP .. CPU model defaults to an i486DX
#  unless set otherwise by a custom configuration file which overrides.
#
#  $Id$
#

# default to i486dx as cpu
ifeq ($(RTEMS_GO32_CPU_MODEL),)
TARGET_ARCH=o-go32_i486dx
RTEMS_CPU_MODEL=i486dx
else
ifeq ($(RTEMS_GO32_CPU_MODEL),pentium)
TARGET_ARCH=o-go32_p5
RTEMS_CPU_MODEL=pentium
endif # pentium
endif # i486dx

include $(RTEMS_ROOT)/make/custom/default.cfg

# Sharing a single bsp among multiple cpu models results in us having to
# explicitly set some values normally taken care of in the defaults.cfg
# file.

RTEMS_CPU=i386

# This is the actual bsp directory used during the build process.
RTEMS_BSP_FAMILY=go32

## Target compiler config file, if any
CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg

# We may install in a CPU model based directory but this is still
# a go32 based bsp.
RTEMS_BSP=go32

#  This contains the compiler options necessary to select the CPU model
#  and (hopefully) optimize for it. 
#
#  NOTE:  As gcc grows to include more options, this section should also grow.
#
ifeq ($(RTEMS_CPU_MODEL),i486dx)
CPU_CFLAGS = -m486
else
ifeq ($(RTEMS_CPU_MODEL),pentium)
CPU_CFLAGS = -m486
else
CPU_CFLAGS =
endif   # pentium
endif   # i486dx

# optimize flag: typically -0, could use -O4 or -fast
# -O4 is ok for RTEMS
CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer

# This target does NOT support the KA9Q TCP/IP stack so ignore requests
# to enable it.
HAS_KA9Q=no

# Base name of start file
# go32 does not use the rtems start file
START_BASE=

#  This section makes the target dependent options file.

#  NDEBUG (C library)
#     if defined asserts do not generate code.  This is commonly used
#     as a command line option.
#
#  RTEMS_TEST_NO_PAUSE (RTEMS tests)
#     do not pause between screens of output in the rtems tests
#
#  STACK_CHECKER_ON (RTEMS support code)
#     If defined, stack bounds checking is enabled.
#
#  STACK_CHECKER_REPORT_USAGE (RTEMS support code)
#     If this and STACK_CHECKER_ON are defined, then a report on stack usage
#     per task is printed when the program exits.
#
#  RTEMS_DEBUG (RTEMS)
#     If defined, debug checks in RTEMS and support library code are enabled.

define make-target-options
	@echo "/* #define NDEBUG 1 */ "                     >>$@
	@echo "#define RTEMS_TEST_NO_PAUSE 1"               >>$@
	@echo "/* #define STACK_CHECKER_ON  1 */"           >>$@
	@echo "/* #define STACK_CHECKER_REPORT_USAGE  1 */" >>$@
	@echo "/* #define RTEMS_DEBUG  1 */"                >>$@
endef

# Ultimately, it would be nice to do this when in a cross environment:
#	$(COFF2EXE) $(basename $@).out

# The following are definitions of make-exe which will work using ld as
# is currently required.  It is expected that as of gcc 2.8, the end user
# will be able to override parts of the compilers specs and link using gcc.

# may need to reference libpc.a

ifeq ($(RTEMS_USE_GCC272),yes)
define make-exe
	$(LD) $(LDFLAGS) -N -o $(basename $@).exe \
	    $(shell $(CC) $(CPU_CFLAGS) -print-file-name=crt0.o) \
	    $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group \
	    $(shell $(CC) $(CPU_CFLAGS) -print-file-name=libcgo32.a) \
	    $(shell $(CC) $(CPU_CFLAGS) -print-file-name=libpc.a)
	$(NM) -g -n $(basename $@).exe > $(basename $@).num
	$(SIZE) $(basename $@).exe
endef

else
define make-exe
	$(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
	$(NM) -g -n $(basename $@).exe > $(basename $@).num
	$(SIZE) $(basename $@).exe
endef

endif


# Miscellaneous additions go here