Commit 58414e1e authored by Geert Stappers's avatar Geert Stappers

Import Upstream version 2.7.0

parent d49ec2f4

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -23,6 +23,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
datadir = @datadir@
datarootdir = @datarootdir@
includedir = @includedir@
mandir = @mandir@
man1dir = $(mandir)/man1
......@@ -51,7 +52,7 @@ OPT_DISABLE_PACKIHX = @OPT_DISABLE_PACKIHX@
OPT_ENABLE_DOC = @OPT_ENABLE_DOC@
OPT_DISABLE_SDCPP = @OPT_DISABLE_SDCPP@
SLIB = $(top_builddir)support/Util
SLIB = $(top_builddir)/support/Util
EXEEXT = @EXEEXT@
transform = @program_transform_name@
......
......@@ -15,22 +15,22 @@ SDCC_LIBS = support/makebin
SDCC_DOC = doc
# Parts that are not normally compiled but need to be cleaned
SDCC_EXTRA = support/regression
SDCC_EXTRA = support/regression support/valdiag
SDCC_PACKIHX = support/packihx
SDCC_LIBRARIAN = support/librarian
ifeq ($(OPT_DISABLE_HC08), 0)
SDCC_ASLINK += as/hc08
SDCC_ASLINK += as/hc08 as/link/hc08
endif
ifeq ($(OPT_DISABLE_MCS51), 0)
SDCC_ASLINK += as/mcs51
SDCC_ASLINK += as/mcs51 as/link/mcs51
SDCC_MISC += debugger/mcs51
endif
ifeq ($(OPT_DISABLE_Z80), 0)
SDCC_ASLINK += as link
SDCC_ASLINK += as as/link
endif
ifeq ($(OPT_DISABLE_UCSIM), 0)
......@@ -100,7 +100,7 @@ sdcc-device-lib: sdcc-cc sdcc-aslink
sdcc-device-tini:
$(MAKE) -C device/include
$(MAKE) -C device/lib modelDS390
$(MAKE) -C device/lib model-ds390 model-ds400
# doc depends on latex and latex2html
sdcc-doc:
......@@ -129,7 +129,7 @@ install-tini:
@for pkg in $(PKGS_TINI); do\
$(MAKE) -C $$pkg install ;\
done
$(MAKE) -C device/lib installDS390
$(MAKE) -C device/lib install
......
......@@ -4,8 +4,8 @@ VPATH = @srcdir@
srcdir = @srcdir@
top_builddir = @top_builddir@
BUILDDIR=../$(top_builddir)bin
include $(top_builddir)Makefile.common
BUILDDIR=../$(top_builddir)/bin
include $(top_builddir)/Makefile.common
PORTS = z80 gbz80
DOCS = README abstra.doc appendk.txt asmlnk.doc asxhtm.html format.txt
......@@ -14,9 +14,9 @@ all:
$(MAKE) -C z80 _as-z80 _as-gbz80 E=$(E) BUILDDIR=$(BUILDDIR)
install: all install-doc
$(INSTALL) $(top_builddir)bin/as-z80$(EXEEXT) `echo $(DESTDIR)$(bindir)/as-z80$(EXEEXT)|sed '$(transform)'`
$(INSTALL) $(top_builddir)/bin/as-z80$(EXEEXT) `echo $(DESTDIR)$(bindir)/as-z80$(EXEEXT)|sed '$(transform)'`
$(STRIP) `echo $(DESTDIR)$(bindir)/as-z80$(EXEEXT)|sed '$(transform)'`
$(INSTALL) $(top_builddir)bin/as-gbz80$(EXEEXT) `echo $(DESTDIR)$(bindir)/as-gbz80$(EXEEXT)|sed '$(transform)'`
$(INSTALL) $(top_builddir)/bin/as-gbz80$(EXEEXT) `echo $(DESTDIR)$(bindir)/as-gbz80$(EXEEXT)|sed '$(transform)'`
$(STRIP) `echo $(DESTDIR)$(bindir)/as-gbz80$(EXEEXT)|sed '$(transform)'`
install-doc:
......
clean:
$(MAKE) -C z80 clean BUILDDIR=$(BUILDDIR)
rm -f *core *[%~] *.[oa]
rm -f .[a-z]*~
rm -f *.dep
rm -rf obj
distclean:
$(MAKE) -C z80 distclean BUILDDIR=$(BUILDDIR)
......
This diff is collapsed.
This diff is collapsed.
......@@ -6,20 +6,12 @@ PRJDIR = ../..
ASOBJECTS = asmain.obj aslex.obj assym.obj assubr.obj asnoice.obj \
asexpr.obj asdata.obj aslist.obj asout.obj asstore.obj \
h08ext.obj h08pst.obj h08mch.obj h08adr.obj strcmpi.obj
LKOBJECTS = lkmain.obj lkhead.obj lkarea.obj lkdata.obj \
lkeval.obj lklex.obj lksym.obj lkrloc.obj \
lklibr.obj lklist.obj lkihx.obj lks19.obj \
lkstore.obj lknoice.obj lkmem.obj lkaomf51.obj strcmpi.obj
h08ext.obj h08pst.obj h08mch.obj h08adr.obj \
../strcmpi.obj
ASX8051 = $(PRJDIR)/bin/asx8051.exe
ASLINK = $(PRJDIR)/bin/aslink.exe
all: $(ASX8051) $(ASLINK)
all: $(ASX8051)
$(ASX8051): $(ASOBJECTS)
$(CC) $(CFLAGS) -e$@ $(ASOBJECTS)
$(ASLINK): $(LKOBJECTS)
$(CC) $(CFLAGS) -e$@ $(LKOBJECTS)
......@@ -22,6 +22,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
datadir = @datadir@
datarootdir = @datarootdir@
includedir = @includedir@
mandir = @mandir@
man1dir = $(mandir)/man1
......@@ -39,17 +40,11 @@ LDFLAGS = @LDFLAGS@
ASOBJECTS = asmain.o aslex.o assym.o assubr.o asnoice.o \
asexpr.o asdata.o aslist.o asout.o asstore.o \
m08ext.o m08pst.o m08mch.o m08adr.o strcmpi.o
m08ext.o m08pst.o m08mch.o m08adr.o \
../strcmpi.o
ASSOURCES = $(patsubst %.o,%.c,$(ASOBJECTS))
LKOBJECTS = lkmain.o lkhead.o lkarea.o lkdata.o \
lkeval.o lklex.o lksym.o lkrloc.o \
lklibr.o lklist.o lkihx.o lks19.o lkelf.o \
lkstore.o lknoice.o lkmem.o lkaomf51.o strcmpi.o
LKSOURCES = $(patsubst %.o,%.c,$(LKOBJECTS))
ASHC08 = $(top_builddir)bin/as-hc08$(EXEEXT)
ASLINK = $(top_builddir)bin/link-hc08$(EXEEXT)
ASHC08 = $(top_builddir)/bin/as-hc08$(EXEEXT)
transform = @program_transform_name@
......@@ -60,21 +55,16 @@ all: checkconf $(ASHC08) $(ASLINK)
$(ASHC08): $(ASOBJECTS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ASOBJECTS)
$(ASLINK): $(LKOBJECTS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LKOBJECTS)
# Compiling and installing everything and runing test
# ---------------------------------------------------
install: all installdirs
$(INSTALL) $(ASHC08) `echo $(DESTDIR)$(bindir)/as-hc08$(EXEEXT)|sed '$(transform)'`
$(STRIP) `echo $(DESTDIR)$(bindir)/as-hc08$(EXEEXT)|sed '$(transform)'`
$(INSTALL) $(ASLINK) `echo $(DESTDIR)$(bindir)/link-hc08$(EXEEXT)|sed '$(transform)'`
$(STRIP) `echo $(DESTDIR)$(bindir)/link-hc08$(EXEEXT)|sed '$(transform)'`
# Deleting all the installed files
# --------------------------------
uninstall:
rm -f $(DESTDIR)$(bindir)/as-hc08$(EXEEXT) $(DESTDIR)$(bindir)/link-hc08$(EXEEXT)
rm -f $(DESTDIR)$(bindir)/as-hc08$(EXEEXT)
# Performing self-test
......@@ -97,7 +87,7 @@ installdirs:
# ---------------------
dep: Makefile.dep
Makefile.dep: $(ASSOURCES) $(LKSOURCES) $(srcdir)/*.h $(top_builddir)*.h $(top_srcdir)/*.h
Makefile.dep: $(ASSOURCES) $(srcdir)/*.h $(top_builddir)/*.h $(top_srcdir)/*.h
$(CPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.c,$^) >Makefile.dep
ifeq "$(findstring $(MAKECMDGOALS),uninstall check installcheck installdirs \
......@@ -115,7 +105,7 @@ include $(srcdir)/clean.mk
# Remaking configuration
# ----------------------
checkconf:
@if [ -f $(top_builddir)devel ]; then\
@if [ -f $(top_builddir)/devel ]; then\
$(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
fi
......
......@@ -143,7 +143,7 @@ SOURCE=.\m08pst.c
# End Source File
# Begin Source File
SOURCE=.\strcmpi.c
SOURCE=..\strcmpi.c
# End Source File
# End Group
# Begin Group "Header Files"
......@@ -157,10 +157,6 @@ SOURCE=.\asm.h
SOURCE=.\m6808.h
# End Source File
# Begin Source File
SOURCE=.\strcmpi.h
# End Source File
# End Group
# End Target
# End Project
This diff is collapsed.
......@@ -677,10 +677,14 @@ extern void DefineCDB_Line();
extern char * cpu;
extern char * dsft;
extern int hilo;
extern int hilo;
extern struct mne mne[];
/* Machine dependent functions */
extern VOID minit();
extern VOID machine(struct mne *);
extern VOID machine(struct mne *);
/* strcmpi.c */
extern int as_strcmpi(const char *s1, const char *s2);
extern int as_strncmpi(const char *s1, const char *s2, size_t n);
......@@ -17,7 +17,6 @@
#include <string.h>
#include "asm.h"
#include "strcmpi.h"
/*)Module asmain.c
*
......
......@@ -9,12 +9,13 @@
#include <stdio.h>
#include <setjmp.h>
#include <string.h>
#include <ctype.h>
#include "asm.h"
/* Return basic file name without path or extension */
static char* BaseFileName( int fileNumber );
/* Return basic file name without path or extension.
If spacesToUnderscores != 0 then spaces are converted to underscores */
char* BaseFileName( int fileNumber )
char* BaseFileName( int fileNumber, int spacesToUnderscores )
{
static int prevFile = -1;
static char baseName[ PATH_MAX ];
......@@ -42,6 +43,14 @@ char* BaseFileName( int fileNumber )
if (p2 != NULL) *p2 = 0;
/* SD comment this out since not a ANSI Function */
/* strupr( baseName ); */
if (spacesToUnderscores)
{
/* Convert spaces to underscores */
for (p1 = baseName; *p1; ++p1)
if (isspace(*p1))
*p1 = '_';
}
}
return baseName;
}
......@@ -53,7 +62,7 @@ void DefineNoICE_Line()
struct sym *pSym;
/* symbol is FILE.nnn */
sprintf( name, "%s.%u", BaseFileName( cfile ), srcline[ cfile ] );
sprintf( name, "%s.%u", BaseFileName( cfile, 0 ), srcline[ cfile ] );
pSym = lookup( name );
pSym->s_type = S_USER;
......@@ -69,7 +78,7 @@ void DefineCDB_Line()
struct sym *pSym;
/* symbol is FILE.nnn */
sprintf( name, "A$%s$%u", BaseFileName( cfile ), srcline[ cfile ] );
sprintf( name, "A$%s$%u", BaseFileName( cfile, 1 ), srcline[ cfile ] );
pSym = lookup( name );
pSym->s_type = S_USER;
......
......@@ -27,7 +27,6 @@
#include <alloc.h>
#endif
#include "asm.h"
#include "strcmpi.h"