source: trunk/libs/newlib/src/libgloss/pa/Makefile.in @ 673

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

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

File size: 4.5 KB
Line 
1# Copyright (c) 1995, 1996 Cygnus Support
2#
3# The authors hereby grant permission to use, copy, modify, distribute,
4# and license this software and its documentation for any purpose, provided
5# that existing copyright notices are retained in all copies and that this
6# notice is included verbatim in any distributions. No written agreement,
7# license, or royalty fee is required for any of the authorized uses.
8# Modifications to this software may be copyrighted by their authors
9# and need not follow the licensing terms described here, provided that
10# the new terms are clearly indicated on the first page of each file where
11# they apply.
12#
13DESTDIR =
14VPATH = @srcdir@
15srcdir = @srcdir@
16objdir = .
17srcroot = $(srcdir)/../..
18objroot = $(objdir)/../..
19
20prefix = @prefix@
21exec_prefix = @exec_prefix@
22
23host_alias = @host_alias@
24target_alias = @target_alias@
25
26bindir = @bindir@
27libdir = @libdir@
28tooldir = $(exec_prefix)/$(target_alias)
29
30# Multilib support variables.
31# TOP is used instead of MULTI{BUILD,SRC}TOP.
32MULTIDIRS =
33MULTISUBDIR =
34MULTIDO = true
35MULTICLEAN = true
36
37INSTALL = @INSTALL@
38INSTALL_PROGRAM = @INSTALL_PROGRAM@
39INSTALL_DATA = @INSTALL_DATA@
40
41SHELL = /bin/sh
42
43CC = @CC@
44
45AS = @AS@
46AR = @AR@
47LD = @LD@
48RANLIB = @RANLIB@
49
50OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
51        then echo ${objroot}/../binutils/objdump ; \
52        else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
53OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
54        then echo ${objroot}/../binutils/objcopy ; \
55        else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
56
57SCRIPTS = w89k op50n
58CRT0 = crt0.o
59OBJS = close.o fstat.o getpid.o isatty.o kill.o \
60        lseek.o open.o print.o putnum.o read.o sbrk.o stat.o \
61        unlink.o write.o hp-milli.o
62
63CFLAGS = -g
64# ARFLAGS = rv
65
66#
67# here's all the Oki OP50N target stuff
68#
69OKI_LDFLAGS= -L${srcdir} -Top50n.ld $(LDFLAGS_FOR_TARGET) -Ttext 40000 -Map oki.map
70OKI_BSP= libop50n.a
71OKI_OBJS= op50nled.o op50n-io.o
72
73#
74# here's all the WinBind W89k target stuff
75#
76WEC_LDFLAGS= -L${srcdir} -Tw89k.ld $(LDFLAGS_FOR_TARGET) -Ttext 100000 -Map wec.map
77WEC_BSP= libw89k.a
78WEC_OBJS= w89k-io.o
79
80# Host specific makefile fragment comes in here.
81@host_makefile_frag@
82
83#
84# build a test program for each target board. Just trying to get
85# it to link is a good test, so we ignore all the errors for now.
86#
87
88all: ${CRT0} ${OKI_BSP} ${WEC_BSP}
89
90test: ${CRT0} test.o ${OKI_BSP} ${WEC_BSP}
91        @for script in ${SCRIPTS}; do \
92          echo Building $@ for $${script}... ; \
93            ${CC} $(CFLAGS_FOR_TARGET) $(INCLUDES) -L${objdir} \
94            -m$${script} test.o -L. \
95            -o $${script}-test.x $(LIBS_FOR_TARGET) ; \
96            if [ -s $${script}-test.x ] ; then  \
97              echo "Making an srecord for $${script}-test.x..." ; \
98              ${OBJCOPY} -O srec $${script}-test.x $${script}-test.srec ; \
99              echo "Making an disassembly file for $${script}-test.x..." ; \
100              rm -f $${script}-test.dis ; \
101              ${OBJDUMP} -d $${script}-test.x > $${script}-test.dis ; \
102            else  \
103              rm $${script}-test.x ; \
104              echo "WARNING: $${script}-test didn't build." ; \
105            fi ; \
106        done
107
108#
109# here's where we build the board support packages for each target
110#
111${OKI_BSP}: $(OBJS) ${OKI_OBJS}
112        ${AR} ${ARFLAGS} $@ $(OBJS) ${OKI_OBJS}
113        ${RANLIB} $@
114
115${WEC_BSP}: $(OBJS) ${WEC_OBJS}
116        ${AR} ${ARFLAGS} $@ $(OBJS) ${WEC_OBJS}
117        ${RANLIB} $@
118
119op50n-test.x: test.o ${srcdir}/test.c ${OKI_BSP} ${WEC_BSP}
120w89k-test.x: test.o ${srcdir}/test.c ${OKI_BSP} ${WEC_BSP}
121
122doc:   
123
124clean mostlyclean:
125        rm -f a.out core *.i *~ *.o *-test *.srec *.dis *.map *.x
126
127distclean maintainer-clean realclean: clean
128        rm -f Makefile config.cache config.log config.status
129
130.PHONY: install info install-info clean-info
131install:
132        $(INSTALL_PROGRAM) $(CRT0) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(CRT0)
133        # install Oki stuff
134        $(INSTALL_PROGRAM) $(OKI_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(OKI_BSP)
135        $(INSTALL_DATA) ${srcdir}/op50n.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/op50n.ld
136        # install WinBond stuff
137        $(INSTALL_PROGRAM) $(WEC_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(WEC_BSP)
138        $(INSTALL_DATA) ${srcdir}/w89k.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/w89k.ld
139
140info:
141install-info:
142clean-info:
143
144test.o: ${srcdir}/test.c
145${CRT0}:${srcdir}/crt0.S
146op50n-io.o: ${srcdir}/op50n-io.S
147op50nled.o: ${srcdir}/op50nled.c
148
149# target specific makefile fragment comes in here.
150@target_makefile_frag@
151
152Makefile: Makefile.in config.status @host_makefile_frag_path@ @target_makefile_frag_path@
153        $(SHELL) config.status
154
155config.status: configure
156        $(SHELL) config.status --recheck
Note: See TracBrowser for help on using the repository browser.