Home | History | Annotate | Line # | Download | only in fpsp
Makefile revision 1.10.6.2
      1  1.10.6.1    skrll #	$NetBSD: Makefile,v 1.10.6.2 2004/09/18 14:36:16 skrll 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.10.6.1    skrll .include <bsd.sys.mk>		# for HOST_SH
     40  1.10.6.1    skrll 
     41       1.2  mycroft TARGET = fpsp
     42       1.1  mycroft 
     43       1.9  tsutsui CPPFLAGS=	${FPSPCPPFLAGS} ${FPSPMISCCPPFLAGS}
     44       1.8      chs .SUFFIXES:	.o .s .sa .defs .h
     45       1.8      chs 
     46       1.8      chs .PATH.h: ${FPSPDIR}
     47       1.8      chs .PATH.s: ${FPSPDIR}
     48       1.8      chs .PATH.sa: ${FPSPDIR}
     49       1.8      chs 
     50       1.9  tsutsui AS?		= as
     51       1.7   jeremy LD?		= ld
     52      1.10  thorpej .if defined(HAVE_GCC3)
     53      1.10  thorpej AFLAGS		= -x assembler-with-cpp -m68040
     54      1.10  thorpej .else
     55       1.9  tsutsui AFLAGS		= -x assembler-with-cpp -traditional-cpp -m68040
     56      1.10  thorpej .endif
     57       1.1  mycroft 
     58       1.1  mycroft #
     59       1.1  mycroft # For the Library Version:
     60       1.1  mycroft #
     61       1.7   jeremy AR?		= ar
     62       1.2  mycroft LIB_FILTER 	= sed 's/fpsp.defs/l_fpsp.defs/'
     63       1.2  mycroft LIB_TARGET	= lib$(TARGET).a
     64       1.1  mycroft #
     65       1.1  mycroft # SYS selects the template set to use
     66       1.1  mycroft #	templates are supplied for R3V6, CI5 and GEN(generic)
     67       1.1  mycroft # PREFIX is a string that begins a temporary label in the assembler
     68       1.1  mycroft #	R3V6 uses 'L%', CI5 likes '.L'
     69       1.1  mycroft #
     70       1.1  mycroft #SYS		= R3V6
     71       1.1  mycroft #PREFIX		= L%%
     72       1.1  mycroft #
     73       1.1  mycroft #SYS		= CI5
     74       1.1  mycroft #PREFIX		= .L
     75       1.1  mycroft #
     76       1.2  mycroft #SYS		= GEN
     77       1.2  mycroft #PREFIX		= L_
     78       1.2  mycroft #
     79       1.2  mycroft SYS		= GCC
     80       1.1  mycroft PREFIX		= L_
     81       1.1  mycroft 
     82       1.1  mycroft .sa.s:
     83  1.10.6.1    skrll 	${HOST_SH} ${FPSPDIR}/asm2gas ${.IMPSRC} >${.TARGET}
     84       1.2  mycroft .h.defs:
     85  1.10.6.1    skrll 	${HOST_SH} ${FPSPDIR}/asm2gas ${.IMPSRC} >${.TARGET}
     86       1.2  mycroft .s.o:
     87       1.9  tsutsui 	${CC} ${AFLAGS} ${CPPFLAGS} -c -o ${.TARGET} ${.IMPSRC}
     88       1.1  mycroft 
     89       1.2  mycroft H_FILES = \
     90       1.2  mycroft 	fpsp.defs \
     91       1.2  mycroft 	l_fpsp.defs
     92       1.1  mycroft 
     93       1.2  mycroft O_FILES = \
     94       1.3  mycroft 	copyright.o \
     95       1.2  mycroft 	netbsd.o \
     96       1.2  mycroft 	bindec.o \
     97       1.2  mycroft 	binstr.o \
     98       1.2  mycroft 	decbin.o \
     99       1.2  mycroft 	do_func.o \
    100       1.2  mycroft 	gen_except.o \
    101       1.2  mycroft 	get_op.o \
    102       1.2  mycroft 	kernel_ex.o \
    103       1.2  mycroft 	res_func.o \
    104       1.2  mycroft 	round.o \
    105       1.2  mycroft 	sacos.o \
    106       1.2  mycroft 	sasin.o \
    107       1.2  mycroft 	satan.o \
    108       1.2  mycroft 	satanh.o \
    109       1.2  mycroft 	scosh.o \
    110       1.2  mycroft 	setox.o \
    111       1.2  mycroft 	sgetem.o \
    112       1.2  mycroft 	sint.o \
    113       1.2  mycroft 	slogn.o \
    114       1.2  mycroft 	slog2.o \
    115       1.2  mycroft 	smovecr.o \
    116       1.2  mycroft 	srem_mod.o \
    117       1.2  mycroft 	scale.o \
    118       1.2  mycroft 	ssin.o \
    119       1.2  mycroft 	ssinh.o \
    120       1.2  mycroft 	stan.o \
    121       1.2  mycroft 	stanh.o \
    122       1.2  mycroft 	sto_res.o \
    123       1.2  mycroft 	stwotox.o \
    124       1.2  mycroft 	tbldo.o \
    125       1.2  mycroft 	util.o \
    126       1.2  mycroft 	x_bsun.o \
    127       1.2  mycroft 	x_fline.o \
    128       1.2  mycroft 	x_operr.o \
    129       1.2  mycroft 	x_ovfl.o \
    130       1.2  mycroft 	x_snan.o \
    131       1.2  mycroft 	x_store.o \
    132       1.2  mycroft 	x_unfl.o \
    133       1.2  mycroft 	x_unimp.o \
    134       1.2  mycroft 	x_unsupp.o \
    135       1.2  mycroft 	bugfix.o
    136       1.2  mycroft 
    137       1.2  mycroft LIB_O_FILES	= \
    138       1.3  mycroft 	l_copyright.o \
    139       1.2  mycroft 	l_entry.o \
    140       1.2  mycroft 	l_do_func.o \
    141       1.2  mycroft 	l_round.o \
    142       1.2  mycroft 	l_sacos.o \
    143       1.2  mycroft 	l_sasin.o \
    144       1.2  mycroft 	l_satan.o \
    145       1.2  mycroft 	l_satanh.o \
    146       1.2  mycroft 	l_scale.o \
    147       1.2  mycroft 	l_scosh.o \
    148       1.2  mycroft 	l_setox.o \
    149       1.2  mycroft 	l_sgetem.o \
    150       1.2  mycroft 	l_sint.o \
    151       1.2  mycroft 	l_slog2.o \
    152       1.2  mycroft 	l_slogn.o \
    153       1.2  mycroft 	l_srem_mod.o \
    154       1.2  mycroft 	l_ssin.o \
    155       1.2  mycroft 	l_ssinh.o \
    156       1.2  mycroft 	l_stan.o \
    157       1.2  mycroft 	l_stanh.o \
    158       1.2  mycroft 	l_stwotox.o \
    159       1.2  mycroft 	l_support.o
    160       1.1  mycroft 
    161       1.2  mycroft S_FILES = \
    162       1.2  mycroft 	netbsd.s \
    163       1.1  mycroft 	bindec.s \
    164       1.1  mycroft 	binstr.s \
    165       1.1  mycroft 	decbin.s \
    166       1.1  mycroft 	do_func.s \
    167       1.1  mycroft 	get_op.s \
    168       1.1  mycroft 	gen_except.s \
    169       1.1  mycroft 	kernel_ex.s \
    170       1.1  mycroft 	res_func.s \
    171       1.1  mycroft 	round.s \
    172       1.1  mycroft 	sacos.s \
    173       1.1  mycroft 	sasin.s \
    174       1.1  mycroft 	satan.s \
    175       1.1  mycroft 	satanh.s \
    176       1.1  mycroft 	scosh.s \
    177       1.1  mycroft 	setox.s \
    178       1.1  mycroft 	sgetem.s \
    179       1.1  mycroft 	sint.s \
    180       1.1  mycroft 	slogn.s \
    181       1.1  mycroft 	slog2.s \
    182       1.1  mycroft 	smovecr.s \
    183       1.1  mycroft 	srem_mod.s \
    184       1.1  mycroft 	scale.s \
    185       1.1  mycroft 	ssin.s \
    186       1.1  mycroft 	ssinh.s \
    187       1.1  mycroft 	stan.s \
    188       1.1  mycroft 	stanh.s \
    189       1.1  mycroft 	sto_res.s \
    190       1.1  mycroft 	stwotox.s \
    191       1.1  mycroft 	tbldo.s \
    192       1.1  mycroft 	util.s \
    193       1.1  mycroft 	x_bsun.s \
    194       1.1  mycroft 	x_fline.s \
    195       1.1  mycroft 	x_operr.s \
    196       1.1  mycroft 	x_ovfl.s \
    197       1.1  mycroft 	x_snan.s \
    198       1.1  mycroft 	x_store.s \
    199       1.1  mycroft 	x_unfl.s \
    200       1.1  mycroft 	x_unimp.s \
    201       1.1  mycroft 	x_unsupp.s \
    202       1.2  mycroft 	bugfix.s
    203       1.2  mycroft 
    204       1.2  mycroft LIB_S_FILES	= \
    205       1.2  mycroft 	l_entry.sa l_entry.s \
    206       1.1  mycroft 	l_do_func.s \
    207       1.1  mycroft 	l_round.s \
    208       1.1  mycroft 	l_sacos.s \
    209       1.1  mycroft 	l_sasin.s \
    210       1.1  mycroft 	l_satan.s \
    211       1.1  mycroft 	l_satanh.s \
    212       1.1  mycroft 	l_scale.s \
    213       1.1  mycroft 	l_scosh.s \
    214       1.1  mycroft 	l_setox.s \
    215       1.1  mycroft 	l_sgetem.s \
    216       1.1  mycroft 	l_sint.s \
    217       1.1  mycroft 	l_slog2.s \
    218       1.1  mycroft 	l_slogn.s \
    219       1.1  mycroft 	l_srem_mod.s \
    220       1.1  mycroft 	l_ssin.s \
    221       1.1  mycroft 	l_ssinh.s \
    222       1.1  mycroft 	l_stan.s \
    223       1.1  mycroft 	l_stanh.s \
    224       1.1  mycroft 	l_stwotox.s \
    225       1.2  mycroft 	l_support.s
    226       1.1  mycroft 
    227       1.1  mycroft #
    228       1.1  mycroft #	Build the target object.  The linkfile is created on the fly.
    229       1.1  mycroft #	Change the SEG directives to suit your system.
    230       1.1  mycroft #
    231       1.2  mycroft $(TARGET).o:	$(O_FILES)
    232       1.2  mycroft 	$(LD) -r -o $(TARGET).o $(O_FILES)
    233       1.1  mycroft 
    234       1.1  mycroft #
    235       1.1  mycroft #	Just about every file needs fpsp.h so:
    236       1.1  mycroft #
    237       1.2  mycroft $(O_FILES):	fpsp.defs
    238       1.1  mycroft 
    239       1.1  mycroft #
    240       1.1  mycroft #-----------------------------------------------------------------------
    241       1.1  mycroft #
    242       1.1  mycroft #	For making a library version of the FPSP:
    243       1.1  mycroft #
    244       1.1  mycroft library:	$(LIB_TARGET)
    245       1.1  mycroft 
    246       1.2  mycroft $(LIB_TARGET):	$(LIB_O_FILES)
    247       1.1  mycroft 	rm -f $(LIB_TARGET)
    248       1.2  mycroft 	$(AR) crv $(LIB_TARGET) $(LIB_O_FILES)
    249       1.1  mycroft 
    250       1.2  mycroft $(LIB_O_FILES): l_fpsp.defs
    251       1.1  mycroft 
    252       1.1  mycroft #
    253       1.1  mycroft # The entry points to the library version are created here
    254       1.1  mycroft # by using two template files an awk script and a list of
    255       1.1  mycroft # the entry routines for each function.
    256       1.1  mycroft #
    257       1.1  mycroft l_entry.sa: L_ENTRY.AWK L_LIST MONADIC.$(SYS) DYADIC.$(SYS) l_fpsp.h
    258  1.10.6.1    skrll 	awk -f L_ENTRY.AWK SYS=$(SYS) PREFIX=$(PREFIX) - \
    259  1.10.6.1    skrll 	    <L_LIST | ${HOST_SH} >l_entry.sa
    260       1.1  mycroft 
    261       1.1  mycroft #
    262       1.1  mycroft # Do_func.sa and round.sa need special editing to remove references that
    263       1.1  mycroft # aren't needed in the library version.  Beware that changes in
    264       1.1  mycroft # the source code may cause this editing to break....
    265       1.1  mycroft #
    266       1.2  mycroft l_do_func.s: do_func.s 
    267       1.3  mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    268       1.2  mycroft 	echo '/global.*do_func/,/^	rts/d' >.SCRIPT
    269       1.1  mycroft 	echo 'g/smovcr/d' >>.SCRIPT
    270       1.1  mycroft 	echo 'g/tblpre/d' >>.SCRIPT
    271       1.1  mycroft 	echo 'w' >>.SCRIPT
    272       1.1  mycroft 	echo 'q' >>.SCRIPT
    273       1.3  mycroft 	ed - ${.TARGET} <.SCRIPT
    274       1.1  mycroft 	rm .SCRIPT
    275       1.1  mycroft 
    276       1.2  mycroft l_round.s: round.s 
    277       1.3  mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    278       1.1  mycroft 	echo '/^not_E3:/-6,/^not_E3:/d' >.SCRIPT
    279       1.1  mycroft 	echo 'w' >>.SCRIPT
    280       1.1  mycroft 	echo 'q' >>.SCRIPT
    281       1.3  mycroft 	ed - ${.TARGET} <.SCRIPT
    282       1.1  mycroft 	rm .SCRIPT
    283       1.1  mycroft 
    284       1.3  mycroft l_copyright.s: copyright.s 
    285       1.3  mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    286       1.3  mycroft 
    287       1.2  mycroft l_sacos.s: sacos.s 
    288       1.3  mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    289       1.1  mycroft 
    290       1.2  mycroft l_sasin.s: sasin.s 
    291       1.3  mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    292       1.1  mycroft 
    293       1.2  mycroft l_satan.s: satan.s 
    294       1.3  mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    295       1.1  mycroft 
    296       1.2  mycroft l_satanh.s: satanh.s 
    297       1.3  mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    298       1.1  mycroft 
    299       1.2  mycroft l_scale.s: scale.s 
    300       1.3  mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    301       1.1  mycroft 
    302       1.2  mycroft l_scosh.s: scosh.s 
    303       1.3  mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    304       1.1  mycroft 
    305       1.2  mycroft l_setox.s: setox.s 
    306       1.3  mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    307       1.1  mycroft 
    308       1.2  mycroft l_sgetem.s: sgetem.s 
    309       1.3  mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    310       1.1  mycroft 
    311       1.2  mycroft l_sint.s: sint.s 
    312       1.3  mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    313       1.1  mycroft 
    314       1.2  mycroft l_slog2.s: slog2.s 
    315       1.3  mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    316       1.1  mycroft 
    317       1.2  mycroft l_slogn.s: slogn.s 
    318       1.3  mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    319       1.1  mycroft 
    320       1.2  mycroft l_srem_mod.s: srem_mod.s 
    321       1.3  mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    322       1.1  mycroft 
    323       1.2  mycroft l_ssin.s: ssin.s 
    324       1.3  mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    325       1.1  mycroft 
    326       1.2  mycroft l_ssinh.s: ssinh.s 
    327       1.3  mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    328       1.1  mycroft 
    329       1.2  mycroft l_stan.s: stan.s 
    330       1.3  mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    331       1.1  mycroft 
    332       1.2  mycroft l_stanh.s: stanh.s 
    333       1.3  mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    334       1.1  mycroft 
    335       1.2  mycroft l_stwotox.s: stwotox.s 
    336       1.3  mycroft 	$(LIB_FILTER) ${.ALLSRC} >${.TARGET}
    337       1.1  mycroft 
    338       1.1  mycroft #
    339       1.1  mycroft #	Extract all files from SCCS directory
    340       1.1  mycroft #
    341       1.1  mycroft clean:
    342       1.2  mycroft 	rm -f $(H_FILES)
    343       1.2  mycroft 	rm -f $(S_FILES)
    344       1.2  mycroft 	rm -f $(O_FILES)
    345       1.2  mycroft 	rm -f $(TARGET).o
    346       1.2  mycroft 	rm -f $(LIB_S_FILES)
    347       1.2  mycroft 	rm -f $(LIB_O_FILES)
    348       1.2  mycroft 	rm -f $(LIB_TARGET)
    349       1.1  mycroft 
    350       1.1  mycroft clobber:	clean
    351