Home | History | Annotate | Line # | Download | only in fpsp
Makefile revision 1.7.30.2
      1  1.7.30.2  jdolecek #	$NetBSD: Makefile,v 1.7.30.2 2002/06/23 17:37:39 jdolecek Exp $
      2       1.4       cgd 
      3       1.1   mycroft #	MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
      4       1.1   mycroft #	M68000 Hi-Performance Microprocessor Division
      5       1.1   mycroft #	M68040 Software Package 
      6       1.1   mycroft #
      7       1.1   mycroft #	M68040 Software Package Copyright (c) 1993, 1994 Motorola Inc.
      8       1.1   mycroft #	All rights reserved.
      9       1.1   mycroft #
     10       1.1   mycroft #	THE SOFTWARE is provided on an "AS IS" basis and without warranty.
     11       1.1   mycroft #	To the maximum extent permitted by applicable law,
     12       1.1   mycroft #	MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED,
     13       1.1   mycroft #	INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
     14       1.1   mycroft #	PARTICULAR PURPOSE and any warranty against infringement with
     15       1.1   mycroft #	regard to the SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF)
     16       1.1   mycroft #	and any accompanying written materials. 
     17       1.1   mycroft #
     18       1.1   mycroft #	To the maximum extent permitted by applicable law,
     19       1.1   mycroft #	IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER
     20       1.1   mycroft #	(INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS
     21       1.1   mycroft #	PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR
     22       1.1   mycroft #	OTHER PECUNIARY LOSS) ARISING OF THE USE OR INABILITY TO USE THE
     23       1.1   mycroft #	SOFTWARE.  Motorola assumes no responsibility for the maintenance
     24       1.1   mycroft #	and support of the SOFTWARE.  
     25       1.1   mycroft #
     26       1.1   mycroft #	You are hereby granted a copyright license to use, modify, and
     27       1.1   mycroft #	distribute the SOFTWARE so long as this entire notice is retained
     28       1.1   mycroft #	without alteration in any modified and/or redistributed versions,
     29       1.1   mycroft #	and that such modified versions are clearly identified as such.
     30       1.1   mycroft #	No licenses are granted by implication, estoppel or otherwise
     31       1.1   mycroft #	under any patents or trademarks of Motorola, Inc.
     32       1.1   mycroft 
     33       1.1   mycroft #
     34       1.1   mycroft #	Makefile 3.3 3/27/91
     35       1.1   mycroft #
     36       1.1   mycroft #	Makefile for 68040 Floating Point Software Package
     37       1.1   mycroft #
     38       1.1   mycroft 
     39       1.2   mycroft TARGET = fpsp
     40       1.1   mycroft 
     41  1.7.30.1   thorpej CPPFLAGS=	${FPSPCPPFLAGS} ${FPSPMISCCPPFLAGS}
     42  1.7.30.1   thorpej .SUFFIXES:	.o .s .sa .defs .h
     43  1.7.30.1   thorpej 
     44  1.7.30.1   thorpej .PATH.h: ${FPSPDIR}
     45  1.7.30.1   thorpej .PATH.s: ${FPSPDIR}
     46  1.7.30.1   thorpej .PATH.sa: ${FPSPDIR}
     47  1.7.30.1   thorpej 
     48  1.7.30.1   thorpej AS?		= as
     49       1.7    jeremy LD?		= ld
     50  1.7.30.2  jdolecek .if defined(HAVE_GCC3)
     51  1.7.30.2  jdolecek AFLAGS		= -x assembler-with-cpp -m68040
     52  1.7.30.2  jdolecek .else
     53  1.7.30.1   thorpej AFLAGS		= -x assembler-with-cpp -traditional-cpp -m68040
     54  1.7.30.2  jdolecek .endif
     55       1.1   mycroft 
     56       1.1   mycroft #
     57       1.1   mycroft # For the Library Version:
     58       1.1   mycroft #
     59       1.7    jeremy AR?		= ar
     60       1.2   mycroft LIB_FILTER 	= sed 's/fpsp.defs/l_fpsp.defs/'
     61       1.2   mycroft LIB_TARGET	= lib$(TARGET).a
     62       1.1   mycroft #
     63       1.1   mycroft # SYS selects the template set to use
     64       1.1   mycroft #	templates are supplied for R3V6, CI5 and GEN(generic)
     65       1.1   mycroft # PREFIX is a string that begins a temporary label in the assembler
     66       1.1   mycroft #	R3V6 uses 'L%', CI5 likes '.L'
     67       1.1   mycroft #
     68       1.1   mycroft #SYS		= R3V6
     69       1.1   mycroft #PREFIX		= L%%
     70       1.1   mycroft #
     71       1.1   mycroft #SYS		= CI5
     72       1.1   mycroft #PREFIX		= .L
     73       1.1   mycroft #
     74       1.2   mycroft #SYS		= GEN
     75       1.2   mycroft #PREFIX		= L_
     76       1.2   mycroft #
     77       1.2   mycroft SYS		= GCC
     78       1.1   mycroft PREFIX		= L_
     79       1.1   mycroft 
     80       1.1   mycroft .sa.s:
     81  1.7.30.1   thorpej 	sh ${FPSPDIR}/asm2gas ${.IMPSRC} >${.TARGET}
     82       1.2   mycroft .h.defs:
     83  1.7.30.1   thorpej 	sh ${FPSPDIR}/asm2gas ${.IMPSRC} >${.TARGET}
     84       1.2   mycroft .s.o:
     85  1.7.30.1   thorpej 	${CC} ${AFLAGS} ${CPPFLAGS} -c -o ${.TARGET} ${.IMPSRC}
     86       1.1   mycroft 
     87       1.2   mycroft H_FILES = \
     88       1.2   mycroft 	fpsp.defs \
     89       1.2   mycroft 	l_fpsp.defs
     90       1.1   mycroft 
     91       1.2   mycroft O_FILES = \
     92       1.3   mycroft 	copyright.o \
     93       1.2   mycroft 	netbsd.o \
     94       1.2   mycroft 	bindec.o \
     95       1.2   mycroft 	binstr.o \
     96       1.2   mycroft 	decbin.o \
     97       1.2   mycroft 	do_func.o \
     98       1.2   mycroft 	gen_except.o \
     99       1.2   mycroft 	get_op.o \
    100       1.2   mycroft 	kernel_ex.o \
    101       1.2   mycroft 	res_func.o \
    102       1.2   mycroft 	round.o \
    103       1.2   mycroft 	sacos.o \
    104       1.2   mycroft 	sasin.o \
    105       1.2   mycroft 	satan.o \
    106       1.2   mycroft 	satanh.o \
    107       1.2   mycroft 	scosh.o \
    108       1.2   mycroft 	setox.o \
    109       1.2   mycroft 	sgetem.o \
    110       1.2   mycroft 	sint.o \
    111       1.2   mycroft 	slogn.o \
    112       1.2   mycroft 	slog2.o \
    113       1.2   mycroft 	smovecr.o \
    114       1.2   mycroft 	srem_mod.o \
    115       1.2   mycroft 	scale.o \
    116       1.2   mycroft 	ssin.o \
    117       1.2   mycroft 	ssinh.o \
    118       1.2   mycroft 	stan.o \
    119       1.2   mycroft 	stanh.o \
    120       1.2   mycroft 	sto_res.o \
    121       1.2   mycroft 	stwotox.o \
    122       1.2   mycroft 	tbldo.o \
    123       1.2   mycroft 	util.o \
    124       1.2   mycroft 	x_bsun.o \
    125       1.2   mycroft 	x_fline.o \
    126       1.2   mycroft 	x_operr.o \
    127       1.2   mycroft 	x_ovfl.o \
    128       1.2   mycroft 	x_snan.o \
    129       1.2   mycroft 	x_store.o \
    130       1.2   mycroft 	x_unfl.o \
    131       1.2   mycroft 	x_unimp.o \
    132       1.2   mycroft 	x_unsupp.o \
    133       1.2   mycroft 	bugfix.o
    134       1.2   mycroft 
    135       1.2   mycroft LIB_O_FILES	= \
    136       1.3   mycroft 	l_copyright.o \
    137       1.2   mycroft 	l_entry.o \
    138       1.2   mycroft 	l_do_func.o \
    139       1.2   mycroft 	l_round.o \
    140       1.2   mycroft 	l_sacos.o \
    141       1.2   mycroft 	l_sasin.o \
    142       1.2   mycroft 	l_satan.o \
    143       1.2   mycroft 	l_satanh.o \
    144       1.2   mycroft 	l_scale.o \
    145       1.2   mycroft 	l_scosh.o \
    146       1.2   mycroft 	l_setox.o \
    147       1.2   mycroft 	l_sgetem.o \
    148       1.2   mycroft 	l_sint.o \
    149       1.2   mycroft 	l_slog2.o \
    150       1.2   mycroft 	l_slogn.o \
    151       1.2   mycroft 	l_srem_mod.o \
    152       1.2   mycroft 	l_ssin.o \
    153       1.2   mycroft 	l_ssinh.o \
    154       1.2   mycroft 	l_stan.o \
    155       1.2   mycroft 	l_stanh.o \
    156       1.2   mycroft 	l_stwotox.o \
    157       1.2   mycroft 	l_support.o
    158       1.1   mycroft 
    159       1.2   mycroft S_FILES = \
    160       1.2   mycroft 	netbsd.s \
    161       1.1   mycroft 	bindec.s \
    162       1.1   mycroft 	binstr.s \
    163       1.1   mycroft 	decbin.s \
    164       1.1   mycroft 	do_func.s \
    165       1.1   mycroft 	get_op.s \
    166       1.1   mycroft 	gen_except.s \
    167       1.1   mycroft 	kernel_ex.s \
    168       1.1   mycroft 	res_func.s \
    169       1.1   mycroft 	round.s \
    170       1.1   mycroft 	sacos.s \
    171       1.1   mycroft 	sasin.s \
    172       1.1   mycroft 	satan.s \
    173       1.1   mycroft 	satanh.s \
    174       1.1   mycroft 	scosh.s \
    175       1.1   mycroft 	setox.s \
    176       1.1   mycroft 	sgetem.s \
    177       1.1   mycroft 	sint.s \
    178       1.1   mycroft 	slogn.s \
    179       1.1   mycroft 	slog2.s \
    180       1.1   mycroft 	smovecr.s \
    181       1.1   mycroft 	srem_mod.s \
    182       1.1   mycroft 	scale.s \
    183       1.1   mycroft 	ssin.s \
    184       1.1   mycroft 	ssinh.s \
    185       1.1   mycroft 	stan.s \
    186       1.1   mycroft 	stanh.s \
    187       1.1   mycroft 	sto_res.s \
    188       1.1   mycroft 	stwotox.s \
    189       1.1   mycroft 	tbldo.s \
    190       1.1   mycroft 	util.s \
    191       1.1   mycroft 	x_bsun.s \
    192       1.1   mycroft 	x_fline.s \
    193       1.1   mycroft 	x_operr.s \
    194       1.1   mycroft 	x_ovfl.s \
    195       1.1   mycroft 	x_snan.s \
    196       1.1   mycroft 	x_store.s \
    197       1.1   mycroft 	x_unfl.s \
    198       1.1   mycroft 	x_unimp.s \
    199       1.1   mycroft 	x_unsupp.s \
    200       1.2   mycroft 	bugfix.s
    201       1.2   mycroft 
    202       1.2   mycroft LIB_S_FILES	= \
    203       1.2   mycroft 	l_entry.sa l_entry.s \
    204       1.1   mycroft 	l_do_func.s \
    205       1.1   mycroft 	l_round.s \
    206       1.1   mycroft 	l_sacos.s \
    207       1.1   mycroft 	l_sasin.s \
    208       1.1   mycroft 	l_satan.s \
    209       1.1   mycroft 	l_satanh.s \
    210       1.1   mycroft 	l_scale.s \
    211       1.1   mycroft 	l_scosh.s \
    212       1.1   mycroft 	l_setox.s \
    213       1.1   mycroft 	l_sgetem.s \
    214       1.1   mycroft 	l_sint.s \
    215       1.1   mycroft 	l_slog2.s \
    216       1.1   mycroft 	l_slogn.s \
    217       1.1   mycroft 	l_srem_mod.s \
    218       1.1   mycroft 	l_ssin.s \
    219       1.1   mycroft 	l_ssinh.s \
    220       1.1   mycroft 	l_stan.s \
    221       1.1   mycroft 	l_stanh.s \
    222       1.1   mycroft 	l_stwotox.s \
    223       1.2   mycroft 	l_support.s
    224       1.1   mycroft 
    225       1.1   mycroft #
    226       1.1   mycroft #	Build the target object.  The linkfile is created on the fly.
    227       1.1   mycroft #	Change the SEG directives to suit your system.
    228       1.1   mycroft #
    229       1.2   mycroft $(TARGET).o:	$(O_FILES)
    230       1.2   mycroft 	$(LD) -r -o $(TARGET).o $(O_FILES)
    231       1.1   mycroft 
    232       1.1   mycroft #
    233       1.1   mycroft #	Just about every file needs fpsp.h so:
    234       1.1   mycroft #
    235       1.2   mycroft $(O_FILES):	fpsp.defs
    236       1.1   mycroft 
    237       1.1   mycroft #
    238       1.1   mycroft #-----------------------------------------------------------------------
    239       1.1   mycroft #
    240       1.1   mycroft #	For making a library version of the FPSP:
    241       1.1   mycroft #
    242       1.1   mycroft library:	$(LIB_TARGET)
    243       1.1   mycroft 
    244       1.2   mycroft $(LIB_TARGET):	$(LIB_O_FILES)
    245       1.1   mycroft 	rm -f $(LIB_TARGET)
    246       1.2   mycroft 	$(AR) crv $(LIB_TARGET) $(LIB_O_FILES)
    247       1.1   mycroft 
    248       1.2   mycroft $(LIB_O_FILES): l_fpsp.defs
    249       1.1   mycroft 
    250       1.1   mycroft #
    251       1.1   mycroft # The entry points to the library version are created here
    252       1.1   mycroft # by using two template files an awk script and a list of
    253       1.1   mycroft # the entry routines for each function.
    254       1.1   mycroft #
    255       1.1   mycroft l_entry.sa: L_ENTRY.AWK L_LIST MONADIC.$(SYS) DYADIC.$(SYS) l_fpsp.h
    256       1.1   mycroft 	awk -f L_ENTRY.AWK SYS=$(SYS) PREFIX=$(PREFIX) - <L_LIST|sh>l_entry.sa
    257       1.1   mycroft 
    258       1.1   mycroft #
    259       1.1   mycroft # Do_func.sa and round.sa need special editing to remove references that
    260       1.1   mycroft # aren't needed in the library version.  Beware that changes in
    261       1.1   mycroft # the source code may cause this editing to break....
    262       1.1   mycroft #
    263       1.2   mycroft l_do_func.s: do_func.s 
    264       1.3   mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    265       1.2   mycroft 	echo '/global.*do_func/,/^	rts/d' >.SCRIPT
    266       1.1   mycroft 	echo 'g/smovcr/d' >>.SCRIPT
    267       1.1   mycroft 	echo 'g/tblpre/d' >>.SCRIPT
    268       1.1   mycroft 	echo 'w' >>.SCRIPT
    269       1.1   mycroft 	echo 'q' >>.SCRIPT
    270       1.3   mycroft 	ed - ${.TARGET} <.SCRIPT
    271       1.1   mycroft 	rm .SCRIPT
    272       1.1   mycroft 
    273       1.2   mycroft l_round.s: round.s 
    274       1.3   mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    275       1.1   mycroft 	echo '/^not_E3:/-6,/^not_E3:/d' >.SCRIPT
    276       1.1   mycroft 	echo 'w' >>.SCRIPT
    277       1.1   mycroft 	echo 'q' >>.SCRIPT
    278       1.3   mycroft 	ed - ${.TARGET} <.SCRIPT
    279       1.1   mycroft 	rm .SCRIPT
    280       1.1   mycroft 
    281       1.3   mycroft l_copyright.s: copyright.s 
    282       1.3   mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    283       1.3   mycroft 
    284       1.2   mycroft l_sacos.s: sacos.s 
    285       1.3   mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    286       1.1   mycroft 
    287       1.2   mycroft l_sasin.s: sasin.s 
    288       1.3   mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    289       1.1   mycroft 
    290       1.2   mycroft l_satan.s: satan.s 
    291       1.3   mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    292       1.1   mycroft 
    293       1.2   mycroft l_satanh.s: satanh.s 
    294       1.3   mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    295       1.1   mycroft 
    296       1.2   mycroft l_scale.s: scale.s 
    297       1.3   mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    298       1.1   mycroft 
    299       1.2   mycroft l_scosh.s: scosh.s 
    300       1.3   mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    301       1.1   mycroft 
    302       1.2   mycroft l_setox.s: setox.s 
    303       1.3   mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    304       1.1   mycroft 
    305       1.2   mycroft l_sgetem.s: sgetem.s 
    306       1.3   mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    307       1.1   mycroft 
    308       1.2   mycroft l_sint.s: sint.s 
    309       1.3   mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    310       1.1   mycroft 
    311       1.2   mycroft l_slog2.s: slog2.s 
    312       1.3   mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    313       1.1   mycroft 
    314       1.2   mycroft l_slogn.s: slogn.s 
    315       1.3   mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    316       1.1   mycroft 
    317       1.2   mycroft l_srem_mod.s: srem_mod.s 
    318       1.3   mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    319       1.1   mycroft 
    320       1.2   mycroft l_ssin.s: ssin.s 
    321       1.3   mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    322       1.1   mycroft 
    323       1.2   mycroft l_ssinh.s: ssinh.s 
    324       1.3   mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    325       1.1   mycroft 
    326       1.2   mycroft l_stan.s: stan.s 
    327       1.3   mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    328       1.1   mycroft 
    329       1.2   mycroft l_stanh.s: stanh.s 
    330       1.3   mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    331       1.1   mycroft 
    332       1.2   mycroft l_stwotox.s: stwotox.s 
    333       1.3   mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    334       1.1   mycroft 
    335       1.1   mycroft #
    336       1.1   mycroft #	Extract all files from SCCS directory
    337       1.1   mycroft #
    338       1.1   mycroft clean:
    339       1.2   mycroft 	rm -f $(H_FILES)
    340       1.2   mycroft 	rm -f $(S_FILES)
    341       1.2   mycroft 	rm -f $(O_FILES)
    342       1.2   mycroft 	rm -f $(TARGET).o
    343       1.2   mycroft 	rm -f $(LIB_S_FILES)
    344       1.2   mycroft 	rm -f $(LIB_O_FILES)
    345       1.2   mycroft 	rm -f $(LIB_TARGET)
    346       1.1   mycroft 
    347       1.1   mycroft clobber:	clean
    348       1.1   mycroft 
    349