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),) |
---|
10 | TARGET_ARCH=o-go32 |
---|
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 |
---|
54 | CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer |
---|
55 | |
---|
56 | # This target does NOT support the TCP/IP stack so ignore requests |
---|
57 | # to enable it. |
---|
58 | HAS_NETWORKING=no |
---|
59 | |
---|
60 | # Base name of start file |
---|
61 | # go32 does not use the rtems start file |
---|
62 | START_BASE= |
---|
63 | |
---|
64 | # This section makes the target dependent options file. |
---|
65 | |
---|
66 | # NDEBUG (C library) |
---|
67 | # if defined asserts do not generate code. This is commonly used |
---|
68 | # as a command line option. |
---|
69 | # |
---|
70 | # RTEMS_TEST_NO_PAUSE (RTEMS tests) |
---|
71 | # do not pause between screens of output in the rtems tests |
---|
72 | # |
---|
73 | # RTEMS_DEBUG (RTEMS) |
---|
74 | # If defined, debug checks in RTEMS and support library code are enabled. |
---|
75 | |
---|
76 | define make-target-options |
---|
77 | @echo "/* #define NDEBUG 1 */ " >>$@ |
---|
78 | @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@ |
---|
79 | @echo "/* #define RTEMS_DEBUG 1 */" >>$@ |
---|
80 | endef |
---|
81 | |
---|
82 | # Ultimately, it would be nice to do this when in a cross environment: |
---|
83 | # $(COFF2EXE) $(basename $@).out |
---|
84 | |
---|
85 | # The following are definitions of make-exe which will work using ld as |
---|
86 | # is currently required. It is expected that as of gcc 2.8, the end user |
---|
87 | # will be able to override parts of the compilers specs and link using gcc. |
---|
88 | |
---|
89 | # may need to reference libpc.a |
---|
90 | |
---|
91 | ifeq ($(RTEMS_USE_GCC272),yes) |
---|
92 | define make-exe |
---|
93 | $(LD) $(LDFLAGS) -N -o $(basename $@).exe \ |
---|
94 | $(shell $(CC) $(CPU_CFLAGS) -print-file-name=crt0.o) \ |
---|
95 | $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group \ |
---|
96 | $(shell $(CC) $(CPU_CFLAGS) -print-file-name=libcgo32.a $(GCCSED)) \ |
---|
97 | $(shell $(CC) $(CPU_CFLAGS) -print-file-name=libpc.a $(GCCSED)) |
---|
98 | $(NM) -g -n $(basename $@).exe > $(basename $@).num |
---|
99 | $(SIZE) $(basename $@).exe |
---|
100 | endef |
---|
101 | |
---|
102 | else |
---|
103 | define make-exe |
---|
104 | $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \ |
---|
105 | $(LINK_OBJS) $(LINK_LIBS) |
---|
106 | $(NM) -g -n $(basename $@).exe > $(basename $@).num |
---|
107 | $(SIZE) $(basename $@).exe |
---|
108 | endef |
---|
109 | |
---|
110 | endif |
---|
111 | |
---|
112 | |
---|
113 | # Miscellaneous additions go here |
---|