summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/sh/sh7032/Makefile.am
blob: 8ec633120859764647d89e7758754eb40309996b (plain)
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
##
## $Id$
##

ACLOCAL_AMFLAGS = -I ../../../../aclocal

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

# NOTE: Unlike other CPUS, we install into a subdirectory to avoid
#       file name conflicts
include_shdir = $(includedir)/sh
include_rtems_scoredir = $(includedir)/rtems/score

include_sh_HEADERS = include/sci.h include/sh7_pfc.h include/sh7_sci.h
include_rtems_score_HEADERS = include/ispsh7032.h include/iosh7032.h

# clock

PGMS = $(ARCH)/clock.rel

clock_C_FILES = clock/ckinit.c
clock_rel_OBJECTS = $(clock_C_FILES:clock/%.c=$(ARCH)/%.$(OBJEXT))
EXTRA_DIST = $(clock_C_FILES)

${ARCH}/%.$(OBJEXT): clock/%.c $(ARCH)/$(dirstamp)
	${COMPILE} -o $@ -c $<
${ARCH}/clock.rel: $(clock_rel_OBJECTS)
	${make-rel}

# delay

PGMS += $(ARCH)/delay.rel

delay_C_FILES = delay/delay.c
delay_rel_OBJECTS = $(delay_C_FILES:delay/%.c=$(ARCH)/%.$(OBJEXT))
EXTRA_DIST += $(delay_C_FILES)

${ARCH}/%.$(OBJEXT): delay/%.c $(ARCH)/$(dirstamp)
	${COMPILE} -o $@ -c $<
${ARCH}/delay.rel: $(delay_rel_OBJECTS)
	${make-rel}

# sci

PGMS += $(ARCH)/sci.rel

sci_C_FILES = sci/sci.c
sci_rel_OBJECTS = $(sci_C_FILES:sci/%.c=$(ARCH)/%.$(OBJEXT))
EXTRA_DIST += $(sci_C_FILES)

${ARCH}/%.$(OBJEXT): sci/%.c $(ARCH)/$(dirstamp)
	${COMPILE} -o $@ -c $<
${ARCH}/sci.rel: $(sci_rel_OBJECTS)
	${make-rel}

# score

PGMS += $(ARCH)/score.rel

score_C_FILES = score/cpu_asm.c score/ispsh7032.c
score_rel_OBJECTS = $(score_C_FILES:score/%.c=$(ARCH)/%.$(OBJEXT))
EXTRA_DIST += $(score_C_FILES)

${ARCH}/%.$(OBJEXT): score/%.c $(ARCH)/$(dirstamp)
	${COMPILE} -o $@ -c $<
${ARCH}/score.rel: $(score_rel_OBJECTS)
	${make-rel}

## timer

PGMS += $(ARCH)/timer.rel

timer_C_FILES = timer/timer.c
timer_rel_OBJECTS = $(timer_C_FILES:timer/%.c=$(ARCH)/%.$(OBJEXT))
EXTRA_DIST += $(timer_C_FILES)

${ARCH}/%.$(OBJEXT): timer/%.c $(ARCH)/$(dirstamp)
	${COMPILE} -o $@ -c $<
${ARCH}/timer.rel: $(timer_rel_OBJECTS)
	${make-rel}

all-local: $(PGMS) $(TMPINSTALL_FILES)

.PRECIOUS: $(PGMS)

PREINSTALL_FILES =

$(PROJECT_INCLUDE)/sh/$(dirstamp):
	@$(mkinstalldirs) $(PROJECT_INCLUDE)/sh
	@: > $(PROJECT_INCLUDE)/sh/$(dirstamp)
PREINSTALL_FILES += $(PROJECT_INCLUDE)/sh/$(dirstamp)

$(PROJECT_INCLUDE)/rtems/score/$(dirstamp):
	@$(mkinstalldirs) $(PROJECT_INCLUDE)/rtems/score
	@: > $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)

$(PROJECT_INCLUDE)/sh/sci.h: include/sci.h $(PROJECT_INCLUDE)/sh/$(dirstamp)
	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/sh/sci.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/sh/sci.h

$(PROJECT_INCLUDE)/sh/sh7_pfc.h: include/sh7_pfc.h $(PROJECT_INCLUDE)/sh/$(dirstamp)
	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/sh/sh7_pfc.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/sh/sh7_pfc.h

$(PROJECT_INCLUDE)/sh/sh7_sci.h: include/sh7_sci.h $(PROJECT_INCLUDE)/sh/$(dirstamp)
	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/sh/sh7_sci.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/sh/sh7_sci.h

$(PROJECT_INCLUDE)/rtems/score/ispsh7032.h: include/ispsh7032.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/ispsh7032.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/ispsh7032.h

$(PROJECT_INCLUDE)/rtems/score/iosh7032.h: include/iosh7032.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/iosh7032.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/iosh7032.h

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