source: trunk/libs/newlib/src/libgloss/xstormy16/Makefile.in @ 546

Last change on this file since 546 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 2.8 KB
Line 
1#
2#
3
4DESTDIR =
5VPATH = @srcdir@ @srcdir@/..
6srcdir = @srcdir@
7objdir = .
8srcroot = $(srcdir)/../..
9objroot = $(objdir)/../..
10
11prefix = @prefix@
12exec_prefix = @exec_prefix@
13
14host_alias = @host_alias@
15target_alias = @target_alias@
16
17bindir = @bindir@
18libdir = @libdir@
19tooldir = $(exec_prefix)/$(target_alias)
20
21INSTALL = @INSTALL@
22INSTALL_PROGRAM = @INSTALL_PROGRAM@
23INSTALL_DATA = @INSTALL_DATA@
24
25# Multilib support variables.
26# TOP is used instead of MULTI{BUILD,SRC}TOP.
27MULTIDIRS =
28MULTISUBDIR =
29
30SHELL = /bin/sh
31
32CC = @CC@
33
34AS = @AS@
35AR = @AR@
36LD = @LD@
37RANLIB = @RANLIB@
38
39# Yuk.
40OBJCOPY = $(subst ranlib,objcopy,$(RANLIB))
41
42OBJS            = isatty.o
43CFLAGS          = -g -O2
44ASFLAGS         = --gdwarf2
45SCRIPTS         =
46CRT             = crt0.o crti.o crtn.o
47
48# Here is all of the simulator stuff
49SIM_SCRIPTS     = sim_high.ld sim_rom.ld
50SIM_LDFLAGS     =
51SIM_BSP         = libsim.a
52SIM_OBJS        = syscalls.o sim_malloc_start.o
53
54# Here is stuff for building apps for GDB on the EVA board
55EVA_APP_BSP     = libeva_app.a
56EVA_APP_OBJS    = close.o fstat.o getpid.o kill.o lseek.o open.o \
57                  stat.o unlink.o eva_app.o
58EVA_APP_SCRIPTS = eva_app.ld
59
60# Stub stuff
61EVA_STUB_HEX    = eva_stub.hex
62EVA_STUB        = eva_stub.elf
63EVA_STUB_OBJS   = xstormy16_stub.o crt0_stub.o
64
65# Host specific makefile fragment comes in here.
66@host_makefile_frag@
67
68#
69# build a test program for each target board. Just trying to get
70# it to link is a good test, so we ignore all the errors for now.
71#
72# all: ${MON_CRT0} ${MON_BSP}
73all: ${CRT} ${SIM_BSP} ${EVA_APP_BSP} ${EVA_STUB_HEX}
74
75#
76# here's where we build the board support packages for each target
77#
78${SIM_BSP}: ${OBJS} ${SIM_OBJS}
79        ${AR} ${ARFLAGS} ${SIM_BSP} ${SIM_OBJS} ${OBJS}
80        ${RANLIB} ${SIM_BSP}
81
82${EVA_APP_BSP}: ${OBJS} ${EVA_APP_OBJS}
83        ${AR} ${ARFLAGS} ${EVA_APP_BSP} ${EVA_APP_OBJS} ${OBJS}
84        ${RANLIB} ${EVA_APP_BSP}
85
86${EVA_STUB_HEX}: ${EVA_STUB}
87        ${OBJCOPY} -O ihex $< $@
88
89${EVA_STUB}: ${EVA_STUB_OBJS} ${srcdir}/eva_stub.ld
90        ${CC} -g -Os -nostartfiles -T${srcdir}/eva_stub.ld ${EVA_STUB_OBJS} -o $@
91
92
93#
94# here's where we build the test programs for each target
95#
96.PHONY: test
97test:   
98        true
99
100#
101#
102#
103.c.S:
104        ${CC} ${CFLAGS_FOR_TARGET} -c $<
105
106clean mostlyclean:
107        rm -f a.out core *.i *.o *-test *.srec *.dis *.x *.hex $(SIM_BSP) $(EVA_APP_BSP) $(EVA_STUB)
108
109distclean maintainer-clean realclean: clean
110        rm -f Makefile config.status *~
111
112.PHONY: install info install-info clean-info
113install:
114        set -e; for x in ${SIM_BSP} ${CRT} ${EVA_APP_BSP} ${EVA_STUB_HEX} ${EVA_STUB} ; do\
115          ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; \
116        done
117        @for script in ${SCRIPTS} ${SIM_SCRIPTS} ${EVA_APP_SCRIPTS}; do\
118          ${INSTALL_DATA} ${srcdir}/$${script} $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$${script}; \
119        done
120
121
122doc:
123info:
124install-info:
125clean-info:
126
127Makefile: Makefile.in config.status @host_makefile_frag_path@
128        $(SHELL) config.status
129
130config.status: configure
131        $(SHELL) config.status --recheck
Note: See TracBrowser for help on using the repository browser.