summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/m68k/Makefile.am
blob: 2800e421c40b27c6ae0153fcafc58a31ae5aea39 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
ACLOCAL_AMFLAGS = -I ../../../aclocal

include $(top_srcdir)/../../../automake/compile.am

noinst_PROGRAMS =

if shared

noinst_PROGRAMS += shared/cache.rel
shared_cache_rel_SOURCES = shared/cache/cache.c
shared_cache_rel_SOURCES += shared/cache/cache_.h
shared_cache_rel_SOURCES += ../shared/src/cache_manager.c
shared_cache_rel_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/shared/cache
shared_cache_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)

## shared/misc

# gcc doesn't recognize difference between the cpu32 and cpu32+ so we have to
if mcpu32p
M68K_CPPFLAGS = -D__mcpu32p__
endif
if mcf5272
M68K_CPPFLAGS = -Dmcf5272
endif

noinst_PROGRAMS += shared/misc.rel
shared_misc_rel_SOURCES = shared/misc/m68kidle.c shared/misc/memProbe.c
shared_misc_rel_CPPFLAGS = $(AM_CPPFLAGS) $(M68K_CPPFLAGS)
shared_misc_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
endif

if m68040
## m68040/fpsp
noinst_PROGRAMS += m68040/fpsp.rel
noinst_PROGRAMS += m68040/fpsp_tmp.rel
m68040_fpsp_tmp_rel_SOURCES = m68040/fpsp/rtems_fpsp.c m68040/fpsp/bindec.S \
    m68040/fpsp/binstr.S m68040/fpsp/bugfix.S m68040/fpsp/decbin.S \
    m68040/fpsp/do_func.S m68040/fpsp/gen_except.S m68040/fpsp/get_op.S \
    m68040/fpsp/kernel_ex.S m68040/fpsp/res_func.S m68040/fpsp/round.S \
    m68040/fpsp/rtems_skel.S m68040/fpsp/sacos.S m68040/fpsp/sasin.S \
    m68040/fpsp/satan.S m68040/fpsp/satanh.S m68040/fpsp/scale.S \
    m68040/fpsp/scosh.S m68040/fpsp/setox.S m68040/fpsp/sgetem.S \
    m68040/fpsp/sint.S m68040/fpsp/slog2.S m68040/fpsp/slogn.S \
    m68040/fpsp/smovecr.S m68040/fpsp/srem_mod.S m68040/fpsp/ssin.S \
    m68040/fpsp/ssinh.S m68040/fpsp/stan.S m68040/fpsp/stanh.S \
    m68040/fpsp/sto_res.S m68040/fpsp/stwotox.S m68040/fpsp/tbldo.S \
    m68040/fpsp/util.S m68040/fpsp/x_bsun.S m68040/fpsp/x_fline.S \
    m68040/fpsp/x_operr.S m68040/fpsp/x_ovfl.S m68040/fpsp/x_snan.S \
    m68040/fpsp/x_store.S m68040/fpsp/x_unfl.S m68040/fpsp/x_unimp.S \
    m68040/fpsp/x_unsupp.S
m68040_fpsp_tmp_rel_CPPFLAGS = $(AM_CPPFLAGS)
m68040_fpsp_tmp_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)

# avoid name clashes and modifying the source by
# prefixing all (global) symbols in the binary
m68040/fpsp_tmp1.rel: m68040/fpsp_tmp.rel
	$(OBJCOPY) --prefix-symbols __fpsp_ $^ $@

# Then remove the prefix again on all global
# symbols we really need:
m68040/fpsp.rel: m68040/fpsp_tmp1.rel
	    $(OBJCOPY) --redefine-sym __fpsp_M68KFPSPInstallExceptionHandlers=M68KFPSPInstallExceptionHandlers --redefine-sym __fpsp_M68040FPSPUserExceptionHandlers=M68040FPSPUserExceptionHandlers --redefine-sym __fpsp__CPU_ISR_install_raw_handler=_CPU_ISR_install_raw_handler --redefine-sym __fpsp__FPSP_install_raw_handler=_FPSP_install_raw_handler $^ $@

noinst_HEADERS = m68040/fpsp/fpsp.defs
endif
EXTRA_DIST = m68040/fpsp/README

if mcf5206
# mcf5206/include
## mcf5206/clock
noinst_PROGRAMS += mcf5206/clock.rel
mcf5206_clock_rel_SOURCES = mcf5206/clock/ckinit.c
mcf5206_clock_rel_CPPFLAGS = $(AM_CPPFLAGS)
mcf5206_clock_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)

## mcf5206/mcfuart
noinst_PROGRAMS += mcf5206/mcfuart.rel
mcf5206_mcfuart_rel_SOURCES = mcf5206/console/mcfuart.c
mcf5206_mcfuart_rel_CPPFLAGS = $(AM_CPPFLAGS)
mcf5206_mcfuart_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)

## mcf5206/mbus
noinst_PROGRAMS += mcf5206/mbus.rel
mcf5206_mbus_rel_SOURCES = mcf5206/mbus/mcfmbus.c
mcf5206_mbus_rel_CPPFLAGS = $(AM_CPPFLAGS)
mcf5206_mbus_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)

## mcf5206/timer
noinst_PROGRAMS += mcf5206/timer.rel
mcf5206_timer_rel_SOURCES = mcf5206/timer/timer.c mcf5206/timer/timerisr.S
mcf5206_timer_rel_CPPFLAGS = $(AM_CPPFLAGS)
mcf5206_timer_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
endif

if mcf5223x
## mcf5223x/include
## mcf5223x/cache
noinst_PROGRAMS += mcf5223x/cachepd.rel
mcf5223x_cachepd_rel_SOURCES = mcf5223x/cache/cachepd.c
mcf5223x_cachepd_rel_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/shared/cache
mcf5223x_cachepd_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
endif

if mcf5225x
## mcf5225x/include
# mcf5225x/cache
noinst_PROGRAMS += mcf5225x/cachepd.rel
mcf5225x_cachepd_rel_SOURCES = mcf5225x/cache/cachepd.c
mcf5225x_cachepd_rel_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/shared/cache
mcf5225x_cachepd_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)

# Network
if HAS_NETWORKING
endif ## HAS_NETWORKING
endif

if mcf5235
## mcf5235/include
## mcf5235/cache
noinst_PROGRAMS += mcf5235/cachepd.rel
mcf5235_cachepd_rel_SOURCES = mcf5235/cache/cachepd.c
mcf5235_cachepd_rel_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/shared/cache
mcf5235_cachepd_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
endif

if mcf532x
## mcf532x/include
## mcf532x/cache
noinst_PROGRAMS += mcf532x/cachepd.rel
mcf532x_cachepd_rel_SOURCES = mcf532x/cache/cachepd.c
mcf532x_cachepd_rel_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/shared/cache
mcf532x_cachepd_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
endif

if mcf5272
## mcf5272/include
## clock
noinst_PROGRAMS += mcf5272/clock.rel
mcf5272_clock_rel_SOURCES = mcf5272/clock/ckinit.c
mcf5272_clock_rel_CPPFLAGS = $(AM_CPPFLAGS)
mcf5272_clock_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)

## timer
noinst_PROGRAMS += mcf5272/timer.rel
mcf5272_timer_rel_SOURCES = mcf5272/timer/timer.c mcf5272/timer/timerisr.S
mcf5272_timer_rel_CPPFLAGS = $(AM_CPPFLAGS)
mcf5272_timer_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
endif

if mcf5282
## mcf5282/include
noinst_PROGRAMS += mcf5282/cachepd.rel
mcf5282_cachepd_rel_SOURCES = mcf5282/cache/cachepd.c
mcf5282_cachepd_rel_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/shared/cache
mcf5282_cachepd_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
endif

if mcf548x
## mcf548x/include
## mcf548x/mcdma
noinst_PROGRAMS += mcf548x/mcdma.rel
mcf548x_mcdma_rel_SOURCES = mcf548x/mcdma/MCD_dmaApi.c mcf548x/mcdma/MCD_tasksInit.c \
                            mcf548x/mcdma/MCD_tasks.c  mcf548x/mcdma/mcdma_glue.c

mcf548x_mcdma_rel_CPPFLAGS = $(AM_CPPFLAGS)
mcf548x_mcdma_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
endif

include $(top_srcdir)/../../../automake/local.am