1994-01-04 21:14:04 +00:00
|
|
|
# Makefile fragment for GAS.
|
|
|
|
|
1994-06-26 23:51:45 +00:00
|
|
|
VERSION = cygnus-2.3.1
|
|
|
|
|
|
|
|
gC = gC1
|
|
|
|
|
1994-01-04 21:14:04 +00:00
|
|
|
s = "{srcdir}"
|
|
|
|
|
|
|
|
o = :
|
|
|
|
|
|
|
|
CROSS = -d CROSS_COMPILE
|
|
|
|
|
1994-09-13 00:14:18 +00:00
|
|
|
ALL_CFLAGS = {CFLAGS} {CROSS} -d HAVE_STDARG_H -d TARGET_BYTES_BIG_ENDIAN -d BFD_ASSEMBLER -i "{topsrcdir}"include: -i "{topsrcdir}"bfd:,"{srcdir}",::libiberty:,::bfd:,::extra-include,"{srcroot}"include:mpw:
|
1994-01-04 21:14:04 +00:00
|
|
|
# debug options: -mbg on -sym on
|
|
|
|
|
1994-01-07 19:22:15 +00:00
|
|
|
"{o}" \Option-f : "{s}"
|
1994-01-04 21:14:04 +00:00
|
|
|
|
|
|
|
# Default rule that puts each file into separate segment.
|
|
|
|
|
1994-01-07 19:22:15 +00:00
|
|
|
.c.o \Option-f .c
|
1994-06-12 23:41:37 +00:00
|
|
|
{CC} {DepDir}{Default}.c {ALL_CFLAGS} -s gas_{Default} -o {TargDir}{Default}.c.o
|
1994-01-04 21:14:04 +00:00
|
|
|
|
1994-06-26 23:51:45 +00:00
|
|
|
.gc.o \Option-f .c
|
|
|
|
{gC} {DepDir}{Default}.c {ALL_CFLAGS} -s gas_{Default} -o {TargDir}{Default}.gc.o
|
|
|
|
|
1994-02-26 21:25:10 +00:00
|
|
|
prefix = usr:local:
|
|
|
|
|
|
|
|
bindir = {prefix}bin:
|
|
|
|
|
1994-01-07 19:22:15 +00:00
|
|
|
OBJECTS = \Option-d
|
|
|
|
"{o}"app.c.o \Option-d
|
1994-06-30 00:59:49 +00:00
|
|
|
"{o}"as.c.o \Option-d
|
1994-01-07 19:22:15 +00:00
|
|
|
"{o}"atof-generic.c.o \Option-d
|
|
|
|
"{o}"bignum-copy.c.o \Option-d
|
|
|
|
"{o}"cond.c.o \Option-d
|
|
|
|
"{o}"expr.c.o \Option-d
|
|
|
|
"{o}"flonum-konst.c.o \Option-d
|
|
|
|
"{o}"flonum-copy.c.o \Option-d
|
|
|
|
"{o}"flonum-mult.c.o \Option-d
|
|
|
|
"{o}"frags.c.o \Option-d
|
|
|
|
"{o}"hash.c.o \Option-d
|
|
|
|
"{o}"hex-value.c.o \Option-d
|
|
|
|
"{o}"input-file.c.o \Option-d
|
|
|
|
"{o}"input-scrub.c.o \Option-d
|
|
|
|
"{o}"listing.c.o \Option-d
|
|
|
|
"{o}"messages.c.o \Option-d
|
|
|
|
"{o}"output-file.c.o \Option-d
|
|
|
|
"{o}"read.c.o \Option-d
|
|
|
|
"{o}"stabs.c.o \Option-d
|
|
|
|
"{o}"subsegs.c.o \Option-d
|
|
|
|
"{o}"symbols.c.o \Option-d
|
|
|
|
"{o}"write.c.o \Option-d
|
|
|
|
"{o}"ecoff.c.o \Option-d
|
|
|
|
"{o}"xmalloc.c.o \Option-d
|
1994-01-04 21:14:04 +00:00
|
|
|
|
1994-06-26 23:51:45 +00:00
|
|
|
TARG_OBJECTS = "{o}"obj-format.c.o "{o}"targ-cpu.c.o "{o}"atof-targ.c.o
|
|
|
|
|
|
|
|
# If you put config.h in INCLUDES, then MPW's stupid make will always
|
|
|
|
# want to rebuild everything. Better to do in two stages.
|
|
|
|
|
1994-01-04 21:14:04 +00:00
|
|
|
INCLUDES =
|
1994-06-26 23:51:45 +00:00
|
|
|
# "{o}"config.h
|
1994-01-04 21:14:04 +00:00
|
|
|
# host.h
|
|
|
|
#"{s}".h
|
|
|
|
|
1994-06-26 23:51:45 +00:00
|
|
|
CLIBS = ::libiberty:libiberty.o ::bfd:libbfd.o ::opcodes:libopcodes.o
|
|
|
|
|
1994-01-07 19:22:15 +00:00
|
|
|
all \Option-f as.new
|
1994-01-04 21:14:04 +00:00
|
|
|
|
1994-06-26 23:51:45 +00:00
|
|
|
as.new \Option-f\Option-f {OBJECTS} {TARG_OBJECTS} {CLIBS}
|
|
|
|
Link {LDFLAGS} -o as.new {OBJECTS} {TARG_OBJECTS} {CLIBS} {EXTRALIBS}
|
|
|
|
|
|
|
|
|
|
|
|
"{o}"config.h \Option-f "{o}"config-stamp
|
|
|
|
|
1994-09-24 21:27:44 +00:00
|
|
|
"{o}"config-stamp \Option-f Makefile
|
1994-06-26 23:51:45 +00:00
|
|
|
Delete -i -y "{o}"config.new "{o}"config-stamp
|
1994-09-21 00:45:25 +00:00
|
|
|
Echo '#ifndef GAS_VERSION' > "{o}"config.new
|
|
|
|
Echo '#define GAS_VERSION "{VERSION}"' >> "{o}"config.new
|
|
|
|
Echo '#define TARGET_CPU "{target_cpu}"' >> "{o}"config.new
|
|
|
|
Echo '#define TARGET_ALIAS "{target_alias}"' >> "{o}"config.new
|
|
|
|
Echo '#define TARGET_CANONICAL "{target_canonical}"' >> "{o}"config.new
|
1994-09-24 21:27:44 +00:00
|
|
|
Echo '#ifndef MPW' >> "{o}"config.new
|
|
|
|
Echo '#define MPW' >> "{o}"config.new
|
|
|
|
Echo '#endif' >> "{o}"config.new
|
|
|
|
Echo '#define bzero(a,b) memset(a,0,b)' >> "{o}"config.new
|
|
|
|
Echo '#define bcopy(a,b,c) memcpy(b,a,c)' >> "{o}"config.new
|
|
|
|
Echo '#define bcmp(a,b,c) memcmp(a,b,c)' >> "{o}"config.new
|
|
|
|
Echo '#define M_ANSI 1' >> "{o}"config.new
|
|
|
|
Echo '#include <stdlib.h>' >> "{o}"config.new
|
|
|
|
Echo '#include <string.h>' >> "{o}"config.new
|
|
|
|
Echo '#include <memory.h>' >> "{o}"config.new
|
|
|
|
Echo 'char *strdup();' >> "{o}"config.new
|
|
|
|
Echo '#ifdef MPW_C' >> "{o}"config.new
|
|
|
|
Echo '#undef __PTR_TO_INT' >> "{o}"config.new
|
|
|
|
Echo '#define __PTR_TO_INT(P) ((int)(P))' >> "{o}"config.new
|
|
|
|
Echo '#undef __INT_TO_PTR' >> "{o}"config.new
|
|
|
|
Echo '#define __INT_TO_PTR(P) ((char *)(P))' >> "{o}"config.new
|
|
|
|
Echo '#endif' >> "{o}"config.new
|
|
|
|
Echo '#define sys_nerr _sys_nerr' >> "{o}"config.new
|
|
|
|
Echo '#define sys_errlist _sys_errlist' >> "{o}"config.new
|
|
|
|
Echo '#ifdef __STDIO__' >> "{o}"config.new
|
|
|
|
Echo 'FILE *mpw_fopen();' >> "{o}"config.new
|
|
|
|
Echo '#endif' >> "{o}"config.new
|
|
|
|
Echo '#define fopen mpw_fopen' >> "{o}"config.new
|
|
|
|
Echo '#define fseek mpw_fseek' >> "{o}"config.new
|
|
|
|
Echo '#define abort mpw_abort' >> "{o}"config.new
|
|
|
|
Echo '#define TRUE_FALSE_ALREADY_DEFINED' >> "{o}"config.new
|
|
|
|
Echo '/* <cr> is an end-of-line marker. */' >> "{o}"config.new
|
|
|
|
Echo '#define CR_EOL' >> "{o}"config.new
|
|
|
|
Echo '#define ABORT_ON_ERROR' >> "{o}"config.new
|
|
|
|
Echo '#define LOSING_COMPILER' >> "{o}"config.new
|
|
|
|
Echo '#define HOST_SPECIAL_INIT(argc,argv) mpw_special_init ((argv)[0]);' >> "{o}"config.new
|
|
|
|
Echo '#define WANT_FOPEN_BIN' >> "{o}"config.new
|
|
|
|
Echo '#define HAVE_ERRNO_H' >> "{o}"config.new
|
|
|
|
Echo '#endif /* GAS_VERSION */' >> "{o}"config.new
|
1994-06-26 23:51:45 +00:00
|
|
|
MoveIfChange "{o}"config.new "{o}"config.h
|
1994-06-30 00:59:49 +00:00
|
|
|
Echo ' ' >"{o}"config-stamp
|
1994-01-04 21:14:04 +00:00
|
|
|
|
1994-01-07 19:22:15 +00:00
|
|
|
"{o}"app.c.o \Option-f "{s}"app.c {INCLUDES}
|
1994-06-30 00:59:49 +00:00
|
|
|
"{o}"as.c.o \Option-f "{s}"as.c {INCLUDES}
|
1994-01-07 19:22:15 +00:00
|
|
|
"{o}"atof-generic.c.o \Option-f "{s}"atof-generic.c {INCLUDES}
|
1994-06-26 23:51:45 +00:00
|
|
|
"{o}"bignum-copy.c.o \Option-f "{s}"bignum-copy.c {INCLUDES}
|
1994-01-07 19:22:15 +00:00
|
|
|
"{o}"cond.c.o \Option-f "{s}"cond.c {INCLUDES}
|
|
|
|
"{o}"expr.c.o \Option-f "{s}"expr.c {INCLUDES}
|
|
|
|
"{o}"flonum-konst.c.o \Option-f "{s}"flonum-konst.c {INCLUDES}
|
|
|
|
"{o}"flonum-copy.c.o \Option-f "{s}"flonum-copy.c {INCLUDES}
|
|
|
|
"{o}"flonum-mult.c.o \Option-f "{s}"flonum-mult.c {INCLUDES}
|
|
|
|
"{o}"frags.c.o \Option-f "{s}"frags.c {INCLUDES}
|
|
|
|
"{o}"hash.c.o \Option-f "{s}"hash.c {INCLUDES}
|
|
|
|
"{o}"hex-value.c.o \Option-f "{s}"hex-value.c {INCLUDES}
|
|
|
|
"{o}"input-file.c.o \Option-f "{s}"input-file.c {INCLUDES}
|
|
|
|
"{o}"input-scrub.c.o \Option-f "{s}"input-scrub.c {INCLUDES}
|
|
|
|
"{o}"listing.c.o \Option-f "{s}"listing.c {INCLUDES}
|
|
|
|
"{o}"messages.c.o \Option-f "{s}"messages.c {INCLUDES}
|
|
|
|
"{o}"output-file.c.o \Option-f "{s}"output-file.c {INCLUDES}
|
|
|
|
"{o}"read.c.o \Option-f "{s}"read.c {INCLUDES}
|
|
|
|
"{o}"subsegs.c.o \Option-f "{s}"subsegs.c {INCLUDES}
|
|
|
|
"{o}"symbols.c.o \Option-f "{s}"symbols.c {INCLUDES}
|
|
|
|
"{o}"write.c.o \Option-f "{s}"write.c {INCLUDES}
|
|
|
|
"{o}"ecoff.c.o \Option-f "{s}"ecoff.c {INCLUDES}
|
|
|
|
"{o}"xmalloc.c.o \Option-f "{s}"xmalloc.c {INCLUDES}
|
1994-02-26 21:25:10 +00:00
|
|
|
|
1994-06-26 23:51:45 +00:00
|
|
|
"{o}"targ-cpu.c.o \Option-f "{o}"targ-cpu.c {INCLUDES}
|
|
|
|
"{o}"obj-format.c.o \Option-f "{o}"obj-format.c {INCLUDES}
|
|
|
|
"{o}"atof-targ.c.o \Option-f "{o}"atof-targ.c {INCLUDES}
|
|
|
|
|
1994-06-30 00:59:49 +00:00
|
|
|
install \Option-f all install-only
|
|
|
|
|
|
|
|
install-only \Option-f
|
1994-02-26 21:25:10 +00:00
|
|
|
If "`Exists "{prefix}"`" == ""
|
|
|
|
Echo "{prefix}" does not exist, cannot install anything
|
|
|
|
Exit 1
|
|
|
|
End If
|
|
|
|
If "`Exists "{bindir}"`" == ""
|
|
|
|
NewFolder "{bindir}"
|
|
|
|
End If
|
|
|
|
Duplicate -y :as.new "{bindir}"as
|