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