OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [libgloss/] [hp74x/] [Makefile.in] - Blame information for rev 1777

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 lampret
#
2
# Makefile
3
#   Copyright (C) 1990, 1991, 1992, 1993 ,1994 Free Software Foundation
4
#
5
# This file is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 2 of the License, or
8
# (at your option) any later version.
9
#
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
# GNU General Public License for more details.
14
#
15
# You should have received a copy of the GNU General Public License
16
# along with this program; if not, write to the Free Software
17
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
18
#
19
 
20
#
21
# Makefile for newlib/libc/stub/hppa. This is the board support code
22
# for the HP-PRO hppa embedded boards. 
23
#
24
 
25
VPATH = @srcdir@
26
srcdir = @srcdir@
27
objdir = .
28
srcroot = $(srcdir)/../..
29
objroot = $(objdir)/../..
30
 
31
prefix = @prefix
32
exec_prefix = @exec_prefix@
33
 
34
bindir = @bindir@
35
libdir = @libdir@
36
tooldir = $(exec_prefix)/$(target_alias)
37
 
38
INSTALL = @INSTALL@
39
INSTALL_PROGRAM = @INSTALL_PROGRAM@
40
INSTALL_DATA = @INSTALL_DATA@
41
 
42
SHELL = /bin/sh
43
 
44
CC = @CC@
45
 
46
AS = @AS@
47
AR = @AR@
48
LD = @LD@
49
RANLIB = @RANLIB@
50
 
51
#
52
# As the boot process only deals with LIF volumes, here's the src
53
# where we borrow existing code modules and where we put our
54
# boot image if we can bvuild one.
55
#
56
LIF_SRC = /usr/tftpdir/srcboot.lif
57
LIF_DEST = /usr/tftpdir/romboot.lif
58
 
59
HPDEFS = -D_INCLUDE_POSIX_SOURCE -D_INCLUDE_XOPEN_SOURCE \
60
         -D_INCLUDE_HPUX_SOURCE -DPCXT
61
 
62
LIBS_FOR_TARGET = -lc
63
 
64
#
65
# The original flags used by HP for the boot ROMS were
66
# CFLAGS_FOR_TARGET = -c -Aa +O3 +OS -Wc,-DA1.0 -Wc,-DS1.0 +ESfic +ESsfc ${HPDEFS}
67
CFLAGS_FOR_TARGET = -c -Wd,-a -g
68
# the original value for -R was 0
69
LDFLAGS_FOR_TARGET =  -v -t -N -R 10000 -a archive
70
INCLUDES = -I${srcdir}
71
 
72
BSP_OBJS= pa_stub.o debugger.o iva_table.o io.o
73
STUBCRT0=crt0.o
74
STUBLIB=hppa.o
75
LDSCRIPT=hppa.ld
76
SHARED_DIR=
77
SHARED_OBJS=
78
# SHARED_OBJS=$(SHARED_DIR)
79
 
80
# Host specific makefile fragment comes in here.
81
@host_makefile_frag@
82
 
83
all: boot
84
 
85
# this target is only for testing
86
test: ${STUBCRT0} $(STUBLIB) test.o $(BSP_OBJS)
87
#       ${LD} $(LDFLAGS_FOR_TARGET) ${STUBCRT0} test.o $(BSP_OBJS) -o test $(LIBS_FOR_TARGET)
88
        rootme=`pwd` ; \
89
        ${LD} $(LDFLAGS_FOR_TARGET) ${STUBCRT0} test.o pa_stub.o debugger.o iva_table.o io.o -o test $(LIBS_FOR_TARGET)
90
 
91
$(STUBLIB): $(BSP_OBJS)
92
        ${LD} -r $(BSP_OBJS) $(SHARED_OBJS) -o $(STUBLIB)
93
 
94
checksum: $(srcdir)/checksum.c
95
        $(CC) -g $(srcdir)/checksum.c -o checksum
96
 
97
# this is the target from HP's Makefile, it may be bogus
98
hpstub: $(OBJS)
99
        $(LD) $(LDFLAGS_FOR_TARGET) -e main -o $@ $(LIBRARY)/crt1.o \
100
        $(OBJS) -lc -m >stub.map
101
 
102
install:
103
        $(INSTALL_PROGRAM) $(STUBLIB) $(tooldir)/lib/$(MULTISUBDIR)$(STUBLIB)
104
        $(INSTALL_PROGRAM) $(SHARED_DIR)/$(STUBCRT0) $(tooldir)/lib/$(MULTISUBDIR)$(STUBCRT0)
105
        $(INSTALL_PROGRAM) $(srcdir)/$(LDSCRIPT) $(tooldir)/lib/$(LDSCRIPT)
106
 
107
.c.o:
108
        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $<
109
 
110
.c.s:
111
        $(CC) $(CFLAGS_FOR_TARGET) -S $(INCLUDES) $<
112
#       $(CC) $(CFLAGS_FOR_TARGET) $(NEWLIB_CFLAGS) $(INCLUDES) -c $<
113
 
114
.s.o:
115
        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $<
116
#       $(AS) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $<
117
 
118
.SUFFIXES: .S .c .o .s .lif
119
#
120
# lifinit --
121
#       -vnnn   Sets volume size to nnn bytes.
122
#               nnn must be a multiple of 256.
123
#       -d      Sets directory size to nnn file entries.
124
#               nnn must be a multiple of 8.
125
#       -nsss   Sets the volume name to be sss.
126
#       -Knnn   Forces the directory start location to be the
127
#               nearest multiple of nnn x 1024 bytes.
128
#       -snnn   set the initial system load (ISL) start address to
129
#               nnn in the volume label
130
#       -lnnn   Specifies the length in bytes of the ISL code.
131
#       -ennn   Set the ISL entry point to nnn bytes from the
132
#               beginning of the ISL
133
#
134
# lifcp --
135
#       -r      Forces RAW mode copying.
136
#       -T      Sets the file type of the directory entry.
137
#               ASCII is 1
138
#               BIN is -23951
139
#               BINARY is -2
140
#       -Knnn   forces each file copied in to begin on a nnn x
141
#               1024-byte boundary from the beginning of the volume
142
#       Note: the word echoed below MUST be 10 characters exactly.
143
#
144
# somxtract infile outfile --
145
#       converts a series 800 file *only* into a raw image
146
#
147
LIF_VOL = this_lif
148
# 65532
149
boot: test checksum
150
#        FIXME: This fills up the hard disk unless "-R" is used
151
        @rm -f ${LIF_VOL} ${LIF_DEST}
152
        @ipl_entry=`nm -t d $< | grep "T .START." | sed -e 's/T .START.//' -e 's/^0*//'` ; \
153
        echo "Entry point is at $${ipl_entry}" ; \
154
        if test x"$${ipl_entry}" != x  ; then \
155
        ipl_entry=`expr $${ipl_entry} - 65536` ; \
156
        echo "Entry point offset is $${ipl_entry}" ; \
157
        cp $< $<.raw ; \
158
        rm -f $<.dis ; \
159
        objdump -d $< > $<.dis ; \
160
        somxtract $< $<.raw ; \
161
        ipl_size=`checksum -s $<.raw $<.image  | sed -e 's/ is the.*//'` ; \
162
        echo "IPL_SIZE is $${ipl_size}" ; \
163
            lifinit -v64000000 -d64 -n"CYGNUS    " -K2 -s4096 -l$${ipl_size} -e$${ipl_entry} ${LIF_DEST} ;\
164
            else \
165
                echo "ERROR: \$$START\$$ symbol not found" ; \
166
            fi
167
        @chmod a+rw $<.image
168
        @lifcp -r -K2 $<.image ${LIF_DEST}:TEST
169
        @rm -f $<.image $<.dis
170
        @lifls -l ${LIF_DEST}
171
        @objdump -d $< > $<.dis
172
 
173
.S.o:
174
        rm -f $*.s
175
        ${CPP} $< > $*.s
176
        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $*.s
177
#       $(CC) $(CFLAGS_FOR_TARGET) $(NEWLIB_CFLAGS) $(INCLUDES) -c $<
178
 
179
.c.list:
180
        $(CC) $(CFLAGS) $*.c -S
181
        $(AS) $(AFLAGS) $*.s -Wa,-l > $*.list
182
        rm $*.s
183
 
184
.s.list:
185
        $(AS) $(AFLAGS) $*.s -Wa,-l > $*.list
186
 
187
doc:
188
 
189
clean mostlyclean:
190
        rm -f *~ *.map *.list stub romboot.lif a.out *.raw *.image
191
        rm -f *.o $(STUBLIB) $(STUBCRT0) checksum *.dis test
192
 
193
distclean maintainer-clean realclean: clean
194
        rm -f Makefile config.cache config.log config.status
195
 
196
pa_stub.o:      $(srcdir)/pa_stub.c
197
debugger.o:     $(srcdir)/debugger.s
198
iva_table.o:    $(srcdir)/iva_table.s
199
io.o:           $(srcdir)/io.c
200
crt0.o:         $(srcdir)/crt0.s
201
test.o:         $(srcdir)/test.c
202
term_in.o:      $(srcdir)/term_in.s
203
term_out.o:     $(srcdir)/term_out.s
204
term_init.o:    $(srcdir)/term_init.s
205
 
206
.PHONY: info install-info clean-info
207
info:
208
install-info:
209
clean-info:
210
 
211
Makefile: Makefile.in config.status @host_makefile_frag_path@
212
        $(SHELL) config.status
213
 
214
config.status: configure
215
        $(SHELL) config.status --recheck

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.