From 1170eb6546c6d5a950d171d203d3dbc148cca295 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sun, 19 May 2002 02:26:38 +0000 Subject: [PATCH] Check in the rest of the Cygwin support patch... --- configure.in | 11 ++-- rdoff/Makefile.in | 175 ++++++++++++++++++++++++++++-------------------------- rdoff/rdf2bin.c | 2 +- 3 files changed, 100 insertions(+), 88 deletions(-) rewrite rdoff/Makefile.in (63%) diff --git a/configure.in b/configure.in index 4903b4cf..36ca7fac 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,7 @@ -dnl Process this file with autoconf to produce a configure script. +dnl Process this file with autoconf 2.53 or later to produce +dnl a configure script. +AC_PREREQ(2.53) +AC_REVISION([$Id$]) AC_INIT(nasm.c) dnl Check for broken VPATH handling on older NetBSD makes. @@ -106,9 +109,9 @@ fi if test $ac_cv_prog_make_vpathok = no; then echo Copying generated srcs into build directory to compensate for VPATH breakage - if test ! -f insnsa.c; then cp -p ${srcdir}/insnsa.c .; fi - if test ! -f insnsd.c; then cp -p ${srcdir}/insnsd.c .; fi - if test ! -f macros.c; then cp -p ${srcdir}/macros.c .; fi + for file in macros.c insnsa.c insnsd.c insnsn.c insnsi.h version.h version.mac; do + if test ! -f $file; then cp -p ${srcdir}/${file} .; fi + done fi AC_OUTPUT_COMMANDS([mkdir -p output]) diff --git a/rdoff/Makefile.in b/rdoff/Makefile.in dissimilarity index 63% index d02c47cf..293aec7a 100644 --- a/rdoff/Makefile.in +++ b/rdoff/Makefile.in @@ -1,83 +1,92 @@ -# $Id$ -# -# Auto-configuring Makefile for RDOFF object file utils; part of the -# Netwide Assembler -# -# The Netwide Assembler is copyright (C) 1996 Simon Tatham and -# Julian Hall. All rights reserved. The software is -# redistributable under the licence given in the file "Licence" -# distributed in the NASM archive. - -top_srcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -mandir = @mandir@ - -CC = @CC@ -CFLAGS = @CFLAGS@ @GCCFLAGS@ -I$(srcdir) -I$(top_srcdir) -LDFLAGS = @LDFLAGS@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -LN_S = @LN_S@ - -LDRDFLIBS = rdoff.o nasmlib.o symtab.o collectn.o rdlib.o segtab.o hash.o -RDXLIBS = rdoff.o rdfload.o symtab.o collectn.o hash.o - -.c.o: - $(CC) -c $(CFLAGS) $< - -all: rdfdump ldrdf rdx rdflib rdf2bin rdf2com rdf2ihx - -rdfdump: rdfdump.o - $(CC) $(LDFLAGS) -o rdfdump rdfdump.o -ldrdf: ldrdf.o $(LDRDFLIBS) - $(CC) $(LDFLAGS) -o ldrdf ldrdf.o $(LDRDFLIBS) -rdx: rdx.o $(RDXLIBS) - $(CC) $(LDFLAGS) -o rdx rdx.o $(RDXLIBS) -rdflib: rdflib.o - $(CC) $(LDFLAGS) -o rdflib rdflib.o -rdf2bin: rdf2bin.o $(RDXLIBS) nasmlib.o - $(CC) $(LDFLAGS) -o rdf2bin rdf2bin.o $(RDXLIBS) nasmlib.o -rdf2com: - rm -f rdf2com && $(LN_S) rdf2bin rdf2com -rdf2ihx: rdf2ihx.o $(RDXLIBS) nasmlib.o - $(CC) $(LDFLAGS) -o rdf2ihx rdf2ihx.o $(RDXLIBS) nasmlib.o - -rdf2ihx.o: rdf2ihx.c -rdf2bin.o: rdf2bin.c -rdfdump.o: rdfdump.c -rdoff.o: rdoff.c rdoff.h -ldrdf.o: ldrdf.c rdoff.h ../nasmlib.h symtab.h collectn.h rdlib.h -symtab.o: symtab.c symtab.h -collectn.o: collectn.c collectn.h -rdx.o: rdx.c rdoff.h rdfload.h symtab.h -rdfload.o: rdfload.c rdfload.h rdoff.h collectn.h symtab.h -rdlib.o: rdlib.c rdlib.h -rdflib.o: rdflib.c -segtab.o: segtab.c - -nasmlib.o: $(top_srcdir)/nasmlib.c - cd .. && $(MAKE) nasmlib.o - cp ../nasmlib.o . - -clean: - rm -f *.o rdfdump ldrdf rdx rdflib rdf2bin rdf2com rdf2ihx - -spotless: clean - rm -f Makefile - -distclean: spotless - -install: rdfdump ldrdf rdx rdflib rdf2bin rdf2com rdf2ihx - $(INSTALL_PROGRAM) rdfdump $(INSTALLROOT)$(bindir)/rdfdump - $(INSTALL_PROGRAM) ldrdf $(INSTALLROOT)$(bindir)/ldrdf - $(INSTALL_PROGRAM) rdx $(INSTALLROOT)$(bindir)/rdx - $(INSTALL_PROGRAM) rdflib $(INSTALLROOT)$(bindir)/rdflib - $(INSTALL_PROGRAM) rdf2bin $(INSTALLROOT)$(bindir)/rdf2bin - $(INSTALL_PROGRAM) rdf2ihx $(INSTALLROOT)$(bindir)/rdf2ihx - cd $(INSTALLROOT)$(bindir) && rm -f rdf2com && $(LN_S) rdf2bin rdf2com +# $Id$ +# +# Auto-configuring Makefile for RDOFF object file utils; part of the +# Netwide Assembler +# +# The Netwide Assembler is copyright (C) 1996 Simon Tatham and +# Julian Hall. All rights reserved. The software is +# redistributable under the licence given in the file "Licence" +# distributed in the NASM archive. + +top_srcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +mandir = @mandir@ + +CC = @CC@ +CFLAGS = @CFLAGS@ @GCCFLAGS@ -I$(srcdir) -I$(top_srcdir) +LDFLAGS = @LDFLAGS@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +LN_S = @LN_S@ + +LDRDFLIBS = rdoff.o nasmlib.o symtab.o collectn.o rdlib.o segtab.o hash.o +RDXLIBS = rdoff.o rdfload.o symtab.o collectn.o hash.o + +# Binary suffixes +O = @OBJEXT@ +X = @EXEEXT@ + +PROGRAMS = rdfdump$(X) ldrdf$(X) rdx$(X) rdflib$(X) \ + rdf2bin$(X) rdf2com$(X) rdf2ihx$(X) + +.SUFFIXES: .c .i .s .$(O) .1 .man + +.c.$(O): + $(CC) -c $(CFLAGS) $< + +all: $(PROGRAMS) + +rdfdump$(X): rdfdump.$(O) + $(CC) $(LDFLAGS) -o rdfdump$(X) rdfdump.$(O) +ldrdf$(X): ldrdf.$(O) $(LDRDFLIBS) + $(CC) $(LDFLAGS) -o ldrdf$(X) ldrdf.$(O) $(LDRDFLIBS) +rdx$(X): rdx.$(O) $(RDXLIBS) + $(CC) $(LDFLAGS) -o rdx$(X) rdx.$(O) $(RDXLIBS) +rdflib$(X): rdflib.$(O) + $(CC) $(LDFLAGS) -o rdflib$(X) rdflib.$(O) +rdf2bin$(X): rdf2bin.$(O) $(RDXLIBS) nasmlib.$(O) + $(CC) $(LDFLAGS) -o rdf2bin$(X) rdf2bin.$(O) $(RDXLIBS) nasmlib.$(O) +rdf2com$(X): + rm -f rdf2com$(X) && $(LN_S) rdf2bin$(X) rdf2com$(X) +rdf2ihx$(X): rdf2ihx.$(O) $(RDXLIBS) nasmlib.$(O) + $(CC) $(LDFLAGS) -o rdf2ihx$(X) rdf2ihx.$(O) $(RDXLIBS) nasmlib.$(O) + +rdf2ihx.$(O): rdf2ihx.c +rdf2bin.$(O): rdf2bin.c +rdfdump.$(O): rdfdump.c +rdoff.$(O): rdoff.c rdoff.h +ldrdf.$(O): ldrdf.c rdoff.h ../nasmlib.h symtab.h collectn.h rdlib.h +symtab.$(O): symtab.c symtab.h +collectn.$(O): collectn.c collectn.h +rdx.$(O): rdx.c rdoff.h rdfload.h symtab.h +rdfload.$(O): rdfload.c rdfload.h rdoff.h collectn.h symtab.h +rdlib.$(O): rdlib.c rdlib.h +rdflib.$(O): rdflib.c +segtab.$(O): segtab.c + +nasmlib.$(O): $(top_srcdir)/nasmlib.c + cd .. && $(MAKE) nasmlib.$(O) + cp ../nasmlib.$(O) . + +clean: + rm -f *.$(O) $(PROGRAMS) + +spotless: clean + rm -f Makefile + +distclean: spotless + +install: all + $(INSTALL_PROGRAM) rdfdump$(X) $(INSTALLROOT)$(bindir)/rdfdump$(X) + $(INSTALL_PROGRAM) ldrdf$(X) $(INSTALLROOT)$(bindir)/ldrdf$(X) + $(INSTALL_PROGRAM) rdx$(X) $(INSTALLROOT)$(bindir)/rdx$(X) + $(INSTALL_PROGRAM) rdflib$(X) $(INSTALLROOT)$(bindir)/rdflib$(X) + $(INSTALL_PROGRAM) rdf2bin$(X) $(INSTALLROOT)$(bindir)/rdf2bin$(X) + $(INSTALL_PROGRAM) rdf2ihx$(X) $(INSTALLROOT)$(bindir)/rdf2ihx$X(X) + cd $(INSTALLROOT)$(bindir) && rm -f rdf2com$(X) && $(LN_S) rdf2bin$(X) rdf2com$(X) diff --git a/rdoff/rdf2bin.c b/rdoff/rdf2bin.c index 938b4a92..07ad3122 100644 --- a/rdoff/rdf2bin.c +++ b/rdoff/rdf2bin.c @@ -38,7 +38,7 @@ int main(int argc, char **argv) return 1; } - if (! nasm_stricmp(getfilename(*argv),"rdf2com")) { + if (! nasm_strnicmp(getfilename(*argv),"rdf2com",7)) { origin = 0x100; } argv++, argc--; -- 2.11.4.GIT