+2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
+
+ Enabled VPATH feature: changed nearly all Makefiles (149 files).
+ See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
+
+ One basic decision: e.g. src/clean.mk includes further files. In order
+ to make this work there are two solutions:
+ - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
+ run configure on them. This way they can use
+ 'include $(srcdir)/port-clean.mk'
+ - always include clean.mk by the Makefile at the same level. To avoid
+ that `make clean` tries to include and build Makefile.dep the
+ MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
+ implemented, because now even `make uninstall` doesn't create
+ Makefile.in. clean.mk could be eliminated by pasting it in
+ Makefile.in.
+
+ * debugger/mcs51/Makefile.in: build own objects from library sources
+ (SLIB, SDCC) in current directory
+
+ * configure, configure.in: renamed --disable-device-lib-build in
+ --disable-device-lib; added --enable-doc, the required tools are
+ searched by configure; added result message; the toolchain for the
+ belonging ports are now only built, if the port is enabled.
+
+ * support/regression/*: all output is written in directory gen, because
+ the fwk and ports directories don't livet in the build tree using vpath
+
+ * doc/sdccman.lyx: renamed --disable-device-lib-build to
+ --disable-device-lib, added --enable-doc, added section VPATH
+
+ * sim/ucsim/configure.in,
+ * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
+ z80 are enabled by default
+
2006-04-24 Raphael Neider <rneider AT web.de>
* src/pic/device.c (pic14_assignConfigWordValue): remember assignments to
+++ /dev/null
-#
-#
-#
-
-SHELL = /bin/sh
-
-PRJDIR = .
-
-include $(PRJDIR)/Makefile.common
-
-SDCC_MISC = debugger/mcs51 sim/ucsim
-SDCC_LIBS = support/cpp2 support/makebin
-SDCC_DOC = doc
-
-# Parts that are not normally compiled but need to be cleaned
-SDCC_EXTRA = support/regression
-
-SDCC_ASLINK = as/mcs51 as link as/hc08
-SDCC_PACKIHX = packihx
-SDCC_LIBRARIAN = support/librarian
-
-TARGETS = sdcc-libs sdcc-cc sdcc-aslink sdcc-doc
-
-PKGS = $(SDCC_LIBS) src $(SDCC_ASLINK) $(SDCC_DOC)
-
-ifneq ($(OPT_ENABLE_UCSIM), no)
-TARGETS += sdcc-misc
-PKGS += $(SDCC_MISC)
-endif
-
-ifneq ($(OPT_ENABLE_DEVICE_LIB_BUILD), no)
-TARGETS += sdcc-device
-PKGS += device/include device/lib
-endif
-
-ifneq ($(OPT_ENABLE_PACKIHX), no)
-TARGETS += sdcc-packihx
-PKGS += $(SDCC_PACKIHX)
-endif
-
-TARGETS += sdcc-librarian
-PKGS += $(SDCC_LIBRARIAN)
-
-PKGS_TINI = $(SDCC_LIBS) $(SDCC_ASLINK) \
- src device/include $(SDCC_PACKIHX) $(SDCC_LIBRARIAN)
-PORTS = $(shell cat ports.build)
-ALLPORTS = $(shell cat ports.all)
-
-# Compiling entire program or any subproject
-# ------------------------------------------
-all: checkconf sdcc
-
-tini: checkconf sdcc-tini
-
-sdcc-libs:
- for lib in $(SDCC_LIBS); do $(MAKE) -C $$lib; done
-
-sdcc-cc: sdcc-libs
- $(MAKE) -C src
-
-sdcc-aslink:
- for as in $(SDCC_ASLINK); do $(MAKE) -C $$as; done
-
-sdcc-misc:
- for misc in $(SDCC_MISC); do $(MAKE) -C $$misc; done
-
-sdcc-packihx:
- $(MAKE) -C $(SDCC_PACKIHX)
-
-sdcc-librarian:
- $(MAKE) -C $(SDCC_LIBRARIAN)
-
-sdcc-device: sdcc-cc sdcc-aslink
- $(MAKE) -C device/include
- $(MAKE) -C device/lib
-
-sdcc-device-tini:
- $(MAKE) -C device/include
- $(MAKE) -C device/lib modelDS390
-
-# Empty for now, as doc depends on latex and latex2html
-sdcc-doc:
-
-sdcc: $(TARGETS)
-
-sdcc-tini: sdcc-cc sdcc-aslink sdcc-device-tini sdcc-packihx sdcc-librarian
- $(MAKE) -f main.mk all
-
-# Some interesting sub rules
-sdcc-bin: sdcc-cc sdcc-aslink sdcc-misc
-
-sdcc-base: sdcc-cc sdcc-aslink
-
-# Compiling and installing everything and runing test
-# ---------------------------------------------------
-install:
- $(MAKE) -f main.mk install
- @for pkg in $(PKGS); do\
- $(MAKE) -C $$pkg install ;\
- done
-
-install-tini:
- $(MAKE) -f main.mk install
- @for pkg in $(PKGS_TINI); do\
- $(MAKE) -C $$pkg install ;\
- done
- $(MAKE) -C device/lib installDS390
-
-
-
-# Deleting all the installed files
-# --------------------------------
-uninstall:
- $(MAKE) -f main.mk uninstall
- @for pkg in $(PKGS); do\
- $(MAKE) -C $$pkg uninstall ;\
- done
-
-
-# Deleting all files created by building the program
-# --------------------------------------------------
-clean:
- @echo "+ Cleaning root of the project..."
- $(MAKE) -f clean.mk clean
- @echo "+ Cleaning packages in their directories..."
- for pkg in $(PKGS); do\
- $(MAKE) PORTS="$(PORTS)" EXEEXT=$(EXEEXT) -C $$pkg -f clean.mk clean ;\
- done
-
-# Deleting all files created by configuring or building the program
-# -----------------------------------------------------------------
-distclean:
- @echo "+ DistCleaning root of the project..."
- $(MAKE) -f clean.mk distclean
- @echo "+ DistCleaning packages using clean.mk..."
- for pkg in $(PKGS); do\
- $(MAKE) -C $$pkg PORTS="$(PORTS)" EXEEXT=$(EXEEXT) -f clean.mk distclean ;\
- done
- for pkg in $(SDCC_EXTRA); do \
- $(MAKE) -C $$pkg clean; \
- done
-
-# Like clean but some files may still exist
-# -----------------------------------------
-mostlyclean: clean
- $(MAKE) -f clean.mk mostlyclean
- for pkg in $(PKGS); do\
- $(MAKE) -C $$pkg -f clean.mk PORTS="$(PORTS)" EXEEXT=$(EXEEXT) mostlyclean ;\
- done
-
-
-# Deleting everything that can reconstructed by this Makefile. It deletes
-# everything deleted by distclean plus files created by bison, stc.
-# -----------------------------------------------------------------------
-realclean: distclean
- $(MAKE) -f clean.mk realclean
- for pkg in $(PKGS); do\
- $(MAKE) -C $$pkg -f clean.mk PORTS="$(PORTS)" EXEEXT=$(EXEEXT) realclean ;\
- done
-
-
-# Creating distribution
-# ---------------------
-dist: distclean
- @if [ -f devel ]; then\
- rm -f devel; mkdist sdcc; touch devel;\
- else\
- mkdist sdcc;\
- fi
-
-
-# Performing self-test
-# --------------------
-check:
-
-
-# Performing installation test
-# ----------------------------
-installcheck:
-
-
-# Creating dependencies
-# ---------------------
-dep:
- $(MAKE) -f main.mk dep
- @for pkg in $(PKGS); do\
- $(MAKE) -C $$pkg dep ;\
- done
-
-
-# My rules
-# --------
-newer: distclean
- @if [ -f start ]; then \
- tar cvf - \
- `find . -newer start -type f -print` |\
- gzip -9c >`date '+%m%d%H%M'`.tgz; \
- else \
- echo "start file not found.\n"; \
- exit 1; \
- fi
-
-putcopyright:
- 'put(c)' -s $(STARTYEAR) *.cc *.h *.y *.l
-
-
-# Remaking configuration
-# ----------------------
-configure: configure.in
- $(SHELL) $(AUTOCONF)
-
-main.mk: $(srcdir)/main_in.mk $(srcdir)/configure.in config.status
- $(SHELL) ./config.status
-
-Makefiles: makefiles
-
-makefiles: config.status
-
-config.status: configure
- $(SHELL) ./config.status --recheck
-
-makefiles:
- $(SHELL) ./config.status
-
-freshconf: main.mk
-
-checkconf:
- @if [ -f devel ]; then\
- $(MAKE) freshconf;\
- fi
-
-# End of Makefile
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
infodir = @infodir@
-srcdir = @srcdir@
docdir = @docdir@
DESTDIR =
lib_dir_suffix = @lib_dir_suffix@
# Modules to enable/disable
-OPT_ENABLE_UCSIM = @OPT_ENABLE_UCSIM@
-OPT_ENABLE_DEVICE_LIB_BUILD = @OPT_ENABLE_DEVICE_LIB_BUILD@
-OPT_ENABLE_PACKIHX = @OPT_ENABLE_PACKIHX@
+OPT_DISABLE_AVR = @OPT_DISABLE_AVR@
+OPT_DISABLE_DS390 = @OPT_DISABLE_DS390@
+OPT_DISABLE_DS400 = @OPT_DISABLE_DS400@
+OPT_DISABLE_HC08 = @OPT_DISABLE_HC08@
+OPT_DISABLE_MCS51 = @OPT_DISABLE_MCS51@
+OPT_DISABLE_PIC = @OPT_DISABLE_PIC@
+OPT_DISABLE_PIC16 = @OPT_DISABLE_PIC16@
+OPT_DISABLE_XA51 = @OPT_DISABLE_XA51@
+OPT_DISABLE_Z80 = @OPT_DISABLE_Z80@
-SLIB = $(PRJDIR)/support/Util
+OPT_DISABLE_UCSIM = @OPT_DISABLE_UCSIM@
+OPT_DISABLE_DEVICE_LIB= @OPT_DISABLE_DEVICE_LIB@
+OPT_DISABLE_PACKIHX = @OPT_DISABLE_PACKIHX@
+OPT_ENABLE_DOC = @OPT_ENABLE_DOC@
+OPT_DISABLE_SDCPP = @OPT_DISABLE_SDCPP@
+
+SLIB = $(top_builddir)support/Util
EXEEXT = @EXEEXT@
transform = @program_transform_name@
# Flags
DEFS += $(subs -DHAVE_CONFIG_H,,@DEFS@)
-CPPFLAGS += $(INCLUDEFLAGS) -I. -I$(PRJDIR) -I$(SLIB)
+CPPFLAGS += $(INCLUDEFLAGS) -I. -I$(top_builddir) -I$(srcdir)/$(SLIB) -I$(srcdir)
CFLAGS += -Wall @CFLAGS@
LDFLAGS += @LDFLAGS@
M_OR_MM = @M_OR_MM@
--- /dev/null
+#
+#
+#
+
+SHELL = /bin/sh
+
+VPATH = @srcdir@
+srcdir = @srcdir@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+include Makefile.common
+
+SDCC_LIBS = support/makebin
+SDCC_DOC = doc
+
+# Parts that are not normally compiled but need to be cleaned
+SDCC_EXTRA = support/regression
+
+SDCC_PACKIHX = packihx
+SDCC_LIBRARIAN = support/librarian
+
+ifeq ($(OPT_DISABLE_HC08), 0)
+SDCC_ASLINK += as/hc08
+endif
+
+ifeq ($(OPT_DISABLE_MCS51), 0)
+SDCC_ASLINK += as/mcs51
+SDCC_MISC += debugger/mcs51
+endif
+
+ifeq ($(OPT_DISABLE_Z80), 0)
+SDCC_ASLINK += as link
+endif
+
+ifeq ($(OPT_DISABLE_UCSIM), 0)
+TARGETS += sdcc-misc
+SDCC_MISC += sim/ucsim
+PKGS += $(SDCC_MISC)
+endif
+
+ifeq ($(OPT_DISABLE_DEVICE_LIB), 0)
+TARGETS += sdcc-device-lib
+PKGS += device/lib
+endif
+
+ifeq ($(OPT_DISABLE_PACKIHX), 0)
+TARGETS += sdcc-packihx
+PKGS += $(SDCC_PACKIHX)
+endif
+
+ifeq ($(OPT_ENABLE_DOC), 1)
+TARGETS += sdcc-doc
+PKGS += $(SDCC_DOC)
+endif
+
+ifeq ($(OPT_DISABLE_SDCPP), 0)
+SDCC_LIBS += support/cpp2
+endif
+
+TARGETS += sdcc-libs sdcc-cc sdcc-device-inc sdcc-aslink sdcc-librarian
+
+PKGS += $(SDCC_LIBS) src device/include $(SDCC_ASLINK) $(SDCC_LIBRARIAN)
+
+PKGS_TINI = $(SDCC_LIBS) $(SDCC_ASLINK) \
+ src device/include $(SDCC_PACKIHX) $(SDCC_LIBRARIAN)
+PORTS = $(shell cat ports.build)
+ALLPORTS = $(shell cat ports.all)
+
+# Compiling entire program or any subproject
+# ------------------------------------------
+all: checkconf sdcc
+
+tini: checkconf sdcc-tini
+
+sdcc-libs:
+ for lib in $(SDCC_LIBS); do $(MAKE) -C $$lib; done
+
+sdcc-cc: sdcc-libs
+ $(MAKE) -C src
+
+sdcc-aslink:
+ for as in $(SDCC_ASLINK); do $(MAKE) -C $$as ; done
+
+sdcc-misc:
+ for misc in $(SDCC_MISC); do $(MAKE) -C $$misc ; done
+
+sdcc-packihx:
+ $(MAKE) -C $(SDCC_PACKIHX)
+
+sdcc-librarian:
+ $(MAKE) -C $(SDCC_LIBRARIAN)
+
+sdcc-device-inc:
+ $(MAKE) -C device/include
+
+sdcc-device-lib: sdcc-cc sdcc-aslink
+ $(MAKE) -C device/lib
+
+sdcc-device-tini:
+ $(MAKE) -C device/include
+ $(MAKE) -C device/lib modelDS390
+
+# doc depends on latex and latex2html
+sdcc-doc:
+ $(MAKE) -C doc
+
+sdcc: $(TARGETS)
+
+sdcc-tini: sdcc-cc sdcc-aslink sdcc-device-tini sdcc-packihx sdcc-librarian
+ $(MAKE) -f main.mk all
+
+# Some interesting sub rules
+sdcc-bin: sdcc-cc sdcc-aslink sdcc-misc
+
+sdcc-base: sdcc-cc sdcc-aslink
+
+# Compiling and installing everything and runing test
+# ---------------------------------------------------
+install:
+ $(MAKE) -f main.mk install
+ @for pkg in $(PKGS); do\
+ $(MAKE) -C $$pkg install ;\
+ done
+
+install-tini:
+ $(MAKE) -f main.mk install
+ @for pkg in $(PKGS_TINI); do\
+ $(MAKE) -C $$pkg install ;\
+ done
+ $(MAKE) -C device/lib installDS390
+
+
+
+# Deleting all the installed files
+# --------------------------------
+uninstall:
+ $(MAKE) -f main.mk uninstall
+ @for pkg in $(PKGS); do\
+ $(MAKE) -C $$pkg uninstall ;\
+ done
+
+
+# Deleting all files created by building the program
+# --------------------------------------------------
+clean:
+ @echo "+ Cleaning root of the project..."
+ $(MAKE) -f $(srcdir)/clean.mk clean
+ @echo "+ Cleaning packages in their directories..."
+ for pkg in $(PKGS); do\
+ $(MAKE) -C $$pkg PORTS="$(PORTS)" EXEEXT=$(EXEEXT) clean ;\
+ done
+
+# Deleting all files created by configuring or building the program
+# -----------------------------------------------------------------
+distclean:
+ @echo "+ DistCleaning packages using clean.mk..."
+ for pkg in $(PKGS); do\
+ $(MAKE) -C $$pkg PORTS="$(PORTS)" EXEEXT=$(EXEEXT) distclean ;\
+ done
+ for pkg in $(SDCC_EXTRA); do \
+ $(MAKE) -C $$pkg distclean; \
+ done
+ @echo "+ DistCleaning root of the project..."
+ $(MAKE) -f $(srcdir)/clean.mk distclean
+
+# Like clean but some files may still exist
+# -----------------------------------------
+mostlyclean: clean
+ $(MAKE) -f $(srcdir)/clean.mk mostlyclean
+ for pkg in $(PKGS); do\
+ $(MAKE) -C $$pkg PORTS="$(PORTS)" EXEEXT=$(EXEEXT) mostlyclean ;\
+ done
+
+
+# Deleting everything that can reconstructed by this Makefile. It deletes
+# everything deleted by distclean plus files created by bison, stc.
+# -----------------------------------------------------------------------
+realclean: distclean
+ $(MAKE) -f $(srcdir)/clean.mk realclean
+ for pkg in $(PKGS); do\
+ $(MAKE) -C $$pkg PORTS="$(PORTS)" EXEEXT=$(EXEEXT) realclean ;\
+ done
+
+
+# Creating distribution
+# ---------------------
+dist: distclean
+ @if [ -f devel ]; then\
+ rm -f devel; mkdist sdcc; touch devel;\
+ else\
+ mkdist sdcc;\
+ fi
+
+
+# Performing self-test
+# --------------------
+check:
+
+
+# Performing installation test
+# ----------------------------
+installcheck:
+
+
+# Creating dependencies
+# ---------------------
+dep:
+ $(MAKE) -f main.mk dep
+ @for pkg in $(PKGS); do\
+ $(MAKE) -C $$pkg dep ;\
+ done
+
+
+# My rules
+# --------
+newer: distclean
+ @if [ -f start ]; then \
+ tar cvf - \
+ `find . -newer start -type f -print` |\
+ gzip -9c >`date '+%m%d%H%M'`.tgz; \
+ else \
+ echo "start file not found.\n"; \
+ exit 1; \
+ fi
+
+putcopyright:
+ 'put(c)' -s $(STARTYEAR) *.cc *.h *.y *.l
+
+
+# Remaking configuration
+# ----------------------
+configure: configure.in
+ $(SHELL) $(AUTOCONF)
+
+main.mk: $(srcdir)/main_in.mk $(srcdir)/configure.in config.status
+ $(SHELL) ./config.status
+
+Makefiles: makefiles
+
+makefiles: config.status
+
+config.status: configure
+ $(SHELL) ./config.status --recheck
+
+makefiles:
+ $(SHELL) ./config.status
+
+freshconf: main.mk
+
+checkconf:
+ @if [ -f devel ]; then\
+ $(MAKE) freshconf;\
+ fi
+
+# End of Makefile
+++ /dev/null
-PRJDIR = ..
-BUILDDIR=../../bin
-include $(PRJDIR)/Makefile.common
-
-PORTS = z80 gbz80 hc08
-DOCS = README abstra.doc appendk.txt asmlnk.doc asxhtm.html format.txt
-
-all:
- $(MAKE) -C z80 _as-z80 _as-gbz80 E=$(E) BUILDDIR=$(BUILDDIR)
- $(MAKE) -C hc08 all E=$(E) BUILDDIR=$(BUILDDIR)
-
-install: all install-doc
- $(INSTALL) $(PRJDIR)/bin/as-z80$(EXEEXT) `echo $(DESTDIR)$(bindir)/as-z80$(EXEEXT)|sed '$(transform)'`
- $(STRIP) `echo $(DESTDIR)$(bindir)/as-z80$(EXEEXT)|sed '$(transform)'`
- $(INSTALL) $(PRJDIR)/bin/as-gbz80$(EXEEXT) `echo $(DESTDIR)$(bindir)/as-gbz80$(EXEEXT)|sed '$(transform)'`
- $(STRIP) `echo $(DESTDIR)$(bindir)/as-gbz80$(EXEEXT)|sed '$(transform)'`
- $(INSTALL) $(PRJDIR)/bin/as-hc08$(EXEEXT) `echo $(DESTDIR)$(bindir)/as-hc08$(EXEEXT)|sed '$(transform)'`
- $(STRIP) `echo $(DESTDIR)$(bindir)/as-hc08$(EXEEXT)|sed '$(transform)'`
-
-install-doc:
- $(INSTALL) -d $(DESTDIR)$(docdir)/aslink
- cp -f doc/* $(DESTDIR)$(docdir)/aslink
-
-uninstall:
- cd $(DESTDIR)$(bindir); rm -f as-z80$(EXEEXT) as-gbz80$(EXEEXT) as-hc08$(EXEEXT)
-
-include clean.mk
--- /dev/null
+# This Makefile is only for z80 and gbz80
+
+VPATH = @srcdir@
+srcdir = @srcdir@
+top_builddir = @top_builddir@
+
+BUILDDIR=../$(top_builddir)bin
+include $(top_builddir)Makefile.common
+
+PORTS = z80 gbz80
+DOCS = README abstra.doc appendk.txt asmlnk.doc asxhtm.html format.txt
+
+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)'`
+ $(STRIP) `echo $(DESTDIR)$(bindir)/as-z80$(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:
+ $(INSTALL) -d $(DESTDIR)$(docdir)/aslink
+ cd $(srcdir)/doc; cp -f $(DOCS) $(DESTDIR)$(docdir)/aslink
+
+uninstall:
+ cd $(DESTDIR)$(bindir); rm -f as-z80$(EXEEXT) as-gbz80$(EXEEXT)
+
+include $(srcdir)/clean.mk
clean:
- $(MAKE) -C z80 -f clean.mk clean BUILDDIR=$(BUILDDIR)
+ $(MAKE) -C z80 clean BUILDDIR=$(BUILDDIR)
distclean:
- $(MAKE) -C z80 -f clean.mk distclean BUILDDIR=$(BUILDDIR)
-
+ $(MAKE) -C z80 distclean BUILDDIR=$(BUILDDIR)
+ rm -f Makefile
INSTALL = @INSTALL@
STRIP = @STRIP@
-PRJDIR = ../..
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
srcdir = @srcdir@
prefix = @prefix@
EXEEXT = @EXEEXT@
-CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR)
+VPATH = @srcdir@
+
+CPPFLAGS = @CPPFLAGS@ -I. -I$(srcdir)
CFLAGS = @CFLAGS@ -Wall
M_OR_MM = @M_OR_MM@
LDFLAGS = @LDFLAGS@
lkstore.o lknoice.o lkmem.o lkaomf51.o strcmpi.o
LKSOURCES = $(patsubst %.o,%.c,$(LKOBJECTS))
-ASHC08 = $(PRJDIR)/bin/as-hc08$(EXEEXT)
-ASLINK = $(PRJDIR)/bin/link-hc08$(EXEEXT)
+ASHC08 = $(top_builddir)bin/as-hc08$(EXEEXT)
+ASLINK = $(top_builddir)bin/link-hc08$(EXEEXT)
transform = @program_transform_name@
# ---------------------
dep: Makefile.dep
-Makefile.dep: $(ASSOURCES) $(LKSOURCES) *.h $(PRJDIR)/*.h
- $(CPP) $(CPPFLAGS) $(M_OR_MM) $(ASSOURCES) $(LKSOURCES) >Makefile.dep
+Makefile.dep: $(ASSOURCES) $(LKSOURCES) $(srcdir)/*.h $(top_builddir)*.h $(top_srcdir)/*.h
+ $(CPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.c,$^) >Makefile.dep
-include Makefile.dep
-include clean.mk
+ifeq "$(findstring $(MAKECMDGOALS),uninstall check installcheck installdirs \
+ clean distclean mostlyclean realclean)" ""
+ include Makefile.dep
+endif
+include $(srcdir)/clean.mk
# My rules
# --------
# Remaking configuration
# ----------------------
checkconf:
- @if [ -f $(PRJDIR)/devel ]; then\
- $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
+ @if [ -f $(top_builddir)devel ]; then\
+ $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
fi
# End of Makefile
# Deleting all files created by building the program
# --------------------------------------------------
-include ../../Makefile.common
-PRJDIR = ../..
+include $(top_builddir)Makefile.common
clean:
rm -f *core *[%~] *.[oa]
rm -f .[a-z]*~
- rm -f $(PRJDIR)/bin/as-hc08$(EXEEXT) $(PRJDIR)/bin/link-hc08$(EXEEXT) as-hc08$(EXEEXT) link-hc08$(EXEEXT)
+ rm -f $(top_builddir)bin/as-hc08$(EXEEXT) $(top_builddir)bin/link-hc08$(EXEEXT) as-hc08$(EXEEXT) link-hc08$(EXEEXT)
# Deleting all files created by configuring or building the program
freshconf: Makefile
-Makefile: $(srcdir)/Makefile.in $(PRJDIR)/configure.in
- cd $(PRJDIR) && $(SHELL) ./config.status
+Makefile: $(srcdir)/Makefile.in $(top_srcdir)/configure.in
+ cd $(top_builddir) && $(SHELL) ./config.status
# End of conf.mk
INSTALL = @INSTALL@
STRIP = @STRIP@
-PRJDIR = ../..
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
srcdir = @srcdir@
prefix = @prefix@
EXEEXT = @EXEEXT@
-CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR)
+VPATH = @srcdir@
+
+CPPFLAGS = @CPPFLAGS@ -I. -I$(srcdir)
CFLAGS = @CFLAGS@ -Wall -DINDEXLIB
M_OR_MM = @M_OR_MM@
LDFLAGS = @LDFLAGS@
lkstore.o lknoice.o lkmem.o lkaomf51.o strcmpi.o
LKSOURCES = $(patsubst %.o,%.c,$(LKOBJECTS))
-ASX8051 = $(PRJDIR)/bin/asx8051$(EXEEXT)
-ASLINK = $(PRJDIR)/bin/aslink$(EXEEXT)
+ASX8051 = $(top_builddir)bin/asx8051$(EXEEXT)
+ASLINK = $(top_builddir)bin/aslink$(EXEEXT)
transform = @program_transform_name@
# ---------------------
dep: Makefile.dep
-Makefile.dep: $(ASSOURCES) $(LKSOURCES) *.h $(PRJDIR)/*.h
- $(CPP) $(CPPFLAGS) $(M_OR_MM) $(ASSOURCES) $(LKSOURCES) >Makefile.dep
+Makefile.dep: $(ASSOURCES) $(LKSOURCES) $(srcdir)/*.h $(top_builddir)*.h $(top_srcdir)/*.h
+ $(CPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.c,$^) >Makefile.dep
-include Makefile.dep
-include clean.mk
+ifeq "$(findstring $(MAKECMDGOALS),uninstall check installcheck installdirs \
+ clean distclean mostlyclean realclean)" ""
+ include Makefile.dep
+endif
+include $(srcdir)/clean.mk
# My rules
# --------
# Remaking configuration
# ----------------------
checkconf:
- @if [ -f $(PRJDIR)/devel ]; then\
- $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
+ @if [ -f $(top_builddir)devel ]; then\
+ $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
fi
# End of Makefile
# Deleting all files created by building the program
# --------------------------------------------------
-include ../../Makefile.common
-PRJDIR = ../..
+include $(top_builddir)Makefile.common
clean:
rm -f *core *[%~] *.[oa]
rm -f .[a-z]*~
- rm -f $(PRJDIR)/bin/asx8051$(EXEEXT) $(PRJDIR)/bin/aslink$(EXEEXT) asx8051$(EXEEXT) aslink$(EXEEXT)
+ rm -f $(top_builddir)bin/asx8051$(EXEEXT) $(top_builddir)bin/aslink$(EXEEXT) asx8051$(EXEEXT) aslink$(EXEEXT)
# Deleting all files created by configuring or building the program
freshconf: Makefile
-Makefile: $(srcdir)/Makefile.in $(PRJDIR)/configure.in
- cd $(PRJDIR) && $(SHELL) ./config.status
+Makefile: $(srcdir)/Makefile.in $(top_srcdir)/configure.in
+ cd $(top_prjdir) && $(SHELL) ./config.status
# End of conf.mk
+++ /dev/null
-CC = gcc
-CFLAGS = -ggdb -Wall
-YACC = bison -y -d
-LEX = flex -i
-LEXLIB =
-
-all: xa_rasm xa_link
-
-OBJECTS = xa_main.o xa_rasm.tab.o xa_rasm.lex.o
-
-xa_rasm: $(OBJECTS)
- $(CC) -o xa_rasm $(OBJECTS) $(LEXLIB)
- #strip xa_rasm
-
-xa_rasm.lex.o: xa_rasm.lex.c xa_rasm.tab.h xa_main.h
- $(CC) $(CFLAGS) -c xa_rasm.lex.c
-
-xa_rasm.tab.o: xa_rasm.tab.c xa_rasm.tab.h xa_main.h
- $(CC) $(CFLAGS) -c xa_rasm.tab.c
-
-xa_main.o: xa_main.c xa_main.h xa_version.h
- $(CC) $(CFLAGS) -Wall -c xa_main.c
-
-xa_link.o: xa_link.c xa_main.h xa_version.h
- $(CC) $(CFLAGS) -Wall -c xa_link.c
-
-xa_rasm.tab.c xa_rasm.tab.h: xa_rasm.y
- $(YACC) xa_rasm.y
- mv y.tab.c xa_rasm.tab.c
- mv y.tab.h xa_rasm.tab.h
-
-xa_rasm.lex.c: xa_rasm.l
- $(LEX) xa_rasm.l
- mv lex.yy.c xa_rasm.lex.c
-
-all: xa_rasm
-
-clean:
- rm -f *.tab.c *.tab.h *.lex.c *.o *.bak y.output *.hex *.lst *.obj
- rm -f xa_rasm xa_link core *~
-
--- /dev/null
+VPATH = @srcdir@
+
+CC = gcc
+CFLAGS = -ggdb -Wall
+YACC = bison -y -d
+LEX = flex -i
+LEXLIB =
+
+all: xa_rasm xa_link
+
+OBJECTS = xa_main.o xa_rasm.tab.o xa_rasm.lex.o
+
+xa_rasm: $(OBJECTS)
+ $(CC) -o xa_rasm $(OBJECTS) $(LEXLIB)
+ #strip xa_rasm
+
+xa_rasm.lex.o: xa_rasm.lex.c xa_rasm.tab.h xa_main.h
+ $(CC) $(CFLAGS) -c xa_rasm.lex.c
+
+xa_rasm.tab.o: xa_rasm.tab.c xa_rasm.tab.h xa_main.h
+ $(CC) $(CFLAGS) -c xa_rasm.tab.c
+
+xa_main.o: xa_main.c xa_main.h xa_version.h
+ $(CC) $(CFLAGS) -Wall -c xa_main.c
+
+xa_link.o: xa_link.c xa_main.h xa_version.h
+ $(CC) $(CFLAGS) -Wall -c xa_link.c
+
+xa_rasm.tab.c xa_rasm.tab.h: xa_rasm.y
+ $(YACC) xa_rasm.y
+ mv y.tab.c xa_rasm.tab.c
+ mv y.tab.h xa_rasm.tab.h
+
+xa_rasm.lex.c: xa_rasm.l
+ $(LEX) xa_rasm.l
+ mv lex.yy.c xa_rasm.lex.c
+
+all: xa_rasm
+
+clean:
+ rm -f *.tab.c *.tab.h *.lex.c *.o *.bak y.output *.hex *.lst *.obj
+ rm -f xa_rasm xa_link core *~
+
-#
-#
-#
+VPATH = @srcdir@
+srcdir = @srcdir@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
-VERSION = @VERSION@
-VERSIONHI = @VERSIONHI@
-VERSIONLO = @VERSIONLO@
-VERSIONP = @VERSIONP@
+include $(top_builddir)Makefile.common
-SHELL = /bin/sh
-CC = @CC@
-CPP = @CPP@
-INSTALL = @INSTALL@
+OBJDIR = obj/$(EXT)
-PRJDIR = ../..
+SDC = .
-srcdir = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-bindir = @bindir@
-libdir = @libdir@
-datadir = @datadir@
-includedir = @include@
-mandir = @mandir@
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-infodir = @infodir@
+SLIBSRC = NewAlloc.c
-CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR)
-CFLAGS = @CFLAGS@ -Wall -DINDEXLIB -DMLH_MAP -DUNIX -DSDK -funsigned-char -ggdb
-M_OR_MM = @M_OR_MM@
-LDFLAGS = @LDFLAGS@ -lm
+SRC = asdata.c asexpr.c aslex.c aslist.c asmain.c asout.c \
+ assubr.c assym.c z80adr.c z80ext.c z80mch.c z80pst.c
-ASOBJECTS = asdata.o asexpr.o aslex.o aslist.o asmain.o asout.o \
- assubr.o assym.o z80adr.o z80ext.o z80mch.o z80pst.o
-ASSOURCES = $(patsubst %.o,%.c,$(ASOBJECTS))
+OBJS = $(SRC:%.c=$(OBJDIR)/%.o)
+SLIBOBJS = $(SLIBSRC:%.c=$(OBJDIR)/%.o)
-ASXZ80 = $(PRJDIR)/bin/as-z80
+BINS = $(BUILDDIR)/as$(EXT)$(EXEEXT)
-# Compiling entire program or any subproject
-# ------------------------------------------
-all: checkconf $(ASXZ80)
+CFLAGS += $(CPPFLAGS) $(OPTS) -I. -DINDEXLIB -DMLH_MAP -DUNIX -DSDK
+CFLAGS += -funsigned-char
+CFLAGS += -I$(SLIB)
-$(ASXZ80): $(ASOBJECTS)
- $(CC) $(CFLAGS) -o $@ $(ASOBJECTS) $(LDFLAGS)
+LDFLAGS += -lm $(EXTRALIBS)
-# Compiling and installing everything and runing test
-# ---------------------------------------------------
-install: all installdirs
- $(INSTALL) $(ASXZ80) $(DESTDIR)$(bindir)/as-z80
-
-# Deleting all the installed files
-# --------------------------------
-uninstall:
- rm -f $(DESTDIR)$(bindir)/as-z80
-
-
-# Performing self-test
-# --------------------
-check:
+all: dep $(BINS)
+dep: Makefile.dep
-# Performing installation test
-# ----------------------------
-installcheck:
+Makefile.dep: $(SRC) $(srcdir)/*.h
+ $(CPP) $(CPPFLAGS) $(M_OR_MM) $^ > Makefile.dep
+ifeq "$(findstring $(MAKECMDGOALS),uninstall check installcheck installdirs \
+ clean distclean mostlyclean realclean)" ""
+ include Makefile.dep
+endif
-# Creating installation directories
-# ---------------------------------
-installdirs:
- $(INSTALL) -d $(DESTDIR)$(bindir)
+# We need a '.stamp'-file in $(OBJDIR), because the time stamp
+# of $(OBJDIR) itself is always updated, when a file in $(OBJDIR)
+# is updated. A rule like
+# $(OBJDIR)/anyfile: $(OBJDIR)
+# will always force a remake (at least on Linux ext2).
+$(OBJDIR)/.stamp:
+ mkdir -p $(OBJDIR)
+ touch $(OBJDIR)/.stamp
-# Creating dependencies
-# ---------------------
-dep: Makefile.dep
+$(BINS): $(OBJS) $(SLIBOBJS)
+ $(CC) -o $(BINS) $(OBJS) $(SLIBOBJS) $(LDFLAGS)
-Makefile.dep: $(ASSOURCES) *.h $(PRJDIR)/*.h
- $(CPP) $(CPPFLAGS) $(M_OR_MM) $(ASSOURCES) >Makefile.dep
-include Makefile.dep
-include clean.mk
+$(OBJDIR)/%.o: %.c $(OBJDIR)/.stamp
+ $(CC) -c $(CFLAGS) -o $@ $<
-# My rules
-# --------
-.c.o:
- $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+$(OBJDIR)/%.o: $(SLIB)/%.c $(OBJDIR)/.stamp
+ $(CC) -c $(CFLAGS) -o $@ $<
+_as-z80:
+ $(MAKE) EXT=-z80$(E)
-# Remaking configuration
-# ----------------------
-checkconf:
- @if [ -f $(PRJDIR)/devel ]; then\
- $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
- fi
+_as-gbz80:
+ $(MAKE) EXT=-gbz80$(E) OPTS=-DGAMEBOY
-# End of Makefile
+include $(srcdir)/clean.mk
# Deleting all files created by building the program
# --------------------------------------------------
-include ../../Makefile.common
+include $(top_builddir)Makefile.common
clean:
rm -rf obj
rm -f *core *[%~] *.[oa]
rm -f .[a-z]*~
- rm -f $(BUILDDIR)/as-z80$(EXEEXT) as-z80$(EXEEXT)
- rm -f $(BUILDDIR)/as-gbz80$(EXEEXT) as-gbz80$(EXEEXT)
+ rm -f $(top_builddir)bin/as-z80$(EXEEXT) as-z80$(EXEEXT)
+ rm -f $(top_builddir)bin/as-gbz80$(EXEEXT) as-gbz80$(EXEEXT)
# Deleting all files created by configuring or building the program
# -----------------------------------------------------------------
distclean: clean
- rm -f *.dep
+ rm -f Makefile *.dep
# Like clean but some files may still exist
clean:
rm -f *core *[%~] *.[oa]
rm -f .[a-z]*~
- rm -f $(PRJDIR)/as-z80 as-z80
+ rm -f $(top_builddir)bin/as-z80 as-z80
# Deleting all files created by configuring or building the program
# Deleting all files created by configuring or building the program
# -----------------------------------------------------------------
distclean: clean
- rm -f config.cache config.log config.status Makefile.common
+ rm -f config.cache config.log config.status Makefile Makefile.common
rm -f sdccconf.h main.mk *.dep
rm -f ports.all ports.build
PACKAGE_STRING=
PACKAGE_BUGREPORT=
-ac_unique_file="Makefile"
+ac_unique_file="Makefile.in"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
ac_subdirs_all="$ac_subdirs_all support/cpp2"
ac_subdirs_all="$ac_subdirs_all packihx"
ac_subdirs_all="$ac_subdirs_all sim/ucsim"
-ac_subdirs_all="$ac_subdirs_all device/lib/pic16"
ac_subdirs_all="$ac_subdirs_all device/lib/pic"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS AWK VERSION VERSIONHI VERSIONLO VERSIONP CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB LEX LEXLIB LEX_OUTPUT_ROOT YACC AUTOCONF STRIP AS CP LYX LATEX LATEX2HTML PDFLATEX DVIPDF EGREP M_OR_MM sdccconf_h_dir_separator include_dir_suffix lib_dir_suffix docdir OPT_ENABLE_UCSIM OPT_ENABLE_DEVICE_LIB_BUILD OPT_ENABLE_PACKIHX subdirs LIBOBJS LTLIBOBJS'
+ac_subdirs_all="$ac_subdirs_all device/lib/pic16"
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS AWK VERSION VERSIONHI VERSIONLO VERSIONP CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB LEX LEXLIB LEX_OUTPUT_ROOT YACC AUTOCONF STRIP AS CP EGREP M_OR_MM sdccconf_h_dir_separator include_dir_suffix lib_dir_suffix docdir OPT_DISABLE_MCS51 OPT_DISABLE_GBZ80 OPT_DISABLE_Z80 OPT_DISABLE_AVR OPT_DISABLE_DS390 OPT_DISABLE_DS400 OPT_DISABLE_PIC OPT_DISABLE_PIC16 OPT_DISABLE_XA51 OPT_DISABLE_HC08 OPT_DISABLE_UCSIM OPT_DISABLE_DEVICE_LIB OPT_DISABLE_PACKIHX OPT_DISABLE_SDCPP OPT_ENABLE_DOC LYX LATEX LATEX2HTML PDFLATEX DVIPDF DVIPS MAKEINDEX OPT_ENABLE_LIBGC subdirs LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
--disable-ds390-port Excludes the DS390 port
--disable-ds400-port Excludes the DS400 port
--disable-pic-port Excludes the PIC port
- --disable-pic16-port Excludes the PIC port
+ --disable-pic16-port Excludes the PIC16 port
--disable-xa51-port Excludes the XA51 port
--disable-hc08-port Excludes the HC08 port
--disable-ucsim Disables configuring and building of ucsim
- --disable-device-lib-build
- Disables automatically building device libraries
+ --disable-device-lib Disables building device libraries
--disable-packihx Disables building packihx
+ --disable-sdcpp Disables building sdcpp
+ --enable-doc Enables building the documentation
--enable-libgc Use the Bohem memory allocator. Lower runtime
footprint.
echo "$as_me:$LINENO: checking version of the package" >&5
echo $ECHO_N "checking version of the package... $ECHO_C" >&6
-if test -f .version; then
- VERSION=`cat .version`
+if test -f ${srcdir}/.version; then
+ VERSION=`cat ${srcdir}/.version`
elif test -f ../.version; then
VERSION=`cat ../.version`
else
fi
-# Extract the first word of "lyx", so it can be a program name with args.
-set dummy lyx; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_LYX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$LYX"; then
- ac_cv_prog_LYX="$LYX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_LYX="lyx"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_LYX" && ac_cv_prog_LYX=":"
-fi
-fi
-LYX=$ac_cv_prog_LYX
-if test -n "$LYX"; then
- echo "$as_me:$LINENO: result: $LYX" >&5
-echo "${ECHO_T}$LYX" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-# Extract the first word of "latex", so it can be a program name with args.
-set dummy latex; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_LATEX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$LATEX"; then
- ac_cv_prog_LATEX="$LATEX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_LATEX="latex"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_LATEX" && ac_cv_prog_LATEX=":"
-fi
-fi
-LATEX=$ac_cv_prog_LATEX
-if test -n "$LATEX"; then
- echo "$as_me:$LINENO: result: $LATEX" >&5
-echo "${ECHO_T}$LATEX" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-# Extract the first word of "latex2html", so it can be a program name with args.
-set dummy latex2html; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_LATEX2HTML+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$LATEX2HTML"; then
- ac_cv_prog_LATEX2HTML="$LATEX2HTML" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_LATEX2HTML="latex2html"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_LATEX2HTML" && ac_cv_prog_LATEX2HTML=":"
-fi
-fi
-LATEX2HTML=$ac_cv_prog_LATEX2HTML
-if test -n "$LATEX2HTML"; then
- echo "$as_me:$LINENO: result: $LATEX2HTML" >&5
-echo "${ECHO_T}$LATEX2HTML" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-# Extract the first word of "pdflatex", so it can be a program name with args.
-set dummy pdflatex; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_PDFLATEX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$PDFLATEX"; then
- ac_cv_prog_PDFLATEX="$PDFLATEX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_PDFLATEX="pdflatex"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_PDFLATEX" && ac_cv_prog_PDFLATEX=":"
-fi
-fi
-PDFLATEX=$ac_cv_prog_PDFLATEX
-if test -n "$PDFLATEX"; then
- echo "$as_me:$LINENO: result: $PDFLATEX" >&5
-echo "${ECHO_T}$PDFLATEX" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-# Extract the first word of "dvipdf", so it can be a program name with args.
-set dummy dvipdf; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_DVIPDF+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$DVIPDF"; then
- ac_cv_prog_DVIPDF="$DVIPDF" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_DVIPDF="dvipdf"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_DVIPDF" && ac_cv_prog_DVIPDF=":"
-fi
-fi
-DVIPDF=$ac_cv_prog_DVIPDF
-if test -n "$DVIPDF"; then
- echo "$as_me:$LINENO: result: $DVIPDF" >&5
-echo "${ECHO_T}$DVIPDF" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-
if test "$YACC" = ":"; then
# Macro definitions
# ===========================================================================
-# DD_COPT macro checks if the compiler specified as the 1st parameter
+# adl_DD_COPT macro checks if the compiler specified as the 1st parameter
# supports option specified as the 2nd parameter
# For example: DD_CPORT(CXX, fPIC)
#
# Examples:
#
-# AC_EXPAND(prefix, "/usr/local", expanded_prefix)
+# adl_EXPAND(prefix, "/usr/local", expanded_prefix)
-# AC_NORMALIZE_DEFINE_UNQUOTED(var, DEFINE, REFERENCE_STRING)
# The variables in the header are replaced by AC_*DEFINE*()
# sdccconf_h_dir_separator contains a backslash.
-if test "${sdccconf_h_dir_separator}" = ""; then
+if test "x${sdccconf_h_dir_separator}" = "x"; then
sdccconf_h_dir_separator="/"
fi
ac_ndu=$expanded_prefix
case ":$ac_ndu:" in
-# change empty paths to '.'
::) ac_ndu='.' ;;
-# strip trailing slashes
:*[\\/]:) ac_ndu=`echo "$ac_ndu" | sed 's,[\\/]*$,,'` ;;
:*:) ;;
esac
-# squeze repeated slashes
case $sdccconf_h_dir_separator in
-# if the path contains any backslashes, turn slashes into backslashes
-# Bernhard Held 2003-04-06
-# This was the original line. It doesn't:
-# - convert the first slash
-# - replace a slash with a double-backslash
-# *\\*) ac_ndu=`echo "[$]ac_ndu" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
- *\\*) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;;
+ *\\*) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
-# if the path contains slashes, also turn backslashes into slashes
*) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
esac
cat >>confdefs.h <<_ACEOF
ac_ndu=$expanded_exec_prefix
case ":$ac_ndu:" in
-# change empty paths to '.'
::) ac_ndu='.' ;;
-# strip trailing slashes
:*[\\/]:) ac_ndu=`echo "$ac_ndu" | sed 's,[\\/]*$,,'` ;;
:*:) ;;
esac
-# squeze repeated slashes
case $sdccconf_h_dir_separator in
-# if the path contains any backslashes, turn slashes into backslashes
-# Bernhard Held 2003-04-06
-# This was the original line. It doesn't:
-# - convert the first slash
-# - replace a slash with a double-backslash
-# *\\*) ac_ndu=`echo "[$]ac_ndu" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
- *\\*) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;;
+ *\\*) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
-# if the path contains slashes, also turn backslashes into slashes
*) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
esac
cat >>confdefs.h <<_ACEOF
ac_ndu=$expanded_bindir
case ":$ac_ndu:" in
-# change empty paths to '.'
::) ac_ndu='.' ;;
-# strip trailing slashes
:*[\\/]:) ac_ndu=`echo "$ac_ndu" | sed 's,[\\/]*$,,'` ;;
:*:) ;;
esac
-# squeze repeated slashes
case $sdccconf_h_dir_separator in
-# if the path contains any backslashes, turn slashes into backslashes
-# Bernhard Held 2003-04-06
-# This was the original line. It doesn't:
-# - convert the first slash
-# - replace a slash with a double-backslash
-# *\\*) ac_ndu=`echo "[$]ac_ndu" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
- *\\*) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;;
+ *\\*) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
-# if the path contains slashes, also turn backslashes into slashes
*) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
esac
cat >>confdefs.h <<_ACEOF
ac_ndu=$expanded_datadir
case ":$ac_ndu:" in
-# change empty paths to '.'
::) ac_ndu='.' ;;
-# strip trailing slashes
:*[\\/]:) ac_ndu=`echo "$ac_ndu" | sed 's,[\\/]*$,,'` ;;
:*:) ;;
esac
-# squeze repeated slashes
case $sdccconf_h_dir_separator in
-# if the path contains any backslashes, turn slashes into backslashes
-# Bernhard Held 2003-04-06
-# This was the original line. It doesn't:
-# - convert the first slash
-# - replace a slash with a double-backslash
-# *\\*) ac_ndu=`echo "[$]ac_ndu" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
- *\\*) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;;
+ *\\*) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
-# if the path contains slashes, also turn backslashes into slashes
*) ac_ndu=`echo "$ac_ndu" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
esac
cat >>confdefs.h <<_ACEOF
# include/lib suffix
norm_inc_dir_suffix=${include_dir_suffix}
case ":$norm_inc_dir_suffix:" in
-# change empty paths to '.'
::) norm_inc_dir_suffix='.' ;;
-# strip trailing slashes
:*[\\/]:) norm_inc_dir_suffix=`echo "$norm_inc_dir_suffix" | sed 's,[\\/]*$,,'` ;;
:*:) ;;
esac
-# squeze repeated slashes
case $sdccconf_h_dir_separator in
-# if the path contains any backslashes, turn slashes into backslashes
-# Bernhard Held 2003-04-06
-# This was the original line. It doesn't:
-# - convert the first slash
-# - replace a slash with a double-backslash
-# *\\*) norm_inc_dir_suffix=`echo "[$]norm_inc_dir_suffix" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
- *\\*) norm_inc_dir_suffix=`echo "$norm_inc_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;;
+ *\\*) norm_inc_dir_suffix=`echo "$norm_inc_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
-# if the path contains slashes, also turn backslashes into slashes
*) norm_inc_dir_suffix=`echo "$norm_inc_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
esac
cat >>confdefs.h <<_ACEOF
norm_lib_dir_suffix=${lib_dir_suffix}
case ":$norm_lib_dir_suffix:" in
-# change empty paths to '.'
::) norm_lib_dir_suffix='.' ;;
-# strip trailing slashes
:*[\\/]:) norm_lib_dir_suffix=`echo "$norm_lib_dir_suffix" | sed 's,[\\/]*$,,'` ;;
:*:) ;;
esac
-# squeze repeated slashes
case $sdccconf_h_dir_separator in
-# if the path contains any backslashes, turn slashes into backslashes
-# Bernhard Held 2003-04-06
-# This was the original line. It doesn't:
-# - convert the first slash
-# - replace a slash with a double-backslash
-# *\\*) norm_lib_dir_suffix=`echo "[$]norm_lib_dir_suffix" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
- *\\*) norm_lib_dir_suffix=`echo "$norm_lib_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;;
+ *\\*) norm_lib_dir_suffix=`echo "$norm_lib_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
-# if the path contains slashes, also turn backslashes into slashes
*) norm_lib_dir_suffix=`echo "$norm_lib_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
esac
cat >>confdefs.h <<_ACEOF
echo "$_lcl_receval")`
_lcl_notation="$_lcl_from$_lcl_to"
case ":$_lcl_from:" in
-# change empty paths to '.'
::) _lcl_from='.' ;;
-# strip trailing slashes
:*[\\/]:) _lcl_from=`echo "$_lcl_from" | sed 's,[\\/]*$,,'` ;;
:*:) ;;
esac
-# squeze repeated slashes
case '/' in
-# if the path contains any backslashes, turn slashes into backslashes
-# Bernhard Held 2003-04-06
-# This was the original line. It doesn't:
-# - convert the first slash
-# - replace a slash with a double-backslash
-# *\\*) _lcl_from=`echo "[$]_lcl_from" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
- *\\*) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;;
+ *\\*) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
-# if the path contains slashes, also turn backslashes into slashes
*) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
esac
case ":$_lcl_to:" in
-# change empty paths to '.'
::) _lcl_to='.' ;;
-# strip trailing slashes
:*[\\/]:) _lcl_to=`echo "$_lcl_to" | sed 's,[\\/]*$,,'` ;;
:*:) ;;
esac
-# squeze repeated slashes
case '/' in
-# if the path contains any backslashes, turn slashes into backslashes
-# Bernhard Held 2003-04-06
-# This was the original line. It doesn't:
-# - convert the first slash
-# - replace a slash with a double-backslash
-# *\\*) _lcl_to=`echo "[$]_lcl_to" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
- *\\*) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;;
+ *\\*) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
-# if the path contains slashes, also turn backslashes into slashes
*) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
esac
_lcl_common_prefix=''
_lcl_second_suffix=`expr "x$_lcl_to" : "x$_lcl_common_prefix/*\(.*\)"`
_lcl_result_tmp="$_lcl_first_rel$_lcl_second_suffix"
case ":$_lcl_result_tmp:" in
-# change empty paths to '.'
::) _lcl_result_tmp='.' ;;
-# strip trailing slashes
:*[\\/]:) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,[\\/]*$,,'` ;;
:*:) ;;
esac
-# squeze repeated slashes
case "$_lcl_notation" in
-# if the path contains any backslashes, turn slashes into backslashes
-# Bernhard Held 2003-04-06
-# This was the original line. It doesn't:
-# - convert the first slash
-# - replace a slash with a double-backslash
-# *\\*) _lcl_result_tmp=`echo "[$]_lcl_result_tmp" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
- *\\*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;;
+ *\\*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
-# if the path contains slashes, also turn backslashes into slashes
*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
esac
eval $_lcl_result_var='$_lcl_result_tmp'
done
case ":$bin2data_dir:" in
-# change empty paths to '.'
::) bin2data_dir='.' ;;
-# strip trailing slashes
:*[\\/]:) bin2data_dir=`echo "$bin2data_dir" | sed 's,[\\/]*$,,'` ;;
:*:) ;;
esac
-# squeze repeated slashes
case $sdccconf_h_dir_separator in
-# if the path contains any backslashes, turn slashes into backslashes
-# Bernhard Held 2003-04-06
-# This was the original line. It doesn't:
-# - convert the first slash
-# - replace a slash with a double-backslash
-# *\\*) bin2data_dir=`echo "[$]bin2data_dir" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
- *\\*) bin2data_dir=`echo "$bin2data_dir" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;;
+ *\\*) bin2data_dir=`echo "$bin2data_dir" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
-# if the path contains slashes, also turn backslashes into slashes
*) bin2data_dir=`echo "$bin2data_dir" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
esac
cat >>confdefs.h <<_ACEOF
echo "$_lcl_receval")`
_lcl_notation="$_lcl_from$_lcl_to"
case ":$_lcl_from:" in
-# change empty paths to '.'
::) _lcl_from='.' ;;
-# strip trailing slashes
:*[\\/]:) _lcl_from=`echo "$_lcl_from" | sed 's,[\\/]*$,,'` ;;
:*:) ;;
esac
-# squeze repeated slashes
case '/' in
-# if the path contains any backslashes, turn slashes into backslashes
-# Bernhard Held 2003-04-06
-# This was the original line. It doesn't:
-# - convert the first slash
-# - replace a slash with a double-backslash
-# *\\*) _lcl_from=`echo "[$]_lcl_from" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
- *\\*) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;;
+ *\\*) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
-# if the path contains slashes, also turn backslashes into slashes
*) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
esac
case ":$_lcl_to:" in
-# change empty paths to '.'
::) _lcl_to='.' ;;
-# strip trailing slashes
:*[\\/]:) _lcl_to=`echo "$_lcl_to" | sed 's,[\\/]*$,,'` ;;
:*:) ;;
esac
-# squeze repeated slashes
case '/' in
-# if the path contains any backslashes, turn slashes into backslashes
-# Bernhard Held 2003-04-06
-# This was the original line. It doesn't:
-# - convert the first slash
-# - replace a slash with a double-backslash
-# *\\*) _lcl_to=`echo "[$]_lcl_to" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
- *\\*) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;;
+ *\\*) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
-# if the path contains slashes, also turn backslashes into slashes
*) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
esac
_lcl_common_prefix=''
_lcl_second_suffix=`expr "x$_lcl_to" : "x$_lcl_common_prefix/*\(.*\)"`
_lcl_result_tmp="$_lcl_first_rel$_lcl_second_suffix"
case ":$_lcl_result_tmp:" in
-# change empty paths to '.'
::) _lcl_result_tmp='.' ;;
-# strip trailing slashes
:*[\\/]:) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,[\\/]*$,,'` ;;
:*:) ;;
esac
-# squeze repeated slashes
case "$_lcl_notation" in
-# if the path contains any backslashes, turn slashes into backslashes
-# Bernhard Held 2003-04-06
-# This was the original line. It doesn't:
-# - convert the first slash
-# - replace a slash with a double-backslash
-# *\\*) _lcl_result_tmp=`echo "[$]_lcl_result_tmp" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
- *\\*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;;
+ *\\*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
-# if the path contains slashes, also turn backslashes into slashes
*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
esac
eval $_lcl_result_var='$_lcl_result_tmp'
done
case ":$prefix2bin_dir:" in
-# change empty paths to '.'
::) prefix2bin_dir='.' ;;
-# strip trailing slashes
:*[\\/]:) prefix2bin_dir=`echo "$prefix2bin_dir" | sed 's,[\\/]*$,,'` ;;
:*:) ;;
esac
-# squeze repeated slashes
case $sdccconf_h_dir_separator in
-# if the path contains any backslashes, turn slashes into backslashes
-# Bernhard Held 2003-04-06
-# This was the original line. It doesn't:
-# - convert the first slash
-# - replace a slash with a double-backslash
-# *\\*) prefix2bin_dir=`echo "[$]prefix2bin_dir" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
- *\\*) prefix2bin_dir=`echo "$prefix2bin_dir" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;;
+ *\\*) prefix2bin_dir=`echo "$prefix2bin_dir" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
-# if the path contains slashes, also turn backslashes into slashes
*) prefix2bin_dir=`echo "$prefix2bin_dir" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
esac
cat >>confdefs.h <<_ACEOF
echo "$_lcl_receval")`
_lcl_notation="$_lcl_from$_lcl_to"
case ":$_lcl_from:" in
-# change empty paths to '.'
::) _lcl_from='.' ;;
-# strip trailing slashes
:*[\\/]:) _lcl_from=`echo "$_lcl_from" | sed 's,[\\/]*$,,'` ;;
:*:) ;;
esac
-# squeze repeated slashes
case '/' in
-# if the path contains any backslashes, turn slashes into backslashes
-# Bernhard Held 2003-04-06
-# This was the original line. It doesn't:
-# - convert the first slash
-# - replace a slash with a double-backslash
-# *\\*) _lcl_from=`echo "[$]_lcl_from" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
- *\\*) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;;
+ *\\*) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
-# if the path contains slashes, also turn backslashes into slashes
*) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
esac
case ":$_lcl_to:" in
-# change empty paths to '.'
::) _lcl_to='.' ;;
-# strip trailing slashes
:*[\\/]:) _lcl_to=`echo "$_lcl_to" | sed 's,[\\/]*$,,'` ;;
:*:) ;;
esac
-# squeze repeated slashes
case '/' in
-# if the path contains any backslashes, turn slashes into backslashes
-# Bernhard Held 2003-04-06
-# This was the original line. It doesn't:
-# - convert the first slash
-# - replace a slash with a double-backslash
-# *\\*) _lcl_to=`echo "[$]_lcl_to" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
- *\\*) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;;
+ *\\*) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
-# if the path contains slashes, also turn backslashes into slashes
*) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
esac
_lcl_common_prefix=''
_lcl_second_suffix=`expr "x$_lcl_to" : "x$_lcl_common_prefix/*\(.*\)"`
_lcl_result_tmp="$_lcl_first_rel$_lcl_second_suffix"
case ":$_lcl_result_tmp:" in
-# change empty paths to '.'
::) _lcl_result_tmp='.' ;;
-# strip trailing slashes
:*[\\/]:) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,[\\/]*$,,'` ;;
:*:) ;;
esac
-# squeze repeated slashes
case "$_lcl_notation" in
-# if the path contains any backslashes, turn slashes into backslashes
-# Bernhard Held 2003-04-06
-# This was the original line. It doesn't:
-# - convert the first slash
-# - replace a slash with a double-backslash
-# *\\*) _lcl_result_tmp=`echo "[$]_lcl_result_tmp" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
- *\\*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;;
+ *\\*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
-# if the path contains slashes, also turn backslashes into slashes
*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
esac
eval $_lcl_result_var='$_lcl_result_tmp'
done
case ":$prefix2data_dir:" in
-# change empty paths to '.'
::) prefix2data_dir='.' ;;
-# strip trailing slashes
:*[\\/]:) prefix2data_dir=`echo "$prefix2data_dir" | sed 's,[\\/]*$,,'` ;;
:*:) ;;
esac
-# squeze repeated slashes
case $sdccconf_h_dir_separator in
-# if the path contains any backslashes, turn slashes into backslashes
-# Bernhard Held 2003-04-06
-# This was the original line. It doesn't:
-# - convert the first slash
-# - replace a slash with a double-backslash
-# *\\*) prefix2data_dir=`echo "[$]prefix2data_dir" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
- *\\*) prefix2data_dir=`echo "$prefix2data_dir" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g' | sed 's,^[\\/],\\\\\\\\,'` ;;
+ *\\*) prefix2data_dir=`echo "$prefix2data_dir" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
-# if the path contains slashes, also turn backslashes into slashes
*) prefix2data_dir=`echo "$prefix2data_dir" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
esac
if test "${prefix2data_dir}" = "."; then
_ACEOF
+# Port selection helper
+# ===========================================================================
+# macro AC_DO_ENABLER()
+# $1 used to access enable_$1, e.g. enable-doc
+# $2 OPT_DISABLE_$2, normally uppercase of $1, e.g. DOC
+# $3 help string
+
+
+# macro AC_DO_DISABLER()
+# $1 used to access disable_$1, e.g. ucsim
+# $2 OPT_DISABLE_$2, normally uppercase of $1, e.g. UCSIM
+# $3 help string
+
+
+# macro AC_DO_PORT($1, $2, $3, $4)
+# $1 used to access enable_$2_port, e.g. gbz80
+# $2 port name in ports.all and ports.build, e.g. z80
+# $3 OPT_DISABLE_$3, normally uppercase of $2, e.g. GBZ80
+# $4 help string
+
+
# Now handle the port selection
# ===========================================================================
rm -f ports.all ports.build
-# Check whether --enable-mcs51-port or --disable-mcs51-port was given.
+
+ # Check whether --enable-mcs51-port or --disable-mcs51-port was given.
if test "${enable_mcs51_port+set}" = set; then
enableval="$enable_mcs51_port"
fi;
-echo mcs51 >>ports.all
-if test "$enable_mcs51_port" = "no"; then
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_MCS51 1
+
+ if test "$enable_mcs51_port" = "no"; then
+ OPT_DISABLE_MCS51=1
+ else
+ enable_mcs51_port="yes"
+ OPT_DISABLE_MCS51=0
+ fi
+
+ cat >>confdefs.h <<_ACEOF
+#define OPT_DISABLE_MCS51 $OPT_DISABLE_MCS51
_ACEOF
-else
+
+
+ echo mcs51 >>ports.all
+ if test $OPT_DISABLE_MCS51 = 0; then
echo mcs51 >>ports.build
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_MCS51 0
-_ACEOF
+ fi
-fi
-# Check whether --enable-gbz80-port or --disable-gbz80-port was given.
+ # Check whether --enable-gbz80-port or --disable-gbz80-port was given.
if test "${enable_gbz80_port+set}" = set; then
enableval="$enable_gbz80_port"
fi;
-echo z80 >>ports.all
-if test "$enable_gbz80_port" = "no"; then
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_GBZ80 1
+
+ if test "$enable_gbz80_port" = "no"; then
+ OPT_DISABLE_GBZ80=1
+ else
+ enable_gbz80_port="yes"
+ OPT_DISABLE_GBZ80=0
+ fi
+
+ cat >>confdefs.h <<_ACEOF
+#define OPT_DISABLE_GBZ80 $OPT_DISABLE_GBZ80
_ACEOF
-else
+
+
+ echo z80 >>ports.all
+ if test $OPT_DISABLE_GBZ80 = 0; then
echo z80 >>ports.build
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_GBZ80 0
-_ACEOF
+ fi
-fi
-# Check whether --enable-z80-port or --disable-z80-port was given.
+ # Check whether --enable-z80-port or --disable-z80-port was given.
if test "${enable_z80_port+set}" = set; then
enableval="$enable_z80_port"
fi;
-echo z80 >>ports.all
-if test "$enable_z80_port" = "no"; then
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_Z80 1
+
+ if test "$enable_z80_port" = "no"; then
+ OPT_DISABLE_Z80=1
+ else
+ enable_z80_port="yes"
+ OPT_DISABLE_Z80=0
+ fi
+
+ cat >>confdefs.h <<_ACEOF
+#define OPT_DISABLE_Z80 $OPT_DISABLE_Z80
_ACEOF
-else
+
+
+ echo z80 >>ports.all
+ if test $OPT_DISABLE_Z80 = 0; then
echo z80 >>ports.build
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_Z80 0
-_ACEOF
+ fi
-fi
-# Check whether --enable-avr-port or --disable-avr-port was given.
+ # Check whether --enable-avr-port or --disable-avr-port was given.
if test "${enable_avr_port+set}" = set; then
enableval="$enable_avr_port"
fi;
-echo avr >>ports.all
-if test "$enable_avr_port" = "no"; then
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_AVR 1
+
+ if test "$enable_avr_port" = "no"; then
+ OPT_DISABLE_AVR=1
+ else
+ enable_avr_port="yes"
+ OPT_DISABLE_AVR=0
+ fi
+
+ cat >>confdefs.h <<_ACEOF
+#define OPT_DISABLE_AVR $OPT_DISABLE_AVR
_ACEOF
-else
+
+
+ echo avr >>ports.all
+ if test $OPT_DISABLE_AVR = 0; then
echo avr >>ports.build
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_AVR 0
-_ACEOF
+ fi
-fi
-# Check whether --enable-ds390-port or --disable-ds390-port was given.
+ # Check whether --enable-ds390-port or --disable-ds390-port was given.
if test "${enable_ds390_port+set}" = set; then
enableval="$enable_ds390_port"
fi;
-echo ds390 >>ports.all
-if test "$enable_ds390_port" = "no"; then
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_DS390 1
-_ACEOF
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_TININative 1
+ if test "$enable_ds390_port" = "no"; then
+ OPT_DISABLE_DS390=1
+ else
+ enable_ds390_port="yes"
+ OPT_DISABLE_DS390=0
+ fi
+
+ cat >>confdefs.h <<_ACEOF
+#define OPT_DISABLE_DS390 $OPT_DISABLE_DS390
_ACEOF
-else
+
+
+ echo ds390 >>ports.all
+ if test $OPT_DISABLE_DS390 = 0; then
echo ds390 >>ports.build
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_DS390 0
-_ACEOF
+ fi
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_TININative 0
+cat >>confdefs.h <<_ACEOF
+#define OPT_DISABLE_TININative $OPT_DISABLE_DS390
_ACEOF
-fi
-# Check whether --enable-ds400-port or --disable-ds400-port was given.
+ # Check whether --enable-ds400-port or --disable-ds400-port was given.
if test "${enable_ds400_port+set}" = set; then
enableval="$enable_ds400_port"
fi;
-echo ds400 >>ports.all
-if test "$enable_ds400_port" = "no"; then
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_DS400 1
-_ACEOF
-else
- echo ds400 >>ports.build
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_DS400 0
+ if test "$enable_ds400_port" = "no"; then
+ OPT_DISABLE_DS400=1
+ else
+ enable_ds400_port="yes"
+ OPT_DISABLE_DS400=0
+ fi
+
+ cat >>confdefs.h <<_ACEOF
+#define OPT_DISABLE_DS400 $OPT_DISABLE_DS400
_ACEOF
-fi
-# Check whether --enable-pic-port or --disable-pic-port was given.
+
+ echo ds400 >>ports.all
+ if test $OPT_DISABLE_DS400 = 0; then
+ echo ds400 >>ports.build
+ fi
+
+
+ # Check whether --enable-pic-port or --disable-pic-port was given.
if test "${enable_pic_port+set}" = set; then
enableval="$enable_pic_port"
fi;
-echo pic >>ports.all
-if test "$enable_pic_port" = "no"; then
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_PIC 1
+
+ if test "$enable_pic_port" = "no"; then
+ OPT_DISABLE_PIC=1
+ else
+ enable_pic_port="yes"
+ OPT_DISABLE_PIC=0
+ fi
+
+ cat >>confdefs.h <<_ACEOF
+#define OPT_DISABLE_PIC $OPT_DISABLE_PIC
_ACEOF
-else
+
+
+ echo pic >>ports.all
+ if test $OPT_DISABLE_PIC = 0; then
echo pic >>ports.build
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_PIC 0
-_ACEOF
+ fi
-fi
-# Check whether --enable-pic16-port or --disable-pic16-port was given.
+ # Check whether --enable-pic16-port or --disable-pic16-port was given.
if test "${enable_pic16_port+set}" = set; then
enableval="$enable_pic16_port"
fi;
-echo pic16 >>ports.all
-if test "$enable_pic16_port" = "no"; then
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_PIC16 1
+
+ if test "$enable_pic16_port" = "no"; then
+ OPT_DISABLE_PIC16=1
+ else
+ enable_pic16_port="yes"
+ OPT_DISABLE_PIC16=0
+ fi
+
+ cat >>confdefs.h <<_ACEOF
+#define OPT_DISABLE_PIC16 $OPT_DISABLE_PIC16
_ACEOF
-else
+
+
+ echo pic16 >>ports.all
+ if test $OPT_DISABLE_PIC16 = 0; then
echo pic16 >>ports.build
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_PIC16 0
-_ACEOF
+ fi
-fi
-# Check whether --enable-xa51-port or --disable-xa51-port was given.
+ # Check whether --enable-xa51-port or --disable-xa51-port was given.
if test "${enable_xa51_port+set}" = set; then
enableval="$enable_xa51_port"
fi;
-echo xa51 >>ports.all
-if test "$enable_xa51_port" = "no"; then
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_XA51 1
+
+ if test "$enable_xa51_port" = "no"; then
+ OPT_DISABLE_XA51=1
+ else
+ enable_xa51_port="yes"
+ OPT_DISABLE_XA51=0
+ fi
+
+ cat >>confdefs.h <<_ACEOF
+#define OPT_DISABLE_XA51 $OPT_DISABLE_XA51
_ACEOF
-else
+
+
+ echo xa51 >>ports.all
+ if test $OPT_DISABLE_XA51 = 0; then
echo xa51 >>ports.build
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_XA51 0
-_ACEOF
+ fi
-fi
-# Check whether --enable-hc08-port or --disable-hc08-port was given.
+ # Check whether --enable-hc08-port or --disable-hc08-port was given.
if test "${enable_hc08_port+set}" = set; then
enableval="$enable_hc08_port"
fi;
-echo hc08 >>ports.all
-if test "$enable_hc08_port" = "no"; then
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_HC08 1
+
+ if test "$enable_hc08_port" = "no"; then
+ OPT_DISABLE_HC08=1
+ else
+ enable_hc08_port="yes"
+ OPT_DISABLE_HC08=0
+ fi
+
+ cat >>confdefs.h <<_ACEOF
+#define OPT_DISABLE_HC08 $OPT_DISABLE_HC08
_ACEOF
-else
+
+
+ echo hc08 >>ports.all
+ if test $OPT_DISABLE_HC08 = 0; then
echo hc08 >>ports.build
- cat >>confdefs.h <<_ACEOF
-#define OPT_DISABLE_HC08 0
-_ACEOF
+ fi
+
-fi
-# Check whether --enable-ucsim or --disable-ucsim was given.
+ # Check whether --enable-ucsim or --disable-ucsim was given.
if test "${enable_ucsim+set}" = set; then
enableval="$enable_ucsim"
fi;
-OPT_ENABLE_UCSIM=$enable_ucsim
+
+ arg1=`echo ucsim | sed s/-/_/`
+
+ if test "`eval echo \\$enable_$arg1`" = "no"; then
+ OPT_DISABLE_UCSIM=1
+ else
+ OPT_DISABLE_UCSIM=0
+ fi
+
+ cat >>confdefs.h <<_ACEOF
+#define OPT_DISABLE_UCSIM $OPT_DISABLE_UCSIM
+_ACEOF
+
-# Check whether --enable-device-lib-build or --disable-device-lib-build was given.
-if test "${enable_device_lib_build+set}" = set; then
- enableval="$enable_device_lib_build"
+
+ # Check whether --enable-device-lib or --disable-device-lib was given.
+if test "${enable_device_lib+set}" = set; then
+ enableval="$enable_device_lib"
fi;
-OPT_ENABLE_DEVICE_LIB_BUILD=$enable_device_lib_build
+ arg1=`echo device-lib | sed s/-/_/`
+
+ if test "`eval echo \\$enable_$arg1`" = "no"; then
+ OPT_DISABLE_DEVICE_LIB=1
+ else
+ OPT_DISABLE_DEVICE_LIB=0
+ fi
-# Check whether --enable-packihx or --disable-packihx was given.
+ cat >>confdefs.h <<_ACEOF
+#define OPT_DISABLE_DEVICE_LIB $OPT_DISABLE_DEVICE_LIB
+_ACEOF
+
+
+
+
+ # Check whether --enable-packihx or --disable-packihx was given.
if test "${enable_packihx+set}" = set; then
enableval="$enable_packihx"
fi;
-OPT_ENABLE_PACKIHX=$enable_packihx
+
+ arg1=`echo packihx | sed s/-/_/`
+
+ if test "`eval echo \\$enable_$arg1`" = "no"; then
+ OPT_DISABLE_PACKIHX=1
+ else
+ OPT_DISABLE_PACKIHX=0
+ fi
+
+ cat >>confdefs.h <<_ACEOF
+#define OPT_DISABLE_PACKIHX $OPT_DISABLE_PACKIHX
+_ACEOF
+
+
-# Check whether --enable-libgc or --disable-libgc was given.
+ # Check whether --enable-sdcpp or --disable-sdcpp was given.
+if test "${enable_sdcpp+set}" = set; then
+ enableval="$enable_sdcpp"
+
+fi;
+
+ arg1=`echo sdcpp | sed s/-/_/`
+
+ if test "`eval echo \\$enable_$arg1`" = "no"; then
+ OPT_DISABLE_SDCPP=1
+ else
+ OPT_DISABLE_SDCPP=0
+ fi
+
+ cat >>confdefs.h <<_ACEOF
+#define OPT_DISABLE_SDCPP $OPT_DISABLE_SDCPP
+_ACEOF
+
+
+
+
+
+ # Check whether --enable-doc or --disable-doc was given.
+if test "${enable_doc+set}" = set; then
+ enableval="$enable_doc"
+
+fi;
+
+ if test "$enable_doc" = "yes"; then
+ OPT_ENABLE_DOC=1
+ else
+ OPT_ENABLE_DOC=0
+ fi
+
+ cat >>confdefs.h <<_ACEOF
+#define OPT_ENABLE_DOC $OPT_ENABLE_DOC
+_ACEOF
+
+
+
+if test $OPT_ENABLE_DOC = 1; then
+ # Extract the first word of "lyx", so it can be a program name with args.
+set dummy lyx; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LYX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$LYX"; then
+ ac_cv_prog_LYX="$LYX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LYX="lyx"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_LYX" && ac_cv_prog_LYX=":"
+fi
+fi
+LYX=$ac_cv_prog_LYX
+if test -n "$LYX"; then
+ echo "$as_me:$LINENO: result: $LYX" >&5
+echo "${ECHO_T}$LYX" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ # Extract the first word of "latex", so it can be a program name with args.
+set dummy latex; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LATEX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$LATEX"; then
+ ac_cv_prog_LATEX="$LATEX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LATEX="latex"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_LATEX" && ac_cv_prog_LATEX=":"
+fi
+fi
+LATEX=$ac_cv_prog_LATEX
+if test -n "$LATEX"; then
+ echo "$as_me:$LINENO: result: $LATEX" >&5
+echo "${ECHO_T}$LATEX" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ # Extract the first word of "latex2html", so it can be a program name with args.
+set dummy latex2html; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LATEX2HTML+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$LATEX2HTML"; then
+ ac_cv_prog_LATEX2HTML="$LATEX2HTML" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LATEX2HTML="latex2html"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_LATEX2HTML" && ac_cv_prog_LATEX2HTML=":"
+fi
+fi
+LATEX2HTML=$ac_cv_prog_LATEX2HTML
+if test -n "$LATEX2HTML"; then
+ echo "$as_me:$LINENO: result: $LATEX2HTML" >&5
+echo "${ECHO_T}$LATEX2HTML" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ # Extract the first word of "pdflatex", so it can be a program name with args.
+set dummy pdflatex; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_PDFLATEX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$PDFLATEX"; then
+ ac_cv_prog_PDFLATEX="$PDFLATEX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PDFLATEX="pdflatex"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_PDFLATEX" && ac_cv_prog_PDFLATEX=":"
+fi
+fi
+PDFLATEX=$ac_cv_prog_PDFLATEX
+if test -n "$PDFLATEX"; then
+ echo "$as_me:$LINENO: result: $PDFLATEX" >&5
+echo "${ECHO_T}$PDFLATEX" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ # Extract the first word of "dvipdf", so it can be a program name with args.
+set dummy dvipdf; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_DVIPDF+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$DVIPDF"; then
+ ac_cv_prog_DVIPDF="$DVIPDF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DVIPDF="dvipdf"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_DVIPDF" && ac_cv_prog_DVIPDF=":"
+fi
+fi
+DVIPDF=$ac_cv_prog_DVIPDF
+if test -n "$DVIPDF"; then
+ echo "$as_me:$LINENO: result: $DVIPDF" >&5
+echo "${ECHO_T}$DVIPDF" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ # Extract the first word of "dvips", so it can be a program name with args.
+set dummy dvips; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_DVIPS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$DVIPS"; then
+ ac_cv_prog_DVIPS="$DVIPS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DVIPS="dvips"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_DVIPS" && ac_cv_prog_DVIPS=":"
+fi
+fi
+DVIPS=$ac_cv_prog_DVIPS
+if test -n "$DVIPS"; then
+ echo "$as_me:$LINENO: result: $DVIPS" >&5
+echo "${ECHO_T}$DVIPS" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ # Extract the first word of "makeindex", so it can be a program name with args.
+set dummy makeindex; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_MAKEINDEX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$MAKEINDEX"; then
+ ac_cv_prog_MAKEINDEX="$MAKEINDEX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MAKEINDEX="makeindex"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_MAKEINDEX" && ac_cv_prog_MAKEINDEX=":"
+fi
+fi
+MAKEINDEX=$ac_cv_prog_MAKEINDEX
+if test -n "$MAKEINDEX"; then
+ echo "$as_me:$LINENO: result: $MAKEINDEX" >&5
+echo "${ECHO_T}$MAKEINDEX" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+ if test "$LYX" = ":"; then
+ { { echo "$as_me:$LINENO: error: Cannot find required program lyx." >&5
+echo "$as_me: error: Cannot find required program lyx." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ if test "$LATEX" = ":"; then
+ { { echo "$as_me:$LINENO: error: Cannot find required program latex." >&5
+echo "$as_me: error: Cannot find required program latex." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ if test "$LATEX2HTML" = ":"; then
+ { { echo "$as_me:$LINENO: error: Cannot find required program latex2html." >&5
+echo "$as_me: error: Cannot find required program latex2html." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ if test "$PDFLATEX" = ":"; then
+ { { echo "$as_me:$LINENO: error: Cannot find required program pdflatex." >&5
+echo "$as_me: error: Cannot find required program pdflatex." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ if test "$DVIPDF" = ":"; then
+ { { echo "$as_me:$LINENO: error: Cannot find required program dvipdf." >&5
+echo "$as_me: error: Cannot find required program dvipdf." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ if test "$DVIPS" = ":"; then
+ { { echo "$as_me:$LINENO: error: Cannot find required program dvips." >&5
+echo "$as_me: error: Cannot find required program dvips." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ if test "$MAKEINDEX" = ":"; then
+ { { echo "$as_me:$LINENO: error: Cannot find required program makeindex." >&5
+echo "$as_me: error: Cannot find required program makeindex." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+fi
+
+
+ # Check whether --enable-libgc or --disable-libgc was given.
if test "${enable_libgc+set}" = set; then
enableval="$enable_libgc"
fi;
-if test "$enable_libgc" = "yes"; then
+
+ if test "$enable_libgc" = "yes"; then
+ OPT_ENABLE_LIBGC=1
+ else
+ OPT_ENABLE_LIBGC=0
+ fi
+
+ cat >>confdefs.h <<_ACEOF
+#define OPT_ENABLE_LIBGC $OPT_ENABLE_LIBGC
+_ACEOF
+
+
+
+if test $OPT_ENABLE_LIBGC = 1; then
echo "$as_me:$LINENO: checking for GC_malloc in -lgc" >&5
echo $ECHO_N "checking for GC_malloc in -lgc... $ECHO_C" >&6
fi
- OPT_ENABLE_LIBGC=1
-else
- OPT_ENABLE_LIBGC=0
+ if test $ac_cv_lib_gc_GC_malloc = no; then
+ { { echo "$as_me:$LINENO: error: Cannot find library libgc with Bohem memory allocator." >&5
+echo "$as_me: error: Cannot find library libgc with Bohem memory allocator." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
fi
-cat >>confdefs.h <<_ACEOF
-#define OPT_ENABLE_LIBGC $OPT_ENABLE_LIBGC
-_ACEOF
-
#remove duplicates
uniq ports.all ports
# Generating output files
# ===========================================================================
-
+test $OPT_DISABLE_SDCPP = 0 &&
subdirs="$subdirs support/cpp2"
-
+test $OPT_DISABLE_PACKIHX = 0 &&
subdirs="$subdirs packihx"
-
+test $OPT_DISABLE_UCSIM = 0 &&
subdirs="$subdirs sim/ucsim"
+test $OPT_ENABLE_DOC = 1 && ac_config_files="$ac_config_files doc/Makefile"
-subdirs="$subdirs device/lib/pic16"
+test $OPT_DISABLE_AVR = 0 && ac_config_files="$ac_config_files src/avr/Makefile"
+
+
+if test $OPT_DISABLE_DS390 = 0; then
+ ac_config_files="$ac_config_files src/ds390/Makefile"
+
+ test $OPT_DISABLE_DEVICE_LIB = 0 && ac_config_files="$ac_config_files device/lib/ds390/Makefile"
+
+fi
+
+if test $OPT_DISABLE_DS400 = 0; then
+ ac_config_files="$ac_config_files src/ds400/Makefile"
+
+ test $OPT_DISABLE_DEVICE_LIB = 0 && ac_config_files="$ac_config_files device/lib/ds400/Makefile"
+
+fi
+if test $OPT_DISABLE_HC08 = 0; then
+ ac_config_files="$ac_config_files src/hc08/Makefile as/hc08/Makefile"
+ test $OPT_DISABLE_DEVICE_LIB = 0 && ac_config_files="$ac_config_files device/lib/hc08/Makefile"
+
+fi
+
+if test $OPT_DISABLE_MCS51 = 0; then
+ ac_config_files="$ac_config_files src/mcs51/Makefile as/mcs51/Makefile debugger/mcs51/Makefile"
+
+ test $OPT_DISABLE_DEVICE_LIB = 0 && ac_config_files="$ac_config_files device/lib/mcs51/Makefile device/lib/small/Makefile device/lib/medium/Makefile device/lib/large/Makefile"
+
+fi
+
+if test $OPT_DISABLE_PIC = 0; then
+ ac_config_files="$ac_config_files src/pic/Makefile"
+
+ test $OPT_DISABLE_DEVICE_LIB = 0 &&
subdirs="$subdirs device/lib/pic"
+fi
+if test $OPT_DISABLE_PIC16 = 0; then
+ ac_config_files="$ac_config_files src/pic16/Makefile"
+
+ test $OPT_DISABLE_DEVICE_LIB = 0 &&
+
+subdirs="$subdirs device/lib/pic16"
+
+fi
+
+test $OPT_DISABLE_XA51 = 0 && ac_config_files="$ac_config_files src/xa51/Makefile"
- ac_config_files="$ac_config_files main.mk:main_in.mk src/Makefile as/mcs51/Makefile as/hc08/Makefile device/include/Makefile device/lib/Makefile debugger/mcs51/Makefile support/regression/Makefile Makefile.common:Makefile.common.in"
+
+if test $OPT_DISABLE_Z80 = 0; then
+ ac_config_files="$ac_config_files src/z80/Makefile as/Makefile as/z80/Makefile link/Makefile link/z80/Makefile"
+
+ test $OPT_DISABLE_DEVICE_LIB = 0 && ac_config_files="$ac_config_files device/lib/z80/Makefile device/lib/gbz80/Makefile"
+
+fi
+
+test $OPT_DISABLE_DEVICE_LIB = 0 && ac_config_files="$ac_config_files device/lib/Makefile"
+
+
+ ac_config_files="$ac_config_files main.mk:main_in.mk src/Makefile device/include/Makefile support/librarian/Makefile support/makebin/Makefile support/regression/Makefile support/valdiag/Makefile Makefile Makefile.common:Makefile.common.in"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
do
case "$ac_config_target" in
# Handling of arguments.
+ "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+ "src/avr/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/avr/Makefile" ;;
+ "src/ds390/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/ds390/Makefile" ;;
+ "device/lib/ds390/Makefile" ) CONFIG_FILES="$CONFIG_FILES device/lib/ds390/Makefile" ;;
+ "src/ds400/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/ds400/Makefile" ;;
+ "device/lib/ds400/Makefile" ) CONFIG_FILES="$CONFIG_FILES device/lib/ds400/Makefile" ;;
+ "src/hc08/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/hc08/Makefile" ;;
+ "as/hc08/Makefile" ) CONFIG_FILES="$CONFIG_FILES as/hc08/Makefile" ;;
+ "device/lib/hc08/Makefile" ) CONFIG_FILES="$CONFIG_FILES device/lib/hc08/Makefile" ;;
+ "src/mcs51/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mcs51/Makefile" ;;
+ "as/mcs51/Makefile" ) CONFIG_FILES="$CONFIG_FILES as/mcs51/Makefile" ;;
+ "debugger/mcs51/Makefile" ) CONFIG_FILES="$CONFIG_FILES debugger/mcs51/Makefile" ;;
+ "device/lib/mcs51/Makefile" ) CONFIG_FILES="$CONFIG_FILES device/lib/mcs51/Makefile" ;;
+ "device/lib/small/Makefile" ) CONFIG_FILES="$CONFIG_FILES device/lib/small/Makefile" ;;
+ "device/lib/medium/Makefile" ) CONFIG_FILES="$CONFIG_FILES device/lib/medium/Makefile" ;;
+ "device/lib/large/Makefile" ) CONFIG_FILES="$CONFIG_FILES device/lib/large/Makefile" ;;
+ "src/pic/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/pic/Makefile" ;;
+ "src/pic16/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/pic16/Makefile" ;;
+ "src/xa51/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/xa51/Makefile" ;;
+ "src/z80/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/z80/Makefile" ;;
+ "as/Makefile" ) CONFIG_FILES="$CONFIG_FILES as/Makefile" ;;
+ "as/z80/Makefile" ) CONFIG_FILES="$CONFIG_FILES as/z80/Makefile" ;;
+ "link/Makefile" ) CONFIG_FILES="$CONFIG_FILES link/Makefile" ;;
+ "link/z80/Makefile" ) CONFIG_FILES="$CONFIG_FILES link/z80/Makefile" ;;
+ "device/lib/z80/Makefile" ) CONFIG_FILES="$CONFIG_FILES device/lib/z80/Makefile" ;;
+ "device/lib/gbz80/Makefile" ) CONFIG_FILES="$CONFIG_FILES device/lib/gbz80/Makefile" ;;
+ "device/lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES device/lib/Makefile" ;;
"main.mk" ) CONFIG_FILES="$CONFIG_FILES main.mk:main_in.mk" ;;
"src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
- "as/mcs51/Makefile" ) CONFIG_FILES="$CONFIG_FILES as/mcs51/Makefile" ;;
- "as/hc08/Makefile" ) CONFIG_FILES="$CONFIG_FILES as/hc08/Makefile" ;;
"device/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES device/include/Makefile" ;;
- "device/lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES device/lib/Makefile" ;;
- "debugger/mcs51/Makefile" ) CONFIG_FILES="$CONFIG_FILES debugger/mcs51/Makefile" ;;
+ "support/librarian/Makefile" ) CONFIG_FILES="$CONFIG_FILES support/librarian/Makefile" ;;
+ "support/makebin/Makefile" ) CONFIG_FILES="$CONFIG_FILES support/makebin/Makefile" ;;
"support/regression/Makefile" ) CONFIG_FILES="$CONFIG_FILES support/regression/Makefile" ;;
+ "support/valdiag/Makefile" ) CONFIG_FILES="$CONFIG_FILES support/valdiag/Makefile" ;;
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"Makefile.common" ) CONFIG_FILES="$CONFIG_FILES Makefile.common:Makefile.common.in" ;;
"sdccconf.h" ) CONFIG_HEADERS="$CONFIG_HEADERS sdccconf.h:sdccconf_in.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
s,@STRIP@,$STRIP,;t t
s,@AS@,$AS,;t t
s,@CP@,$CP,;t t
-s,@LYX@,$LYX,;t t
-s,@LATEX@,$LATEX,;t t
-s,@LATEX2HTML@,$LATEX2HTML,;t t
-s,@PDFLATEX@,$PDFLATEX,;t t
-s,@DVIPDF@,$DVIPDF,;t t
s,@EGREP@,$EGREP,;t t
s,@M_OR_MM@,$M_OR_MM,;t t
s,@sdccconf_h_dir_separator@,$sdccconf_h_dir_separator,;t t
s,@include_dir_suffix@,$include_dir_suffix,;t t
s,@lib_dir_suffix@,$lib_dir_suffix,;t t
s,@docdir@,$docdir,;t t
-s,@OPT_ENABLE_UCSIM@,$OPT_ENABLE_UCSIM,;t t
-s,@OPT_ENABLE_DEVICE_LIB_BUILD@,$OPT_ENABLE_DEVICE_LIB_BUILD,;t t
-s,@OPT_ENABLE_PACKIHX@,$OPT_ENABLE_PACKIHX,;t t
+s,@OPT_DISABLE_MCS51@,$OPT_DISABLE_MCS51,;t t
+s,@OPT_DISABLE_GBZ80@,$OPT_DISABLE_GBZ80,;t t
+s,@OPT_DISABLE_Z80@,$OPT_DISABLE_Z80,;t t
+s,@OPT_DISABLE_AVR@,$OPT_DISABLE_AVR,;t t
+s,@OPT_DISABLE_DS390@,$OPT_DISABLE_DS390,;t t
+s,@OPT_DISABLE_DS400@,$OPT_DISABLE_DS400,;t t
+s,@OPT_DISABLE_PIC@,$OPT_DISABLE_PIC,;t t
+s,@OPT_DISABLE_PIC16@,$OPT_DISABLE_PIC16,;t t
+s,@OPT_DISABLE_XA51@,$OPT_DISABLE_XA51,;t t
+s,@OPT_DISABLE_HC08@,$OPT_DISABLE_HC08,;t t
+s,@OPT_DISABLE_UCSIM@,$OPT_DISABLE_UCSIM,;t t
+s,@OPT_DISABLE_DEVICE_LIB@,$OPT_DISABLE_DEVICE_LIB,;t t
+s,@OPT_DISABLE_PACKIHX@,$OPT_DISABLE_PACKIHX,;t t
+s,@OPT_DISABLE_SDCPP@,$OPT_DISABLE_SDCPP,;t t
+s,@OPT_ENABLE_DOC@,$OPT_ENABLE_DOC,;t t
+s,@LYX@,$LYX,;t t
+s,@LATEX@,$LATEX,;t t
+s,@LATEX2HTML@,$LATEX2HTML,;t t
+s,@PDFLATEX@,$PDFLATEX,;t t
+s,@DVIPDF@,$DVIPDF,;t t
+s,@DVIPS@,$DVIPS,;t t
+s,@MAKEINDEX@,$MAKEINDEX,;t t
+s,@OPT_ENABLE_LIBGC@,$OPT_ENABLE_LIBGC,;t t
s,@subdirs@,$subdirs,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
fi
+# I found no better place
+mkdir -p bin
+
+# Prepare result message
+# ======================
+
+# In the C-header we need \\ as dir-separator, but in the message only \
+dirch=${sdccconf_h_dir_separator}
+test ${dirch} = '\\' && dirch='\'
+
+# calc friendly strings
+
+binPath=`echo "/${prefix2bin_dir}" | sed 's,/\./,/,g'`
+case ":$binPath:" in
+ ::) binPath='.' ;;
+ :*[\\/]:) binPath=`echo "$binPath" | sed 's,[\\/]*$,,'` ;;
+ :*:) ;;
+esac
+case $dirch in
+
+ *\\*) binPath=`echo "$binPath" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
+
+ *) binPath=`echo "$binPath" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
+binPath=`echo "$binPath" | sed 's,\\\\\\\\,\\\\,g'`
+
+
+incPath1=`echo "/${prefix2data_dir}/${norm_inc_dir_suffix}" | sed 's,/\./,/,g'`
+case ":$incPath1:" in
+ ::) incPath1='.' ;;
+ :*[\\/]:) incPath1=`echo "$incPath1" | sed 's,[\\/]*$,,'` ;;
+ :*:) ;;
+esac
+case $dirch in
+
+ *\\*) incPath1=`echo "$incPath1" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
+
+ *) incPath1=`echo "$incPath1" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
+incPath1=`echo "$incPath1" | sed 's,\\\\\\\\,\\\\,g'`
+
+
+incPath2=`echo "/${bin2data_dir}/${norm_inc_dir_suffix}" | sed 's,/\./,/,g'`
+case ":$incPath2:" in
+ ::) incPath2='.' ;;
+ :*[\\/]:) incPath2=`echo "$incPath2" | sed 's,[\\/]*$,,'` ;;
+ :*:) ;;
+esac
+case $dirch in
+
+ *\\*) incPath2=`echo "$incPath2" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
+
+ *) incPath2=`echo "$incPath2" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
+incPath2=`echo "$incPath2" | sed 's,\\\\\\\\,\\\\,g'`
+
+
+incPath3=`echo "${expanded_datadir}/${norm_inc_dir_suffix}" | sed 's,/\./,/,g'`
+case ":$incPath3:" in
+ ::) incPath3='.' ;;
+ :*[\\/]:) incPath3=`echo "$incPath3" | sed 's,[\\/]*$,,'` ;;
+ :*:) ;;
+esac
+case $dirch in
+
+ *\\*) incPath3=`echo "$incPath3" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
+
+ *) incPath3=`echo "$incPath3" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
+incPath3=`echo "$incPath3" | sed 's,\\\\\\\\,\\\\,g'`
+
+
+libPath1=`echo "/${prefix2data_dir}/${norm_lib_dir_suffix}" | sed 's,/\./,/,g'`
+case ":$libPath1:" in
+ ::) libPath1='.' ;;
+ :*[\\/]:) libPath1=`echo "$libPath1" | sed 's,[\\/]*$,,'` ;;
+ :*:) ;;
+esac
+case $dirch in
+
+ *\\*) libPath1=`echo "$libPath1" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
+
+ *) libPath1=`echo "$libPath1" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
+libPath1=`echo "$libPath1" | sed 's,\\\\\\\\,\\\\,g'`
+
+
+libPath2=`echo "/${bin2data_dir}/${norm_lib_dir_suffix}" | sed 's,/\./,/,g'`
+case ":$libPath2:" in
+ ::) libPath2='.' ;;
+ :*[\\/]:) libPath2=`echo "$libPath2" | sed 's,[\\/]*$,,'` ;;
+ :*:) ;;
+esac
+case $dirch in
+
+ *\\*) libPath2=`echo "$libPath2" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
+
+ *) libPath2=`echo "$libPath2" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
+libPath2=`echo "$libPath2" | sed 's,\\\\\\\\,\\\\,g'`
+
+
+libPath3=`echo "${expanded_datadir}/${norm_lib_dir_suffix}" | sed 's,/\./,/,g'`
+case ":$libPath3:" in
+ ::) libPath3='.' ;;
+ :*[\\/]:) libPath3=`echo "$libPath3" | sed 's,[\\/]*$,,'` ;;
+ :*:) ;;
+esac
+case $dirch in
+
+ *\\*) libPath3=`echo "$libPath3" | sed 's,\(.\)[\\/][\\/]*,\1\\\\\\\\,g
+ s,^[\\/],\\\\\\\\,'` ;;
+
+ *) libPath3=`echo "$libPath3" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;;
+esac
+libPath3=`echo "$libPath3" | sed 's,\\\\\\\\,\\\\,g'`
+
+
+echo "$as_me:$LINENO: result:
+sdcc ${VERSION} is now configured for
+
+ Build: ${build_alias}
+ Host: ${host_alias}
+ Source directory: ${srcdir}
+ C compiler: ${CC}
+ CFLAGS: ${CFLAGS}
+
+ ENABLED Ports:
+ avr ${enable_avr_port}
+ ds390 ${enable_ds390_port}
+ ds400 ${enable_ds400_port}
+ gbz80 ${enable_gbz80_port}
+ hc08 ${enable_hc08_port}
+ pic ${enable_pic_port}
+ pic16 ${enable_pic16_port}
+ xa51 ${enable_xa51_port}
+ z80 ${enable_z80_port}
+
+ Disable packihx: ${OPT_DISABLE_PACKIHX}
+ Disable ucsim: ${OPT_DISABLE_UCSIM}
+ Disable device lib: ${OPT_DISABLE_DEVICE_LIB}
+ Disable ucsim: ${OPT_DISABLE_UCSIM}
+ Enable documentation: ${OPT_ENABLE_DOC}
+ Enable libgc: ${OPT_ENABLE_LIBGC}
+
+ Install paths:
+ binary files: ${exec_prefix}
+ include files: ${datadir}/${include_dir_suffix}
+ library files: ${datadir}/${lib_dir_suffix}
+ documentation: ${docdir}
+
+ prefix: ${prefix}
+ datadir: ${datadir}
+
+ Search paths (incomplete, see manual for all search paths):
+ binary files: \$SDCC_HOME${binPath}
+ include files: ${incPath1}
+ path(argv[0])${incPath2}
+ ${incPath3}
+ library files: \$SDCC_HOME${libPath1}${dirch}<model>
+ path(argv[0])${libPath2}${dirch}<model>
+ ${libPath3}${dirch}<model>
+" >&5
+echo "${ECHO_T}
+sdcc ${VERSION} is now configured for
+
+ Build: ${build_alias}
+ Host: ${host_alias}
+ Source directory: ${srcdir}
+ C compiler: ${CC}
+ CFLAGS: ${CFLAGS}
+
+ ENABLED Ports:
+ avr ${enable_avr_port}
+ ds390 ${enable_ds390_port}
+ ds400 ${enable_ds400_port}
+ gbz80 ${enable_gbz80_port}
+ hc08 ${enable_hc08_port}
+ pic ${enable_pic_port}
+ pic16 ${enable_pic16_port}
+ xa51 ${enable_xa51_port}
+ z80 ${enable_z80_port}
+
+ Disable packihx: ${OPT_DISABLE_PACKIHX}
+ Disable ucsim: ${OPT_DISABLE_UCSIM}
+ Disable device lib: ${OPT_DISABLE_DEVICE_LIB}
+ Disable ucsim: ${OPT_DISABLE_UCSIM}
+ Enable documentation: ${OPT_ENABLE_DOC}
+ Enable libgc: ${OPT_ENABLE_LIBGC}
+
+ Install paths:
+ binary files: ${exec_prefix}
+ include files: ${datadir}/${include_dir_suffix}
+ library files: ${datadir}/${lib_dir_suffix}
+ documentation: ${docdir}
+
+ prefix: ${prefix}
+ datadir: ${datadir}
+
+ Search paths (incomplete, see manual for all search paths):
+ binary files: \$SDCC_HOME${binPath}
+ include files: ${incPath1}
+ path(argv[0])${incPath2}
+ ${incPath3}
+ library files: \$SDCC_HOME${libPath1}${dirch}<model>
+ path(argv[0])${libPath2}${dirch}<model>
+ ${libPath3}${dirch}<model>
+" >&6
# End of configure/configure.in
AC_PREREQ(2.54)
AC_INIT
-AC_CONFIG_SRCDIR([Makefile])
+AC_CONFIG_SRCDIR([Makefile.in])
AC_CONFIG_HEADER(sdccconf.h:sdccconf_in.h)
AC_PROG_AWK
AC_MSG_CHECKING(version of the package)
-if test -f .version; then
- VERSION=`cat .version`
+if test -f ${srcdir}/.version; then
+ VERSION=`cat ${srcdir}/.version`
elif test -f ../.version; then
VERSION=`cat ../.version`
else
AC_CHECK_PROG(AS, as, as, :)
AC_CHECK_PROG(CP, cp, cp, :)
-AC_CHECK_PROG(LYX, lyx, lyx, :)
-AC_CHECK_PROG(LATEX, latex, latex, :)
-AC_CHECK_PROG(LATEX2HTML, latex2html, latex2html, :)
-AC_CHECK_PROG(PDFLATEX, pdflatex, pdflatex, :)
-AC_CHECK_PROG(DVIPDF, dvipdf, dvipdf, :)
-
AC_DEFUN(SDCC_REQUIRE_PROG,
[if test "$1" = ":"; then
AC_MSG_ERROR([Cannot find required program $2.])
# Macro definitions
# ===========================================================================
-# DD_COPT macro checks if the compiler specified as the 1st parameter
+# adl_DD_COPT macro checks if the compiler specified as the 1st parameter
# supports option specified as the 2nd parameter
# For example: DD_CPORT(CXX, fPIC)
-AC_DEFUN(DD_COPT, [
+AC_DEFUN(adl_DD_COPT, [
AC_CACHE_CHECK(whether $$1 accepts -$2,sdcc_cv_$1$2,
cat >_test_.c <<EOF
#include <stdio.h>
#
# Examples:
#
-# AC_EXPAND(prefix, "/usr/local", expanded_prefix)
+# adl_EXPAND(prefix, "/usr/local", expanded_prefix)
-AC_DEFUN([AC_EXPAND], [
+AC_DEFUN([adl_EXPAND], [
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
ac_expand=[$]$1
dnl
AC_DEFUN([adl_NORMALIZE_PATH],
[case ":[$]$1:" in
-# change empty paths to '.'
+dnl change empty paths to '.'
::) $1='.' ;;
-# strip trailing slashes
+dnl strip trailing slashes
:*[[\\/]]:) $1=`echo "[$]$1" | sed 's,[[\\/]]*[$],,'` ;;
:*:) ;;
esac
-# squeze repeated slashes
+dnl squeze repeated slashes
case ifelse($2,,"[$]$1",$2) in
-# if the path contains any backslashes, turn slashes into backslashes
+dnl if the path contains any backslashes, turn slashes into backslashes
-# Bernhard Held 2003-04-06
-# This was the original line. It doesn't:
-# - convert the first slash
-# - replace a slash with a double-backslash
-# *\\*) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
- *\\*) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\\\\\,g' | sed 's,^[[\\/]],\\\\\\\\,'` ;;
+dnl Bernhard Held 2003-04-06
+dnl This was the original line. It does not:
+dnl - convert the first slash
+dnl - replace a slash with a double-backslash
+dnl *\\*) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+ *\\*) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\\\\\,g
+ s,^[[\\/]],\\\\\\\\,'` ;;
-# if the path contains slashes, also turn backslashes into slashes
+dnl if the path contains slashes, also turn backslashes into slashes
*) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1/,g'` ;;
esac])
dnl adl_RECURSIVE_EVAL(VALUE, RESULT)
dnl =================================
-dnl Interpolate the VALUE in loop until it doesn't change,
+dnl Interpolate the VALUE in loop until it does not change,
dnl and set the result to $RESULT.
-dnl WARNING: It's easy to get an infinite loop with some unsane input.
+dnl WARNING: It is easy to get an infinite loop with some unsane input.
AC_DEFUN([adl_RECURSIVE_EVAL],
[_lcl_receval="$1"
$2=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix"
done
echo "[$]_lcl_receval")`])
-
-# AC_NORMALIZE_DEFINE_UNQUOTED(var, DEFINE, REFERENCE_STRING)
-
-AC_DEFUN([AC_NORMALIZE_DEFINE_UNQUOTED], [
+dnl adl_NORMALIZE_DEFINE_UNQUOTED(var, DEFINE, REFERENCE_STRING)
+AC_DEFUN([adl_NORMALIZE_DEFINE_UNQUOTED], [
ac_ndu=[$]$1
adl_NORMALIZE_PATH([ac_ndu], [$]$3)
AC_DEFINE_UNQUOTED($2, "${ac_ndu}")
])
+dnl adl_NORMALIZE_PATH_MSG(input_string, var, dir_separator)
+dnl ========================================================
+dnl call adl_NORMALIZE_PATH and format it for the result message
+AC_DEFUN([adl_NORMALIZE_PATH_MSG], [
+dnl replace /./ by /
+$2=`echo "$1" | sed 's,/\./,/,g'`
+adl_NORMALIZE_PATH([$2], [$3])
+dnl replace \\ by \
+$2=`echo "[$]$2" | sed 's,\\\\\\\\,\\\\,g'`
+])
+
# Checking characteristics of compilers and other programs
# ===========================================================================
AC_SUBST(M_OR_MM)
# This is the first time when CFLAGS are set/modified!!
-DD_COPT(CC, ggdb)
+adl_DD_COPT(CC, ggdb)
if test "$sdcc_cv_CCggdb" = "yes"; then
CFLAGS="-ggdb ${CFLAGS}"
fi
-DD_COPT(CC, pipe)
+adl_DD_COPT(CC, pipe)
if test "$sdcc_cv_CCpipe" = "yes"; then
CFLAGS="-pipe $CFLAGS"
fi
# The variables in the header are replaced by AC_*DEFINE*()
# sdccconf_h_dir_separator contains a backslash.
AC_ARG_VAR(sdccconf_h_dir_separator, needed in sdccconf.h: either "/" (default) or "\\")
-if test "${sdccconf_h_dir_separator}" = ""; then
+if test "x${sdccconf_h_dir_separator}" = "x"; then
sdccconf_h_dir_separator="/"
fi
# prefix:
# default: "NONE", ${ac_default_prefix}: "/usr/local"
-AC_EXPAND(prefix, ac_default_prefix, expanded_prefix)
-AC_NORMALIZE_DEFINE_UNQUOTED(expanded_prefix, PREFIX, sdccconf_h_dir_separator)
+adl_EXPAND(prefix, ac_default_prefix, expanded_prefix)
+adl_NORMALIZE_DEFINE_UNQUOTED(expanded_prefix, PREFIX, sdccconf_h_dir_separator)
# exec_prefix:
# default: "${prefix}"
-AC_EXPAND(exec_prefix, expanded_prefix, expanded_exec_prefix)
-AC_NORMALIZE_DEFINE_UNQUOTED(expanded_exec_prefix, EXEC_PREFIX, sdccconf_h_dir_separator)
+adl_EXPAND(exec_prefix, expanded_prefix, expanded_exec_prefix)
+adl_NORMALIZE_DEFINE_UNQUOTED(expanded_exec_prefix, EXEC_PREFIX, sdccconf_h_dir_separator)
# bindir:
# default: "${exec_prefix}/bin"
-AC_EXPAND(bindir, "NONE", expanded_bindir)
-AC_NORMALIZE_DEFINE_UNQUOTED(expanded_bindir, BINDIR, sdccconf_h_dir_separator)
+adl_EXPAND(bindir, "NONE", expanded_bindir)
+adl_NORMALIZE_DEFINE_UNQUOTED(expanded_bindir, BINDIR, sdccconf_h_dir_separator)
# datadir:
# default: "${prefix}/share"
-AC_EXPAND(datadir, "NONE", expanded_datadir)
-AC_NORMALIZE_DEFINE_UNQUOTED(expanded_datadir, DATADIR, sdccconf_h_dir_separator)
+adl_EXPAND(datadir, "NONE", expanded_datadir)
+adl_NORMALIZE_DEFINE_UNQUOTED(expanded_datadir, DATADIR, sdccconf_h_dir_separator)
# include/lib suffix
norm_inc_dir_suffix=${include_dir_suffix}
sdcc_lib_name="SDCC_LIB"
AC_DEFINE_UNQUOTED(SDCC_LIB_NAME, "${sdcc_lib_name}")
+# Port selection helper
+# ===========================================================================
+# macro AC_DO_ENABLER()
+# $1 used to access enable_$1, e.g. enable-doc
+# $2 OPT_DISABLE_$2, normally uppercase of $1, e.g. DOC
+# $3 help string
+AC_DEFUN([AC_DO_ENABLER], [
+ AC_ARG_ENABLE($1, AC_HELP_STRING([--enable-$1], $3))
+
+ if test "[$]enable_$1" = "yes"; then
+ OPT_ENABLE_$2=1
+ else
+ OPT_ENABLE_$2=0
+ fi
+
+ AC_DEFINE_UNQUOTED(OPT_ENABLE_$2, [$]OPT_ENABLE_$2)
+ AC_SUBST(OPT_ENABLE_$2)
+])
+
+# macro AC_DO_DISABLER()
+# $1 used to access disable_$1, e.g. ucsim
+# $2 OPT_DISABLE_$2, normally uppercase of $1, e.g. UCSIM
+# $3 help string
+AC_DEFUN([AC_DO_DISABLER], [
+ AC_ARG_ENABLE($1, AC_HELP_STRING([--disable-$1], $3))
+
+ dnl the '-' in 'device-lib' needs special handling,
+ dnl because the variable is 'enable_device_lib'
+ arg1=`echo $1 | sed s/-/_/`
+
+ if test "`eval echo \\$enable_$arg1`" = "no"; then
+ OPT_DISABLE_$2=1
+ else
+ OPT_DISABLE_$2=0
+ fi
+
+ AC_DEFINE_UNQUOTED(OPT_DISABLE_$2, [$]OPT_DISABLE_$2)
+ AC_SUBST(OPT_DISABLE_$2)
+])
+
+# macro AC_DO_PORT($1, $2, $3, $4)
+# $1 used to access enable_$2_port, e.g. gbz80
+# $2 port name in ports.all and ports.build, e.g. z80
+# $3 OPT_DISABLE_$3, normally uppercase of $2, e.g. GBZ80
+# $4 help string
+AC_DEFUN([AC_DO_PORT], [
+ AC_ARG_ENABLE($1-port,
+ AC_HELP_STRING([--disable-$1-port], $4))
+
+ if test "[$]enable_$1_port" = "no"; then
+ OPT_DISABLE_$3=1
+ else
+ enable_$1_port="yes"
+ OPT_DISABLE_$3=0
+ fi
+
+ AC_DEFINE_UNQUOTED(OPT_DISABLE_$3, [$]OPT_DISABLE_$3)
+ AC_SUBST(OPT_DISABLE_$3)
+
+ echo $2 >>ports.all
+ if test [$]OPT_DISABLE_$3 = 0; then
+ echo $2 >>ports.build
+ fi
+])
+
# Now handle the port selection
# ===========================================================================
rm -f ports.all ports.build
-AC_ARG_ENABLE(mcs51-port,
- AC_HELP_STRING([--disable-mcs51-port],
- [Excludes the Intel mcs51 port]))
-echo mcs51 >>ports.all
-if test "$enable_mcs51_port" = "no"; then
- AC_DEFINE_UNQUOTED(OPT_DISABLE_MCS51, 1)
-else
- echo mcs51 >>ports.build
- AC_DEFINE_UNQUOTED(OPT_DISABLE_MCS51, 0)
+AC_DO_PORT(mcs51, mcs51, MCS51, [Excludes the Intel mcs51 port])
+AC_DO_PORT(gbz80, z80, GBZ80, [Excludes the Gameboy gbz80 port])
+AC_DO_PORT(z80, z80, Z80, [Excludes the z80 port])
+AC_DO_PORT(avr, avr, AVR, [Excludes the AVR port])
+AC_DO_PORT(ds390, ds390, DS390, [Excludes the DS390 port])
+AC_DEFINE_UNQUOTED(OPT_DISABLE_TININative, $OPT_DISABLE_DS390)
+AC_DO_PORT(ds400, ds400, DS400, [Excludes the DS400 port])
+AC_DO_PORT(pic, pic, PIC, [Excludes the PIC port])
+AC_DO_PORT(pic16, pic16, PIC16, [Excludes the PIC16 port])
+AC_DO_PORT(xa51, xa51, XA51, [Excludes the XA51 port])
+AC_DO_PORT(hc08, hc08, HC08, [Excludes the HC08 port])
+
+AC_DO_DISABLER(ucsim, UCSIM, [Disables configuring and building of ucsim])
+AC_DO_DISABLER([device-lib], DEVICE_LIB, [Disables building device libraries])
+AC_DO_DISABLER(packihx, PACKIHX, [Disables building packihx])
+AC_DO_DISABLER(sdcpp, SDCPP, [Disables building sdcpp])
+
+AC_DO_ENABLER(doc, DOC, [Enables building the documentation])
+if test $OPT_ENABLE_DOC = 1; then
+ AC_CHECK_PROG(LYX, lyx, lyx, :)
+ AC_CHECK_PROG(LATEX, latex, latex, :)
+ AC_CHECK_PROG(LATEX2HTML, latex2html, latex2html, :)
+ AC_CHECK_PROG(PDFLATEX, pdflatex, pdflatex, :)
+ AC_CHECK_PROG(DVIPDF, dvipdf, dvipdf, :)
+ AC_CHECK_PROG(DVIPS, dvips, dvips, :)
+ AC_CHECK_PROG(MAKEINDEX, makeindex, makeindex, :)
+
+ SDCC_REQUIRE_PROG($LYX, lyx)
+ SDCC_REQUIRE_PROG($LATEX, latex)
+ SDCC_REQUIRE_PROG($LATEX2HTML, latex2html)
+ SDCC_REQUIRE_PROG($PDFLATEX, pdflatex)
+ SDCC_REQUIRE_PROG($DVIPDF, dvipdf)
+ SDCC_REQUIRE_PROG($DVIPS, dvips)
+ SDCC_REQUIRE_PROG($MAKEINDEX, makeindex)
fi
-AC_ARG_ENABLE(gbz80-port,
- AC_HELP_STRING([--disable-gbz80-port],
- [Excludes the Gameboy gbz80 port]))
-echo z80 >>ports.all
-if test "$enable_gbz80_port" = "no"; then
- AC_DEFINE_UNQUOTED(OPT_DISABLE_GBZ80, 1)
-else
- echo z80 >>ports.build
- AC_DEFINE_UNQUOTED(OPT_DISABLE_GBZ80, 0)
+AC_DO_ENABLER(libgc, LIBGC, [Use the Bohem memory allocator. Lower runtime footprint.])
+if test $OPT_ENABLE_LIBGC = 1; then
+ AC_CHECK_LIB(gc, GC_malloc)
+ if test $ac_cv_lib_gc_GC_malloc = no; then
+ AC_MSG_ERROR([Cannot find library libgc with Bohem memory allocator.])
+ fi
fi
-AC_ARG_ENABLE(z80-port,
- AC_HELP_STRING([--disable-z80-port],
- [Excludes the z80 port]))
-echo z80 >>ports.all
-if test "$enable_z80_port" = "no"; then
- AC_DEFINE_UNQUOTED(OPT_DISABLE_Z80, 1)
-else
- echo z80 >>ports.build
- AC_DEFINE_UNQUOTED(OPT_DISABLE_Z80, 0)
-fi
+#remove duplicates
+uniq ports.all ports
+mv ports ports.all
+uniq ports.build ports
+mv ports ports.build
-AC_ARG_ENABLE(avr-port,
- AC_HELP_STRING([--disable-avr-port],
- [Excludes the AVR port]))
-echo avr >>ports.all
-if test "$enable_avr_port" = "no"; then
- AC_DEFINE_UNQUOTED(OPT_DISABLE_AVR, 1)
-else
- echo avr >>ports.build
- AC_DEFINE_UNQUOTED(OPT_DISABLE_AVR, 0)
-fi
+# Generating output files
+# ===========================================================================
+test $OPT_DISABLE_SDCPP = 0 && AC_CONFIG_SUBDIRS(support/cpp2)
+test $OPT_DISABLE_PACKIHX = 0 && AC_CONFIG_SUBDIRS(packihx)
+test $OPT_DISABLE_UCSIM = 0 && AC_CONFIG_SUBDIRS(sim/ucsim)
+test $OPT_ENABLE_DOC = 1 && AC_CONFIG_FILES([doc/Makefile])
-AC_ARG_ENABLE(ds390-port,
- AC_HELP_STRING([--disable-ds390-port],
- [Excludes the DS390 port]))
-echo ds390 >>ports.all
-if test "$enable_ds390_port" = "no"; then
- AC_DEFINE_UNQUOTED(OPT_DISABLE_DS390, 1)
- AC_DEFINE_UNQUOTED(OPT_DISABLE_TININative, 1)
-else
- echo ds390 >>ports.build
- AC_DEFINE_UNQUOTED(OPT_DISABLE_DS390, 0)
- AC_DEFINE_UNQUOTED(OPT_DISABLE_TININative, 0)
-fi
+test $OPT_DISABLE_AVR = 0 && AC_CONFIG_FILES([src/avr/Makefile])
-AC_ARG_ENABLE(ds400-port,
- AC_HELP_STRING([--disable-ds400-port],
- [Excludes the DS400 port]))
-echo ds400 >>ports.all
-if test "$enable_ds400_port" = "no"; then
- AC_DEFINE_UNQUOTED(OPT_DISABLE_DS400, 1)
-else
- echo ds400 >>ports.build
- AC_DEFINE_UNQUOTED(OPT_DISABLE_DS400, 0)
+if test $OPT_DISABLE_DS390 = 0; then
+ AC_CONFIG_FILES([src/ds390/Makefile])
+ test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_FILES([device/lib/ds390/Makefile])
fi
-AC_ARG_ENABLE(pic-port,
- AC_HELP_STRING([--disable-pic-port],
- [Excludes the PIC port]))
-echo pic >>ports.all
-if test "$enable_pic_port" = "no"; then
- AC_DEFINE_UNQUOTED(OPT_DISABLE_PIC, 1)
-else
- echo pic >>ports.build
- AC_DEFINE_UNQUOTED(OPT_DISABLE_PIC, 0)
+if test $OPT_DISABLE_DS400 = 0; then
+ AC_CONFIG_FILES([src/ds400/Makefile])
+ test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_FILES([device/lib/ds400/Makefile])
fi
-AC_ARG_ENABLE(pic16-port,
- AC_HELP_STRING([--disable-pic16-port],
- [Excludes the PIC port]))
-echo pic16 >>ports.all
-if test "$enable_pic16_port" = "no"; then
- AC_DEFINE_UNQUOTED(OPT_DISABLE_PIC16, 1)
-else
- echo pic16 >>ports.build
- AC_DEFINE_UNQUOTED(OPT_DISABLE_PIC16, 0)
+if test $OPT_DISABLE_HC08 = 0; then
+ AC_CONFIG_FILES([src/hc08/Makefile
+ as/hc08/Makefile])
+ test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_FILES([device/lib/hc08/Makefile])
fi
-AC_ARG_ENABLE(xa51-port,
- AC_HELP_STRING([--disable-xa51-port],
- [Excludes the XA51 port]))
-echo xa51 >>ports.all
-if test "$enable_xa51_port" = "no"; then
- AC_DEFINE_UNQUOTED(OPT_DISABLE_XA51, 1)
-else
- echo xa51 >>ports.build
- AC_DEFINE_UNQUOTED(OPT_DISABLE_XA51, 0)
+if test $OPT_DISABLE_MCS51 = 0; then
+ AC_CONFIG_FILES([src/mcs51/Makefile
+ as/mcs51/Makefile
+ debugger/mcs51/Makefile])
+ test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_FILES([device/lib/mcs51/Makefile
+ device/lib/small/Makefile
+ device/lib/medium/Makefile
+ device/lib/large/Makefile])
fi
-AC_ARG_ENABLE(hc08-port,
- AC_HELP_STRING([--disable-hc08-port],
- [Excludes the HC08 port]))
-echo hc08 >>ports.all
-if test "$enable_hc08_port" = "no"; then
- AC_DEFINE_UNQUOTED(OPT_DISABLE_HC08, 1)
-else
- echo hc08 >>ports.build
- AC_DEFINE_UNQUOTED(OPT_DISABLE_HC08, 0)
+if test $OPT_DISABLE_PIC = 0; then
+ AC_CONFIG_FILES(src/pic/Makefile)
+ test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_SUBDIRS(device/lib/pic)
fi
-
-AC_ARG_ENABLE(ucsim,
- AC_HELP_STRING([--disable-ucsim],
- [Disables configuring and building of ucsim]))
-OPT_ENABLE_UCSIM=$enable_ucsim
-AC_SUBST(OPT_ENABLE_UCSIM)
-
-AC_ARG_ENABLE(device-lib-build,
- AC_HELP_STRING([--disable-device-lib-build],
- [Disables automatically building device libraries]))
-OPT_ENABLE_DEVICE_LIB_BUILD=$enable_device_lib_build
-AC_SUBST(OPT_ENABLE_DEVICE_LIB_BUILD)
-
-AC_ARG_ENABLE(packihx,
- AC_HELP_STRING([--disable-packihx],
- [Disables building packihx]))
-OPT_ENABLE_PACKIHX=$enable_packihx
-AC_SUBST(OPT_ENABLE_PACKIHX)
-
-AC_ARG_ENABLE(libgc,
- AC_HELP_STRING([--enable-libgc],
- [Use the Bohem memory allocator. Lower runtime footprint.]))
-if test "$enable_libgc" = "yes"; then
- AC_CHECK_LIB(gc, GC_malloc)
- OPT_ENABLE_LIBGC=1
-else
- OPT_ENABLE_LIBGC=0
+if test $OPT_DISABLE_PIC16 = 0; then
+ AC_CONFIG_FILES(src/pic16/Makefile)
+ test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_SUBDIRS(device/lib/pic16)
fi
-AC_DEFINE_UNQUOTED(OPT_ENABLE_LIBGC, $OPT_ENABLE_LIBGC)
-#remove duplicates
-uniq ports.all ports
-mv ports ports.all
-uniq ports.build ports
-mv ports ports.build
+test $OPT_DISABLE_XA51 = 0 && AC_CONFIG_FILES([src/xa51/Makefile])
-# Generating output files
-# ===========================================================================
-AC_CONFIG_SUBDIRS(support/cpp2)
-AC_CONFIG_SUBDIRS(packihx)
-AC_CONFIG_SUBDIRS(sim/ucsim)
-AC_CONFIG_SUBDIRS(device/lib/pic16)
-AC_CONFIG_SUBDIRS(device/lib/pic)
+if test $OPT_DISABLE_Z80 = 0; then
+ AC_CONFIG_FILES([src/z80/Makefile
+ as/Makefile
+ as/z80/Makefile
+ link/Makefile
+ link/z80/Makefile])
+ test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_FILES([device/lib/z80/Makefile
+ device/lib/gbz80/Makefile])
+fi
+
+test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_FILES([device/lib/Makefile])
AC_CONFIG_FILES([main.mk:main_in.mk
src/Makefile
-as/mcs51/Makefile
-as/hc08/Makefile
device/include/Makefile
-device/lib/Makefile
-debugger/mcs51/Makefile
+support/librarian/Makefile
+support/makebin/Makefile
support/regression/Makefile
+support/valdiag/Makefile
+Makefile
Makefile.common:Makefile.common.in
])
AC_OUTPUT
+# I found no better place
+mkdir -p bin
+
+# Prepare result message
+# ======================
+
+# In the C-header we need \\ as dir-separator, but in the message only \
+dirch=${sdccconf_h_dir_separator}
+test ${dirch} = '\\' && dirch='\'
+
+# calc friendly strings
+adl_NORMALIZE_PATH_MSG(/${prefix2bin_dir}, [binPath], [$dirch])
+adl_NORMALIZE_PATH_MSG(/${prefix2data_dir}/${norm_inc_dir_suffix}, [incPath1], [$dirch])
+adl_NORMALIZE_PATH_MSG(/${bin2data_dir}/${norm_inc_dir_suffix}, [incPath2], [$dirch])
+adl_NORMALIZE_PATH_MSG(${expanded_datadir}/${norm_inc_dir_suffix}, [incPath3], [$dirch])
+adl_NORMALIZE_PATH_MSG(/${prefix2data_dir}/${norm_lib_dir_suffix}, [libPath1], [$dirch])
+adl_NORMALIZE_PATH_MSG(/${bin2data_dir}/${norm_lib_dir_suffix}, [libPath2], [$dirch])
+adl_NORMALIZE_PATH_MSG(${expanded_datadir}/${norm_lib_dir_suffix}, [libPath3], [$dirch])
+
+AC_MSG_RESULT([
+sdcc ${VERSION} is now configured for
+
+ Build: ${build_alias}
+ Host: ${host_alias}
+ Source directory: ${srcdir}
+ C compiler: ${CC}
+ CFLAGS: ${CFLAGS}
+
+ ENABLED Ports:
+ avr ${enable_avr_port}
+ ds390 ${enable_ds390_port}
+ ds400 ${enable_ds400_port}
+ gbz80 ${enable_gbz80_port}
+ hc08 ${enable_hc08_port}
+ pic ${enable_pic_port}
+ pic16 ${enable_pic16_port}
+ xa51 ${enable_xa51_port}
+ z80 ${enable_z80_port}
+
+ Disable packihx: ${OPT_DISABLE_PACKIHX}
+ Disable ucsim: ${OPT_DISABLE_UCSIM}
+ Disable device lib: ${OPT_DISABLE_DEVICE_LIB}
+ Disable ucsim: ${OPT_DISABLE_UCSIM}
+ Enable documentation: ${OPT_ENABLE_DOC}
+ Enable libgc: ${OPT_ENABLE_LIBGC}
+
+ Install paths:
+ binary files: ${exec_prefix}
+ include files: ${datadir}/${include_dir_suffix}
+ library files: ${datadir}/${lib_dir_suffix}
+ documentation: ${docdir}
+
+ prefix: ${prefix}
+ datadir: ${datadir}
+
+ Search paths (incomplete, see manual for all search paths):
+ binary files: \$SDCC_HOME${binPath}
+ include files: ${incPath1}
+ path(argv[[0]])${incPath2}
+ ${incPath3}
+ library files: \$SDCC_HOME${libPath1}${dirch}<model>
+ path(argv[[0]])${libPath2}${dirch}<model>
+ ${libPath3}${dirch}<model>
+])
# End of configure/configure.in
INSTALL = @INSTALL@
STRIP = @STRIP@
-PRJDIR = ../..
-SLIB = $(PRJDIR)/support/Util
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SLIB = $(top_builddir)support/Util
+SDCCLIB = $(top_builddir)src
+
+VPATH = @srcdir@
srcdir = @srcdir@
+
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
infodir = @infodir@
STD_INC = @sdcc_include_dir@
-CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(PRJDIR)/support -I$(SLIB)
+CPPFLAGS = @CPPFLAGS@ -I$(top_builddir) -I$(top_srcdir) -I$(srcdir)/$(SLIB)
CFLAGS = @CFLAGS@
M_OR_MM = @M_OR_MM@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
LIBDIRS =
-SLIBOBJS = NewAlloc.o
+OBJECTS = sdcdb.o symtab.o simi.o \
+ break.o cmd.o
+SLIBOBJS = NewAlloc.o SDCCerr.o
+SDCCOBJS = SDCCset.o SDCChasht.o
-OBJECTS = sdcdb.o symtab.o simi.o $(PRJDIR)/src/SDCCset.o \
- break.o cmd.o $(PRJDIR)/src/SDCChasht.o \
- $(PRJDIR)/support/Util/SDCCerr.o
SOURCES = $(patsubst %.o,%.c,$(OBJECTS))
+SLIBSOURCES = $(patsubst %.o,$(SLIB)/%.c,$(SLIBOBJS))
+SDCCSOURCES = $(patsubst %.o,$(SDCCLIB)/%.c,$(SDCCOBJS))
-TARGET = $(PRJDIR)/bin/sdcdb$(EXEEXT)
+TARGET = $(top_builddir)bin/sdcdb$(EXEEXT)
# Compiling entire program or any subproject
install: all installdirs
$(INSTALL) $(TARGET) $(DESTDIR)$(bindir)/sdcdb$(EXEEXT)
$(STRIP) $(DESTDIR)$(bindir)/sdcdb$(EXEEXT)
- cp $(PRJDIR)/debugger/mcs51/sdcdb.el $(DESTDIR)$(bindir)/sdcdb.el
- cp $(PRJDIR)/debugger/mcs51/sdcdbsrc.el $(DESTDIR)$(bindir)/sdcdbsrc.el
+ cp $(srcdir)/sdcdb.el $(DESTDIR)$(bindir)/sdcdb.el
+ cp $(srcdir)/sdcdbsrc.el $(DESTDIR)$(bindir)/sdcdbsrc.el
# Deleting all the installed files
# ---------------------
dep: Makefile.dep
-Makefile.dep: $(SOURCES) *.h $(PRJDIR)/*.h
- $(CPP) $(CPPFLAGS) $(M_OR_MM) $(SOURCES) >Makefile.dep
+Makefile.dep: $(SOURCES) $(SLIBSOURCES) $(SDCCSOURCES) $(srcdir)/*.h $(top_builddir)*.h $(top_srcdir)/*.h
+ $(CPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.c,$^) >Makefile.dep
-include Makefile.dep
-include clean.mk
+ifeq "$(findstring $(MAKECMDGOALS),uninstall installcheck installdirs checkconf \
+ clean distclean mostlyclean realclean)" ""
+ include Makefile.dep
+endif
+include $(srcdir)/clean.mk
# My rules
# --------
-$(TARGET): $(OBJECTS) $(SLIBOBJS)
- $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(SLIBOBJS) $(LIBDIRS) $(LIBS)
+$(TARGET): $(OBJECTS) $(SLIBOBJS) $(SDCCOBJS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(SLIBOBJS) $(SDCCOBJS) $(LIBDIRS) $(LIBS)
.c.o:
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
$(SLIBOBJS):%.o:$(SLIB)/%.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+$(SDCCOBJS):%.o:$(SDCCLIB)/%.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+
# Remaking configuration
# ----------------------
checkconf:
- @if [ -f $(PRJDIR)/devel ]; then\
- $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
+ @if [ -f $(top_builddir)devel ]; then\
+ $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
fi
# End of cpp/Makefile
# Deleting all files created by building the program
# --------------------------------------------------
-PRJDIR = ../..
-
clean:
rm -f *core *[%~] *.[oa]
rm -f .[a-z]*~
- rm -f $(PRJDIR)/bin/sdcdb$(EXEEXT) \
- $(PRJDIR)/support/Util/SDCCerr.o
+ rm -f $(top_builddir)bin/sdcdb$(EXEEXT)
# Deleting all files created by configuring or building the program
# -----------------------------------------------------------------
freshconf: Makefile
-Makefile: $(srcdir)/Makefile.in $(PRJDIR)/configure.in
- cd $(PRJDIR) && $(SHELL) ./config.status
+Makefile: $(srcdir)/Makefile.in $(top_srcdir)/configure.in
+ cd $(top_builddir) && $(SHELL) ./config.status
# End of conf.mk
sdcc -mds390 --model-large test390.c
clean:
- rm mon.ihx *.lst *.rel *.rst *.sym *.cdb *.map *.ihx *.lnk *.asm
+ rm -f mon.ihx *.lst *.rel *.rst *.sym *.cdb *.map *.ihx *.lnk *.asm
sim:
./s51 -t DS390F -Sout=test.lst test390.ihx
INSTALL = @INSTALL@
CP = @CP@
-PRJDIR = ..
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
infodir = @infodir@
+VPATH = @srcdir@
srcdir = @srcdir@
include_dir_suffix = @include_dir_suffix@
sdcc_includedir = $(DESTDIR)$(datadir)/$(include_dir_suffix)
-CPPFLAGS = @CPPFLAGS@ -I$(PRJDIR)
+CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)
# Compiling entire program or any subproject
# Compiling and installing everything and running test
# ----------------------------------------------------
install: all installdirs
- $(CP) -r asm *.h $(sdcc_includedir)
- if [ "`grep mcs51 ../../ports.build`" = mcs51 ]; then \
- $(CP) mcs51/*.h $(sdcc_includedir)/mcs51 ; \
+ $(CP) -r $(srcdir)/asm $(srcdir)/*.h $(sdcc_includedir)
+ if [ "`grep mcs51 $(top_builddir)ports.build`" = mcs51 ]; then \
+ $(CP) $(srcdir)/mcs51/*.h $(sdcc_includedir)/mcs51 ; \
fi
- if [ "`grep '^pic$$' ../../ports.build`" = pic ]; then \
- $(CP) pic/*.h pic/*.inc pic/*.txt $(sdcc_includedir)/pic ; \
+ if [ "`grep '^pic$$' $(top_builddir)ports.build`" = pic ]; then \
+ $(CP) $(srcdir)/pic/*.h $(sdcc_includedir)/pic ; \
+ $(CP) $(srcdir)/pic/pic14devices.txt $(sdcc_includedir)/pic ; \
fi
- if [ "`grep pic16 ../../ports.build`" = pic16 ]; then \
- $(CP) pic16/*.h $(sdcc_includedir)/pic16 ; \
+ if [ "`grep pic16 $(top_builddir)ports.build`" = pic16 ]; then \
+ $(CP) $(srcdir)/pic16/*.h $(sdcc_includedir)/pic16 ; \
fi
- if [ "`grep z80 ../../ports.build`" = z80 ]; then \
- $(CP) z80/*.h $(sdcc_includedir)/z80 ; \
+ if [ "`grep z80 $(top_builddir)ports.build`" = z80 ]; then \
+ $(CP) $(srcdir)/z80/*.h $(sdcc_includedir)/z80 ; \
fi
- if [ "`grep hc08 ../../ports.build`" = hc08 ]; then \
- $(CP) hc08/*.h $(sdcc_includedir)/hc08 ; \
+ if [ "`grep hc08 $(top_builddir)ports.build`" = hc08 ]; then \
+ $(CP) $(srcdir)/hc08/*.h $(sdcc_includedir)/hc08 ; \
fi
rm -rf `find $(sdcc_includedir) -type d -name '.svn'`
+ # some files in CVS are executable :-(
+ find $(sdcc_includedir) -type f -exec chmod 644 {} \;
# Deleting all the installed files
# $(CPP) $(CPPFLAGS) $(M_OR_MM) *.c >main.dep
#include Makefile.dep
-include clean.mk
+include $(srcdir)/clean.mk
# My rules
# --------
# Remaking configuration
# ----------------------
checkconf:
- @if [ -f $(PRJDIR)/devel ]; then\
- $(MAKE) -f $(srcdir)/conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" \
+ @if [ -f $(top_builddir)devel ]; then\
+ $(MAKE) -f $(srcdir)/conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" \
freshconf;\
fi
freshconf: Makefile
-Makefile: $(srcdir)/Makefile.in $(PRJDIR)/configure.in
- cd $(PRJDIR) && $(SHELL) ./config.status
+Makefile: $(srcdir)/Makefile.in $(top_srcdir)/configure.in
+ cd $(top_builddir) && $(SHELL) ./config.status
# End of conf.mk
CP_U = $(CP)
endif
-PRJDIR = ../..
-INCDIR = $(PRJDIR)/device/include
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+srcdir = @srcdir@
+INCDIR = $(top_srcdir)/device/include
ifndef PORTINCDIR
-PORTINCDIR = $(INCDIR)/mcs51
+PORTINCDIR = $(srcdir)/$(INCDIR)/mcs51
endif
-CC = $(PRJDIR)/bin/sdcc
-CPP = $(PRJDIR)/bin/sdcpp
+CC = $(top_builddir)bin/sdcc
+CPP = $(top_builddir)bin/sdcpp
prefix = @prefix@
exec_prefix = @exec_prefix@
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
infodir = @infodir@
-srcdir = @srcdir@
lib_dir_suffix = @lib_dir_suffix@
PORTDIR = $(BUILDDIR)/$(PORT)
endif
+OPT_DISABLE_AVR = @OPT_DISABLE_AVR@
+OPT_DISABLE_DS390 = @OPT_DISABLE_DS390@
+OPT_DISABLE_DS400 = @OPT_DISABLE_DS400@
+OPT_DISABLE_HC08 = @OPT_DISABLE_HC08@
+OPT_DISABLE_MCS51 = @OPT_DISABLE_MCS51@
+OPT_DISABLE_PIC = @OPT_DISABLE_PIC@
+OPT_DISABLE_PIC16 = @OPT_DISABLE_PIC16@
+OPT_DISABLE_XA51 = @OPT_DISABLE_XA51@
+OPT_DISABLE_Z80 = @OPT_DISABLE_Z80@
+
SOURCES = _atof.c _atoi.c _atol.c _autobaud.c _bp.c _schar2fs.c \
_decdptr.c _divsint.c _divslong.c _divuint.c \
_divulong.c _fs2schar.c _fs2sint.c _fs2slong.c \
OEXT = .rel
-include incl.mk
+include $(srcdir)/incl.mk
+
+ifeq ($(OPT_DISABLE_DS390), 0)
+TARGETS += model-ds390
+endif
+
+ifeq ($(OPT_DISABLE_DS400), 0)
+TARGETS += model-ds400
+endif
+
+ifeq ($(OPT_DISABLE_HC08), 0)
+TARGETS += model-hc08
+endif
+
+ifeq ($(OPT_DISABLE_MCS51), 0)
+TARGETS += models small-mcs51-stack-auto
+endif
+
+ifeq ($(OPT_DISABLE_PIC), 0)
+TARGETS += model-pic14
+endif
+
+ifeq ($(OPT_DISABLE_PIC16), 0)
+TARGETS += model-pic16
+endif
+
+ifeq ($(OPT_DISABLE_Z80), 0)
+TARGETS += model-z80 model-gbz80
+endif
+
# Compiling entire program or any subproject
# ------------------------------------------
-all: checkconf models small-mcs51-stack-auto model-ds390 model-ds400 model-z80 model-gbz80 model-hc08 model-pic16 model-pic14
+all: checkconf $(TARGETS)
objects: build-dir $(OBJECTS) port-specific-objects lib-files clean_intermediate
models:
- if [ "`grep mcs51 ../../ports.build`" = mcs51 ]; then \
+ if [ "`grep mcs51 $(top_builddir)ports.build`" = mcs51 ]; then \
for model in $(MODELS); do \
$(MAKE) MODELFLAGS="--model-$$model" PORT=$$model PORTINCDIR=$(INCDIR)/mcs51 objects; \
done \
fi
small-mcs51-stack-auto:
- if [ "`grep mcs51 ../../ports.build`" = mcs51 ]; then \
+ if [ "`grep mcs51 $(top_builddir)ports.build`" = mcs51 ]; then \
$(MAKE) MODELFLAGS="--model-small --stack-auto" PORT=small PORTDIR=$(BUILDDIR)/small-stack-auto PORTINCDIR=$(INCDIR)/mcs51 objects; \
fi
model-mcs51-stack-auto:
- if [ "`grep mcs51 ../../ports.build`" = mcs51 ]; then \
+ if [ "`grep mcs51 $(top_builddir)ports.build`" = mcs51 ]; then \
for model in $(MODELS); do \
$(MAKE) MODELFLAGS="--model-$$model --stack-auto" PORT=$$model PORTDIR=$(BUILDDIR)/$$model-stack-auto PORTINCDIR=$(INCDIR)/mcs51 objects; \
done \
fi
model-mcs51-xstack-auto:
- if [ "`grep mcs51 ../../ports.build`" = mcs51 ]; then \
+ if [ "`grep mcs51 $(top_builddir)ports.build`" = mcs51 ]; then \
for model in $(MODELS); do \
$(MAKE) MODELFLAGS="--model-$$model --stack-auto --xstack" PORT=$$model PORTDIR=$(BUILDDIR)/$$model-xstack-auto PORTINCDIR=$(INCDIR)/mcs51 objects; \
done \
fi
model-ds390:
- if [ "`grep ds390 ../../ports.build`" = ds390 ]; then \
+ if [ "`grep ds390 $(top_builddir)ports.build`" = ds390 ]; then \
$(MAKE) MODELFLAGS="-mds390" PORT=ds390 PORTINCDIR=$(INCDIR)/mcs51 objects; \
fi
model-ds400:
- if [ "`grep ds400 ../../ports.build`" = ds400 ]; then \
+ if [ "`grep ds400 $(top_builddir)ports.build`" = ds400 ]; then \
$(MAKE) MODELFLAGS="-mds400" PORT=ds400 PORTINCDIR=$(INCDIR)/mcs51 objects; \
fi
model-xa51:
- if [ "`grep xa51 ../../ports.build`" = xa51 ]; then \
+ if [ "`grep xa51 $(top_builddir)ports.build`" = xa51 ]; then \
$(MAKE) MODELFLAGS="-mxa51" PORT=xa51 objects-xa51; \
fi
cd $(PORTDIR); ls *$(OEXT) > lib$(PORT).lib
model-z80:
- if [ "`grep z80 ../../ports.build`" = z80 ]; then \
+ if [ "`grep z80 $(top_builddir)ports.build`" = z80 ]; then \
$(MAKE) MODELFLAGS="-mz80" PORT=z80 objects-z80 OEXT=.o; \
fi
model-gbz80:
- if [ "`grep z80 ../../ports.build`" = z80 ]; then \
+ if [ "`grep z80 $(top_builddir)ports.build`" = z80 ]; then \
$(MAKE) MODELFLAGS="-mgbz80" PORT=gbz80 objects-z80 OEXT=.o; \
fi
cd $(PORTDIR); ls *$(OEXT) > $(PORT).lib
model-hc08:
- if [ "`grep hc08 ../../ports.build`" = hc08 ]; then \
+ if [ "`grep hc08 $(top_builddir)ports.build`" = hc08 ]; then \
$(MAKE) MODELFLAGS="-mhc08" PORT=hc08 objects-hc08; \
fi
cd $(PORTDIR); ls *$(OEXT) > $(PORT).lib
model-pic16:
- if [ "`grep pic16 ../../ports.build`" = pic16 ]; then \
+ if [ "`grep pic16 $(top_builddir)ports.build`" = pic16 ]; then \
$(MAKE) MODELFLAGS="-mpic16" PORT=pic16 OEXT=.lib objects-pic16; \
fi
# yes, we do reuse the *-pic16 rules for pic14
model-pic14:
- if [ "`grep pic ../../ports.build | grep -v pic16`" = pic ]; then \
+ if [ "`grep pic $(top_builddir)ports.build | grep -v pic16`" = pic ]; then \
$(MAKE) MODELFLAGS="-mpic14" PORT=pic OEXT=.lib objects-pic16; \
fi
mkdir -p $(PORTDIR)
port-specific-objects:
- if [ -d $(PORT) ]; then \
+ if [ -f $(PORT)/Makefile ]; then \
$(MAKE) -C $(PORT); \
cp -f $(PORT)/*.lib $(PORT)/*$(OEXT) $(PORTDIR); \
fi
port-specific-objects-pic16:
- -if [ -d $(PORT) ]; then \
+ -if [ -f $(PORT)/Makefile ]; then \
mkdir -p $(PORT)/bin; \
$(MAKE) -C $(PORT); \
cp -f $(PORT)/bin/*.* $(PORTDIR); \
fi
lib-files:
- cp *.lib $(PORTDIR)
+ cp $(srcdir)/*.lib $(PORTDIR)
clean_intermediate:
rm -f $(PORTDIR)/*.lst $(PORTDIR)/*.sym
# ---------------------------------------------------
install: all installdirs
$(CP_U) -r $(BUILDDIR)/* $(sdcc_libdir)
- $(CP_U) -r $(MODELS) mcs51 ds390 ds400 gbz80 z80 hc08 pic pic16 *.c $(sdcc_libdir)/src
- for srcdir in $(MODELS) ds390 ds400 gbz80 z80 hc08 pic pic16; do \
- find $(sdcc_libdir)/src/$$srcdir -depth \
+ $(CP_U) -r $(MODELS) $(srcdir)/mcs51 $(srcdir)/ds390 $(srcdir)/ds400 \
+ $(srcdir)/gbz80 $(srcdir)/z80 $(srcdir)/hc08 \
+ $(srcdir)/pic $(srcdir)/pic16 $(srcdir)/*.c $(sdcc_libdir)/src
+ $(CP_U) -r $(MODELS) mcs51 ds390 ds400 gbz80 z80 hc08 $(sdcc_libdir)/src
+
+ for src in $(MODELS) ds390 ds400 gbz80 z80 hc08 pic pic16; do \
+ find $(sdcc_libdir)/src/$$src -depth \
\( -name '*.rel' -o -name '*.dump*' -o -name '*.sym' -o -name '*.o' -o -name '*.lib' -o \
- -name '*.lst' -o -name '*.asm' -o -name '.svn' -o -name 'build' -o -name 'bin' \) \
+ -name '*.lst' -o -name '*.asm' -o -name '.svn' -o -name 'build' -o -name 'bin' -o \
+ -name 'Makefile*' \) \
-exec rm -r {} \; ; \
done
find $(sdcc_libdir)/src/mcs51 -depth \
\( -name '*.rel' -o -name '*.dump*' -o -name '*.sym' -o -name '*.o' -o -name '*.lib' -o \
- -name '*.lst' -o -name '.svn' -o -name 'build' -o -name 'bin' \) \
+ -name '*.lst' -o -name '.svn' -o -name 'build' -o -name 'bin' -o \
+ -name 'Makefile*' \) \
-exec rm -r {} \;
# Deleting all the installed files
Makefile.dep: $(SOURCES) $(INCDIR)/*.h $(PORTINCDIR)/*.h
rm -f Makefile.dep
- for i in $(SOURCES); do \
+ for i in $(filter %.c,$^); do \
$(CPP) -std=c99 -M $(CPPFLAGS) $$i >$${i}.dep; \
cat $${i}.dep >>Makefile.dep; \
rm $${i}.dep; \
done
-include Makefile.dep
-include clean.mk
+ifeq "$(findstring $(MAKECMDGOALS),uninstall check installcheck installdirs checkconf \
+ clean distclean mostlyclean realclean)" ""
+ include Makefile.dep
+endif
+include $(srcdir)/clean.mk
# My rules
# --------
# Remaking configuration
# ----------------------
checkconf:
- @if [ -f $(PRJDIR)/devel ]; then\
- $(MAKE) -f $(srcdir)/conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" \
+ @if [ -f $(top_builddir)devel ]; then\
+ $(MAKE) -f $(srcdir)/conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" \
freshconf;\
fi
-include incl.mk
+CLEANALLPORTS = ds390 ds400 gbz80 hc08 large mcs51 medium pic pic16 small z80
+include $(srcdir)/incl.mk
# Deleting all files created by building the program
# --------------------------------------------------
rm -rf build
for model in $(MODELS); do \
if [ -d $$model ]; then \
- cd $$model && for name in *; do if [ -f $$name -a $$name != Makefile ]; then rm $$name; fi; done; \
+ cd $$model && for name in *; do if [ -f $$name -a $$name != Makefile -a $$name != Makefile.in ]; then rm $$name; fi; done; \
fi; \
done
- make -C mcs51 clean
- make -C ds390 clean
- make -C z80 clean
- make -C gbz80 clean
- make -C hc08 clean
- make -C pic16 clean
- make -C pic clean
+ for port in $(CLEANALLPORTS) ; do\
+ if [ -f $$port/Makefile ]; then\
+ $(MAKE) -C $$port clean ;\
+ fi\
+ done
+
# Deleting all files created by configuring or building the program
# -----------------------------------------------------------------
distclean: clean
rm -f Makefile *.dep
- rm -f ds390/*.dep
+ for port in $(CLEANALLPORTS) ; do\
+ if [ -f $$port/Makefile ]; then\
+ $(MAKE) -C $$port distclean ;\
+ fi\
+ done
# Like clean but some files may still exist
# -----------------------------------------
freshconf: Makefile
-Makefile: $(srcdir)/Makefile.in $(PRJDIR)/configure.in
- cd $(PRJDIR) && $(SHELL) ./config.status
+Makefile: $(srcdir)/Makefile.in $(top_srcdir)/configure.in
+ cd $(top_builddir) && $(SHELL) ./config.status
# End of conf.mk
+++ /dev/null
-CC = ../../../bin/sdcc
-
-#VERBOSE = --verbose
-
-OBJECTS = tinibios.rel memcpyx.rel lcd390.rel i2c390.rel rtc390.rel
-
-SOURCES = $(patsubst %.rel,%.c,$(OBJECTS))
-
-CPPFLAGS = -I../../include
-CFLAGS = -mds390 $(CPPFLAGS) $(VERBOSE)
-
-all: $(OBJECTS) libds390.lib
-
-clean:
- rm -f *.lst *.rel *.sym *.cdb *.asm \#* *~ *.rst *.hex
- rm -f *.ihx temp.lnk *.map *.lib
-
-superclean:
- make clean ; rm Makefile.dep
-
-libds390.lib: $(OBJECTS)
- rm -f $@; \
- for libfile in $(OBJECTS); do \
- echo $$libfile >>$@; \
- done;
-
-%.rel: %.c
- $(CC) -c $(CFLAGS) $<
-
-# Creating dependencies
-# ---------------------
-depend: Makefile.dep
-
-Makefile.dep: $(SOURCES)
- rm -f Makefile.dep
- for i in $(SOURCES); do \
- $(CC) -M $(CPPFLAGS) $$i >$${i}.dep; \
- cat $${i}.dep >>Makefile.dep; \
- rm $${i}.dep; \
- done
-
-include Makefile.dep
--- /dev/null
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+CC = ../../../bin/sdcc
+
+#VERBOSE = --verbose
+
+OBJECTS = tinibios.rel memcpyx.rel lcd390.rel i2c390.rel rtc390.rel
+
+SOURCES = $(patsubst %.rel,%.c,$(OBJECTS))
+
+CPPFLAGS = -I../../include
+CFLAGS = -mds390 $(CPPFLAGS) $(VERBOSE)
+
+all: $(OBJECTS) libds390.lib
+
+clean:
+ rm -f *.lst *.rel *.sym *.cdb *.asm \#* *~ *.rst *.hex
+ rm -f *.ihx temp.lnk *.map *.lib
+
+distclean: clean
+ rm -f Makefile Makefile.dep
+
+libds390.lib: $(OBJECTS)
+ rm -f $@; \
+ for libfile in $(OBJECTS); do \
+ echo $$libfile >>$@; \
+ done;
+
+%.rel: %.c
+ $(CC) -c $(CFLAGS) $<
+
+# Creating dependencies
+# ---------------------
+depend: Makefile.dep
+
+Makefile.dep: $(SOURCES)
+ rm -f Makefile.dep
+ for i in $^; do \
+ $(CC) -M $(CPPFLAGS) $$i >$${i}.dep; \
+ cat $${i}.dep >>Makefile.dep; \
+ rm $${i}.dep; \
+ done
+
+ifeq "$(findstring $(MAKECMDGOALS),clean distclean)" ""
+ include Makefile.dep
+endif
+++ /dev/null
-CC = ../../../bin/sdcc
-
-#VERBOSE = --verbose
-
-OBJECTS = tinibios.rel memcpyx.rel ds400rom.rel
-
-SOURCES = $(patsubst %.rel,%.c,$(OBJECTS))
-
-CPPFLAGS = -I../../include
-CFLAGS = -mds400 $(CPPFLAGS) $(VERBOSE)
-
-all: $(OBJECTS) libds400.lib
-
-clean:
- rm -f *.lst *.rel *.sym *.cdb *.asm \#* *~ *.rst *.hex
- rm -f *.ihx temp.lnk *.map *.lib
-
-superclean:
- make clean ; rm Makefile.dep
-
-libds400.lib: $(OBJECTS)
- rm -f $@; \
- for libfile in $(OBJECTS); do \
- echo $$libfile >>$@; \
- done;
-
-%.rel: %.c
- $(CC) -c $(CFLAGS) $<
-
-# Creating dependencies
-# ---------------------
-depend: Makefile.dep
-
-Makefile.dep: $(SOURCES)
- rm -f Makefile.dep
- for i in $(SOURCES); do \
- $(CC) -M $(CPPFLAGS) $$i >$${i}.dep; \
- cat $${i}.dep >>Makefile.dep; \
- rm $${i}.dep; \
- done
-
-include Makefile.dep
--- /dev/null
+CC = ../../../bin/sdcc
+
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+#VERBOSE = --verbose
+
+OBJECTS = tinibios.rel memcpyx.rel ds400rom.rel
+
+SOURCES = $(patsubst %.rel,%.c,$(OBJECTS))
+
+CPPFLAGS = -I../../include
+CFLAGS = -mds400 $(CPPFLAGS) $(VERBOSE)
+
+all: $(OBJECTS) libds400.lib
+
+clean:
+ rm -f *.lst *.rel *.sym *.cdb *.asm \#* *~ *.rst *.hex
+ rm -f *.ihx temp.lnk *.map *.lib
+
+distclean: clean
+ rm -f Makefile Makefile.dep
+
+libds400.lib: $(OBJECTS)
+ rm -f $@; \
+ for libfile in $(OBJECTS); do \
+ echo $$libfile >>$@; \
+ done;
+
+%.rel: %.c
+ $(CC) -c $(CFLAGS) $<
+
+# Creating dependencies
+# ---------------------
+depend: Makefile.dep
+
+Makefile.dep: $(SOURCES)
+ rm -f Makefile.dep
+ for i in $^; do \
+ $(CC) -M $(CPPFLAGS) $$i >$${i}.dep; \
+ cat $${i}.dep >>Makefile.dep; \
+ rm $${i}.dep; \
+ done
+
+ifeq "$(findstring $(MAKECMDGOALS),clean distclean)" ""
+ include Makefile.dep
+endif
+++ /dev/null
-# libc/z80 Makefile
-
-TOPDIR = ../../..
-
-SCC = $(TOPDIR)/bin/sdcc -mgbz80
-SAS = $(TOPDIR)/bin/as-gbz80
-
-OBJ = div.o mul.o putchar.o printf.o shift.o stubs.o crt0_rle.o heap.o fstubs.o
-
-LIB = gbz80.lib
-CC = $(SCC)
-AS = $(SAS)
-CFLAGS = -I../../include -I.
-
-all: $(LIB) crt0.o
-
-$(LIB): $(OBJ) Makefile _dummy
- rm -f $(LIB)
- for i in $(OBJ); do echo $$i >> $(LIB); done
-
-.c.o:
- $(CC) $(CFLAGS) -c $<
-
-_dummy:
-
-clean:
- rm -f *.o *.sym *.lst *~ $(CLEANSPEC) *.dump* *.asm *.lib
--- /dev/null
+# libc/z80 Makefile
+
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+TOPDIR = ../../..
+
+SCC = $(TOPDIR)/bin/sdcc -mgbz80
+SAS = $(TOPDIR)/bin/as-gbz80
+
+OBJ = div.o mul.o putchar.o printf.o shift.o stubs.o crt0_rle.o heap.o fstubs.o
+
+LIB = gbz80.lib
+CC = $(SCC)
+AS = $(SAS)
+CFLAGS = -I../../include -I.
+
+all: $(LIB) crt0.o
+
+$(LIB): $(OBJ) Makefile _dummy
+ rm -f $(LIB)
+ for i in $(OBJ); do echo $$i >> $(LIB); done
+
+.c.o:
+ $(CC) $(CFLAGS) -c $<
+
+_dummy:
+
+clean:
+ rm -f *.o *.sym *.lst *~ $(CLEANSPEC) *.dump* *.asm *.lib
+
+distclean: clean
+ rm -f Makefile
\ No newline at end of file
+++ /dev/null
-# libc/hc08 Makefile
-
-TOPDIR = ../../..
-
-SCC = $(TOPDIR)/bin/sdcc -mhc08
-SAS = $(TOPDIR)/bin/as6808
-
-OBJ = _ret.rel _divuint.rel _divulong.rel _mulint.rel _mullong.rel
-
-LIB = hc08.lib
-CC = $(SCC)
-AS = $(SAS)
-ASFLAGS = -plosgff
-
-CFLAGS = -I../../include -I.
-
-all: $(LIB)
-
-$(LIB): $(OBJ) Makefile _dummy
- rm -f $(LIB)
- for i in $(OBJ); do echo $$i >> $(LIB); done
-
-%.rel: %.c
- $(CC) $(CFLAGS) -c $<
-
-%.rel: %.asm
- $(AS) $(ASFLAGS) $@ $<
-
-_dummy:
-
-clean:
- rm -f *.rel *.sym *.lst *~ $(CLEANSPEC) *.dump* *.asm *.lib
--- /dev/null
+# libc/hc08 Makefile
+
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+TOPDIR = ../../..
+
+SCC = $(TOPDIR)/bin/sdcc -mhc08
+SAS = $(TOPDIR)/bin/as6808
+
+OBJ = _ret.rel _divuint.rel _divulong.rel _mulint.rel _mullong.rel
+
+LIB = hc08.lib
+CC = $(SCC)
+AS = $(SAS)
+ASFLAGS = -plosgff
+
+CFLAGS = -I../../include -I.
+
+all: $(LIB)
+
+$(LIB): $(OBJ) Makefile _dummy
+ rm -f $(LIB)
+ for i in $(OBJ); do echo $$i >> $(LIB); done
+
+%.rel: %.c
+ $(CC) $(CFLAGS) -c $<
+
+%.rel: %.asm
+ $(AS) $(ASFLAGS) $@ $<
+
+_dummy:
+
+clean:
+ rm -f *.rel *.sym *.lst *~ $(CLEANSPEC) *.dump* *.asm *.lib
+
+distclean: clean
+ rm -f Makefile
\ No newline at end of file
+++ /dev/null
-# Dummy Makefile to get around Subversion
-all:
- $(MAKE) -C ../mcs51 all
- cp ../mcs51/*.rel ../mcs51/*.lib .
- touch dummy.lib
- touch dummy.rel
-
-clean:
- rm *.rel *.lib
--- /dev/null
+all:
+ $(MAKE) -C ../mcs51 all
+ cp ../mcs51/*.rel ../mcs51/*.lib .
+ touch dummy.lib
+ touch dummy.rel
+
+clean:
+ rm -f *.rel *.lib
+
+distclean: clean
+ rm -f Makefile
\ No newline at end of file
+++ /dev/null
-
-TOPDIR = ../../..
-
-SAS = $(TOPDIR)/bin/asx8051
-SCC = $(TOPDIR)/bin/sdcc
-
-OBJ = crtstart.rel crtxinit.rel crtxclear.rel crtclear.rel crtxstack.rel \
- crtpagesfr.rel crtbank.rel
-
-LIB = mcs51.lib
-
-CC = $(SCC)
-AS = $(SAS)
-ASFLAGS = -plosgff
-
-CFLAGS = -I../../include -I.
-
-all: $(LIB)
-
-$(LIB): $(OBJ) Makefile
- rm -f $(LIB)
- for i in $(OBJ); do echo $$i >> $(LIB); done
-
-%.rel: %.c
- $(CC) $(CFLAGS) -c $<
-
-%.rel: %.asm
- $(AS) $(ASFLAGS) $<
-
-clean:
- rm -f *.rel *.sym *.lst *~ $(CLEANSPEC) *.dump* *.lib
--- /dev/null
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
+
+SAS = $(top_builddir)bin/asx8051
+SCC = $(top_builddir)bin/sdcc
+
+OBJ = crtstart.rel crtxinit.rel crtxclear.rel crtclear.rel crtxstack.rel \
+ crtpagesfr.rel crtbank.rel
+
+LIB = mcs51.lib
+
+CC = $(SCC)
+AS = $(SAS)
+ASFLAGS = -plosgff
+
+CFLAGS = -I$(top_srcdir)/include
+
+all: $(LIB)
+
+$(LIB): $(OBJ) Makefile
+ rm -f $(LIB)
+ for i in $(OBJ); do echo $$i >> $(LIB); done
+
+%.rel: %.c
+ $(CC) $(CFLAGS) -c $<
+
+%.rel: %.asm
+ @# TODO: asx8051 should place it's output in the current dir
+ test $(srcdir) == . || cp $< .
+ -$(AS) $(ASFLAGS) $(notdir $<)
+ test $(srcdir) == . || rm $(notdir $<)
+
+clean:
+ rm -f *.rel *.sym *.lst *~ $(CLEANSPEC) *.dump* *.lib
+
+distclean: clean
+ rm -r Makefile
\ No newline at end of file
+++ /dev/null
-# Dummy Makefile to get around Subversion
-all:
- $(MAKE) -C ../mcs51 all
- cp ../mcs51/*.rel ../mcs51/*.lib .
- touch dummy.lib
- touch dummy.rel
-
-clean:
- rm *.rel *.lib
--- /dev/null
+all:
+ $(MAKE) -C ../mcs51 all
+ cp ../mcs51/*.rel ../mcs51/*.lib .
+ touch dummy.lib
+ touch dummy.rel
+
+clean:
+ rm -f *.rel *.lib
+
+distclean: clean
+ rm -f Makefile
\ No newline at end of file
+++ /dev/null
-###########################################################
-### Makefile for the SDCC/PIC14 Library
-###
-### Copyright (C) 2005 by Raphael Neider <rneider@web.de>
-###
-### The library is currently maintained by
-### Raphael Neider <rneider@web.de>
-###
-### This file may be distributed under the terms of the the
-### GNU General Public License (GPL). See GPL for details.
-###
-### $Id$
-###
-
-topsrcdir = .
-
-include $(topsrcdir)/Makefile.common
-
-ifeq (:,$(findstring :,$(LD) $(AS) $(LIB)))
-
-.PHONY : all
-
-all % :
- @echo "gputils not found -- PIC14 library not built!"
-
-else
-
-SUBDIRS = libsdcc libdev
-builddir = build
-installdir = bin
-export installdir
-
-C_SRC = $(wildcard *.c)
-S_SRC = $(wildcard *.S)
-OBJS = $(C_SRC:.c=.o) $(S_SRC:.S=.o)
-
-.PHONY : all clean clean-intermediate install
-
-all : install
-
-install : recurse
-
-clean : recurse
- $(Q)-$(RMDIR) "$(topsrcdir)/$(builddir)";
-
-clean-intermediate : recurse
-
-include $(topsrcdir)/Makefile.rules
-
-endif
#################################################
### compiler switches
-ARCH ?= 877 # might be overwritten in libio
+# ARCH might be overwritten in libio
+ARCH ?= 877
CFLAGS ?=
CFLAGS += -mpic14 -p16f$(ARCH)
CFLAGS += --std-c99
-CFLAGS += -I. -I$(topsrcdir)/../../include/pic
+CFLAGS += -I. -I$(top_srcdir)/../../include/pic
#################################################
### optimization flags
### assembler switches
ASFLAGS ?=
ASFLAGS += -pp16f$(ARCH)
-ASFLAGS += -I$(topsrcdir)/../../include/pic
+ASFLAGS += -I$(top_srcdir)/../../include/pic
+ASFLAGS += -I. -I$(srcdir)
#################################################
### linker switches
#################################################
### programs to use
-CPP = $(topsrcdir)/../../../bin/sdcpp
-CC = $(topsrcdir)/../../../bin/sdcc
+CPP = $(top_builddir)../../../bin/sdcpp
+CC = $(top_builddir)../../../bin/sdcc
AS = @GPASM@
LD = @GPLINK@
LIB = @GPLIB@
--- /dev/null
+###########################################################
+### Makefile for the SDCC/PIC14 Library
+###
+### Copyright (C) 2005 by Raphael Neider <rneider@web.de>
+###
+### The library is currently maintained by
+### Raphael Neider <rneider@web.de>
+###
+### This file may be distributed under the terms of the the
+### GNU General Public License (GPL). See GPL for details.
+###
+### $Id$
+###
+
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+include $(top_builddir)Makefile.common
+
+ifeq (:,$(findstring :,$(LD) $(AS) $(LIB)))
+
+.PHONY : all
+
+all % :
+ @echo "gputils not found -- PIC14 library not built!"
+
+else
+
+SUBDIRS = libsdcc
+builddir = build
+installdir = bin
+export installdir
+
+C_SRC = $(notdir $(wildcard $(srcdir)/*.c))
+S_SRC = $(notdir $(wildcard $(srcdir)/*.S))
+OBJS = $(C_SRC:.c=.o) $(S_SRC:.S=.o)
+
+.PHONY : all clean clean-intermediate install
+
+all : install
+
+install : recurse
+
+clean : recurse
+ $(Q)-$(RMDIR) "$(top_builddir)$(builddir)"
+
+distclean: clean
+ rm -f Makefile
+
+clean-intermediate : recurse
+
+include $(top_srcdir)/Makefile.rules
+
+endif
###
# update dependencies
-$(topsrcdir)/$(builddir)/%.d : %.c
+$(top_builddir)$(builddir)/%.d : %.c
ifndef SILENT
- @echo "[ CPP ] ==> $(patsubst $(topsrcdir)/%,%,$@)";
+ @echo "[ CPP ] ==> $(patsubst $(top_builddir)%,%,$@)"
endif
- $(Q)$(CPP) $(CPPFLAGS) -o "$@" "$<";
+ $(Q)$(CPP) $(CPPFLAGS) -o "$@" "$<"
# assemble
-$(topsrcdir)/$(builddir)/%.o : %.S
+$(top_builddir)$(builddir)/%.o : %.S
ifndef SILENT
- @echo "[ AS ] ==> $(patsubst $(topsrcdir)/%,%,$@)";
+ @echo "[ AS ] ==> $(patsubst $(top_builddir)%,%,$@)"
endif
- $(Q)$(CPP) $(CPPFLAGS) -P -o "$*.Spp" "$<";
- $(Q)$(AS) $(ASFLAGS) -o "$@" -c "$*.Spp";
- $(Q)$(RM) "$*.Spp";
+ $(Q)$(CPP) $(CPPFLAGS) -P -o "$*.Spp" "$<"
+ $(Q)$(AS) $(ASFLAGS) -o "$@" -c "$*.Spp"
+ $(Q)$(RM) "$*.Spp"
# compile
-$(topsrcdir)/$(builddir)/%.o : %.c
+$(top_builddir)$(builddir)/%.o : %.c
ifndef SILENT
- @echo "[ CC ] ==> $(patsubst $(topsrcdir)/%,%,$@)";
+ @echo "[ CC ] ==> $(patsubst $(top_builddir)%,%,$@)"
endif
- $(Q)$(CC) $(CFLAGS) -o "$@" -c "$<";
+ $(Q)$(CC) $(CFLAGS) -o "$@" -c "$<"
# create library
ifneq (,$(strip $(LIB_O)))
%.lib : $(LIB_O)
ifndef SILENT
- @echo "[ LIB ] $(patsubst $(topsrcdir)/%,%,$@) <== $(patsubst $(topsrcdir)/$(builddir)/%,%,$^)";
+ @echo "[ LIB ] $(patsubst $(top_builddir)%,%,$@) <== $(patsubst $(top_builddir)$(builddir)/%,%,$^)"
endif
- $(Q)$(RM) "$@"; $(LIB) $(LIBFLAGS) "$@" $^;
+ $(Q)$(RM) "$@"; $(LIB) $(LIBFLAGS) "$@" $^
else
%.lib : recurse
ifndef SILENT
- @echo "[ LIB ] $(patsubst $(topsrcdir)/%,%,$@) <== **/*.o";
+ @echo "[ LIB ] $(patsubst $(top_builddir)%,%,$@) <== **/*.o"
endif
- $(Q)$(RM) "$@"; LIB_O=`find "$(topsrcdir)/$(builddir)" -name "*.o"`; [ "x$${LIB_O}" = "x" ] || $(LIB) $(LIBFLAGS) "$@" $${LIB_O};
+ $(Q)$(RM) "$@"; LIB_O=`find "$(top_builddir)$(builddir)" -name "*.o"`; [ "x$${LIB_O}" = "x" ] || $(LIB) $(LIBFLAGS) "$@" $${LIB_O}
endif
.PHONY : recurse force
recurse : force
$(Q)+for DIR in $(SUBDIRS) ; do \
$(GREP) "^$${ARCH}$$" "$${DIR}.ignore" &> /dev/null || ( \
- [ -d "$(topsrcdir)/$(builddir)/$${DIR}" ] || $(MKDIR) "$(topsrcdir)/$(builddir)/$${DIR}"; \
+ $(MKDIR) "$(top_builddir)$(builddir)/$${DIR}"; \
$(MAKE) -C "$${DIR}" builddir="$(builddir)/$${DIR}" $(MAKECMDGOALS); \
) || exit 1; \
done
### $Id$
###
-include $(topsrcdir)/Makefile.common
+include $(top_builddir)Makefile.common
SUBDIRS ?=
MKLIB ?=
# fallback: if builddir is not specified via the command line...
-builddir ?= build/$(patsubst $(shell cd $(topsrcdir); pwd)/%,%,$(CURDIR))
+builddir ?= build/$(patsubst $(shell cd $(top_srcdir); pwd)/%,%,$(CURDIR))
+
+C_SRC ?= $(notdir $(wildcard $(srcdir)/*.c))
+S_SRC ?= $(notdir $(wildcard $(srcdir)/*.S))
+OBJS ?= $(addprefix $(top_builddir)$(builddir)/,$(C_SRC:%.c=%.o) $(S_SRC:%.S=%.o))
-C_SRC ?= $(wildcard *.c)
-S_SRC ?= $(wildcard *.S)
-OBJS ?= $(addprefix $(topsrcdir)/$(builddir)/,$(C_SRC:.c=.o) $(S_SRC:.S=.o))
LIB_O ?= $(OBJS)
ifneq (,$(strip $(MKLIB)))
-LIB_LIB = $(topsrcdir)/$(builddir)/$(MKLIB)
+LIB_LIB = $(top_builddir)$(builddir)/$(MKLIB)
TARGETS ?= $(LIB_LIB)
else
LIB_LIB =
ifneq (,$(strip $(TARGETS)))
# usually install $(LIB_LIB) or $(OBJS), race condition in "[ -d x ] || mkdir x"
install : recurse $(OBJS) $(LIB_LIB)
- @[ -d "$(topsrcdir)/$(installdir)" ] || ( $(MKDIR) "$(topsrcdir)/$(installdir)" || true );
+ -@$(MKDIR) "$(top_builddir)$(installdir)"
ifndef SILENT
- @echo "[INSTALL] $(patsubst $(topsrcdir)/$(builddir)/%,%,$(TARGETS))";
+ @echo "[INSTALL] $(patsubst $(top_builddir)$(builddir)/%,%,$(TARGETS))"
endif
- $(Q)$(CP) $(TARGETS) "$(topsrcdir)/$(installdir)"
+ $(Q)$(CP) $(TARGETS) "$(top_builddir)$(installdir)"
else
# used in subdirs like libc/ctype whose files
# are contained in a parent's library
@-echo "dummy" > .dummy
$(Q)-$(RM) .dummy $(OBJS) $(LIB_LIB)
$(Q)-$(RM) $(TARGETS)
- $(Q)-$(RM) $(addprefix $(topsrcdir)/$(installdir)/,$(notdir $(TARGETS)))
- $(Q)-[ ! -d "$(topsrcdir)/$(builddir)" ] || $(RMDIR) "$(topsrcdir)/$(builddir)"
+ $(Q)-$(RM) $(addprefix $(top_builddir)$(installdir)/,$(notdir $(TARGETS)))
+ $(Q)-[ ! -d "$(top_builddir)$(builddir)" ] || $(RMDIR) "$(top_builddir)$(builddir)"
clean-intermediate : recurse
@-echo "dummy" > .dummy
$(Q)-$(RM) .dummy $(foreach suf,p lst hex cod sym,$(OBJS:.o=.$(suf)))
-include $(topsrcdir)/Makefile.rules
+include $(top_srcdir)/Makefile.rules
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
- ac_config_files="$ac_config_files Makefile.common libdev/Makefile"
+
+ ac_config_files="$ac_config_files Makefile Makefile.common libdev/Makefile libsdcc/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
do
case "$ac_config_target" in
# Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"Makefile.common" ) CONFIG_FILES="$CONFIG_FILES Makefile.common" ;;
"libdev/Makefile" ) CONFIG_FILES="$CONFIG_FILES libdev/Makefile" ;;
+ "libsdcc/Makefile" ) CONFIG_FILES="$CONFIG_FILES libsdcc/Makefile" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
-AC_CONFIG_FILES([Makefile.common
- libdev/Makefile])
+
+AC_CONFIG_FILES([Makefile
+ Makefile.common
+ libdev/Makefile
+ libsdcc/Makefile])
AC_OUTPUT
+++ /dev/null
-topsrcdir=..
-
-SUBDIRS =
-MKLIB = libsdcc.lib
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir=@top_builddir@
+top_srcdir=@top_srcdir@
+
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+SUBDIRS =
+MKLIB = libsdcc.lib
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-###########################################################
-### Makefile for the GNU PIC Library
-###
-### Copyright (C) 2005 by Raphael Neider <rneider@web.de>
-###
-### The GNU PIC Library was originally designed and
-### implemented by
-### Vangelis Rokas <vrokas@otenet.gr>
-###
-### It is currently maintained by
-### Raphael Neider <rneider@web.de>
-###
-### This file may be distributed under the terms of the the
-### GNU General Public License (GPL). See COPYING for details.
-###
-### $Id$
-###
-
-topsrcdir = .
-
-include $(topsrcdir)/Makefile.common
-
-ifeq (:,$(findstring :,$(LD) $(AS) $(LIB)))
-
-.PHONY : all
-
-all % :
- @echo "gputils not found -- PIC16 library not built!"
-
-else
-
-SUBDIRS = debug libc libdev libio libm libsdcc startup
-builddir = build
-installdir = bin
-export installdir
-
-C_SRC = $(wildcard *.c)
-S_SRC = $(wildcard *.S)
-OBJS = $(C_SRC:.c=.o) $(S_SRC:.S=.o)
-
-.PHONY : all clean clean-intermediate install
-
-all : install
-
-install : recurse
-
-clean : recurse
- $(Q)-$(RMDIR) "$(topsrcdir)/$(builddir)";
-
-clean-intermediate : recurse
-
-include $(topsrcdir)/Makefile.rules
-
-endif
CFLAGS ?=
CFLAGS += -mpic16 -p18f$(ARCH)
CFLAGS += --std-c99
-CFLAGS += -I. -I$(topsrcdir)/../../include/pic16
+CFLAGS += -I. -I$(top_srcdir)/../../include/pic16
#################################################
### optimization flags
### assembler switches
ASFLAGS ?=
ASFLAGS += -pp18f$(ARCH)
-ASFLAGS += -I$(topsrcdir)/../../include/pic16
+ASFLAGS += -I$(top_srcdir)/../../include/pic16
+ASFLAGS += -I$(srcdir)
#################################################
### linker switches
#################################################
### programs to use
-CPP = $(topsrcdir)/../../../bin/sdcpp
-CC = $(topsrcdir)/../../../bin/sdcc --asm=@GPASM@
+CPP = $(top_builddir)../../../bin/sdcpp
+CC = $(top_builddir)../../../bin/sdcc --asm=@GPASM@
AS = @GPASM@
LD = @GPLINK@
LIB = @GPLIB@
--- /dev/null
+###########################################################
+### Makefile for the GNU PIC Library
+###
+### Copyright (C) 2005 by Raphael Neider <rneider@web.de>
+###
+### The GNU PIC Library was originally designed and
+### implemented by
+### Vangelis Rokas <vrokas@otenet.gr>
+###
+### It is currently maintained by
+### Raphael Neider <rneider@web.de>
+###
+### This file may be distributed under the terms of the the
+### GNU General Public License (GPL). See COPYING for details.
+###
+### $Id$
+###
+
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+top_pic16builddir = .
+
+include $(top_pic16builddir)/Makefile.common
+
+ifeq (:,$(findstring :,$(LD) $(AS) $(LIB)))
+
+.PHONY : all
+
+all % :
+ @echo "gputils not found -- PIC16 library not built!"
+
+else
+
+SUBDIRS = debug libc libdev libio libm libsdcc startup
+builddir = build
+installdir = bin
+export installdir
+
+C_SRC = $(notdir $(wildcard $(srcdir)/*.c))
+S_SRC = $(notdir $(wildcard $(srcdir)/*.S))
+OBJS = $(C_SRC:.c=.o) $(S_SRC:.S=.o)
+
+.PHONY : all clean distclean clean-intermediate install
+
+all : install
+
+install : recurse
+
+clean : recurse
+ $(Q)-$(RMDIR) "$(top_pic16builddir)/$(builddir)"
+
+distclean: clean
+ $(RM) -f Makefile
+
+clean-intermediate : recurse
+
+include $(top_srcdir)/Makefile.rules
+
+endif
###
# update dependencies
-$(topsrcdir)/$(builddir)/%.d : %.c
+$(top_builddir)$(builddir)/%.d : %.c
ifndef SILENT
- @echo "[ CPP ] ==> $(patsubst $(topsrcdir)/%,%,$@)";
+ @echo "[ CPP ] ==> $(patsubst $(top_builddir)%,%,$@)"
endif
- $(Q)$(CPP) $(CPPFLAGS) -o "$@" "$<";
+ $(Q)$(CPP) $(CPPFLAGS) -o "$@" "$<"
# assemble
-$(topsrcdir)/$(builddir)/%.o : %.S
+$(top_builddir)$(builddir)/%.o : %.S
ifndef SILENT
- @echo "[ AS ] ==> $(patsubst $(topsrcdir)/%,%,$@)";
+ @echo "[ AS ] ==> $(patsubst $(top_builddir)%,%,$@)"
endif
- $(Q)$(AS) $(ASFLAGS) -o "$@" -c "$<";
+ $(Q)$(AS) $(ASFLAGS) -o "$@" -c "$<"
# compile
-$(topsrcdir)/$(builddir)/%.o : %.c
+$(top_builddir)$(builddir)/%.o : %.c
ifndef SILENT
- @echo "[ CC ] ==> $(patsubst $(topsrcdir)/%,%,$@)";
+ @echo "[ CC ] ==> $(patsubst $(top_builddir)%,%,$@)"
endif
- $(Q)$(CC) $(CFLAGS) -o "$@" -c "$<";
+ $(Q)$(CC) $(CFLAGS) -o "$@" -c "$<"
# create library
ifneq (,$(strip $(LIB_O)))
%.lib : $(LIB_O)
ifndef SILENT
- @echo "[ LIB ] $(patsubst $(topsrcdir)/%,%,$@) <== $(patsubst $(topsrcdir)/$(builddir)/%,%,$^)";
+ @echo "[ LIB ] $(patsubst $(top_builddir)%,%,$@) <== $(patsubst $(top_builddir)$(builddir)/%,%,$^)"
endif
- $(Q)$(RM) "$@"; $(LIB) $(LIBFLAGS) "$@" $^;
+ $(Q)$(RM) "$@"; $(LIB) $(LIBFLAGS) "$@" $^
else
%.lib : recurse
ifndef SILENT
- @echo "[ LIB ] $(patsubst $(topsrcdir)/%,%,$@) <== **/*.o";
+ @echo "[ LIB ] $(patsubst $(top_builddir)%,%,$@) <== **/*.o"
endif
- $(Q)$(RM) "$@"; LIB_O=`find "$(topsrcdir)/$(builddir)" -name "*.o"`; echo $${LIB_O}; [ "x$${LIB_O}" = "x" ] || $(LIB) $(LIBFLAGS) "$@" $${LIB_O};
+ $(Q)$(RM) "$@"; LIB_O=`find "$(top_builddir)$(builddir)" -name "*.o"`; echo $${LIB_O}; [ "x$${LIB_O}" = "x" ] || $(LIB) $(LIBFLAGS) "$@" $${LIB_O}
endif
.PHONY : recurse force
ifneq (,$(strip $(SUBDIRS)))
recurse : force
$(Q)+for DIR in $(SUBDIRS) ; do \
- $(GREP) "^$${ARCH}$$" "$${DIR}.ignore" &> /dev/null || ( \
- [ -d "$(topsrcdir)/$(builddir)/$${DIR}" ] || $(MKDIR) "$(topsrcdir)/$(builddir)/$${DIR}"; \
+ $(GREP) "^$${ARCH}$$" "$(srcdir)/$${DIR}.ignore" &> /dev/null || ( \
+ $(MKDIR) "$(top_builddir)$(builddir)/$${DIR}"; \
$(MAKE) -C "$${DIR}" builddir="$(builddir)/$${DIR}" $(MAKECMDGOALS); \
) || exit 1; \
done
### $Id$
###
-include $(topsrcdir)/Makefile.common
+include $(top_builddir)Makefile.common
SUBDIRS ?=
MKLIB ?=
# fallback: if builddir is not specified via the command line...
-builddir ?= build/$(patsubst $(shell cd $(topsrcdir); pwd)/%,%,$(CURDIR))
+builddir ?= build/$(patsubst $(shell cd $(top_builddir); pwd)/%,%,$(CURDIR))
-C_SRC ?= $(wildcard *.c)
-S_SRC ?= $(wildcard *.S)
-OBJS ?= $(addprefix $(topsrcdir)/$(builddir)/,$(C_SRC:.c=.o) $(S_SRC:.S=.o))
+C_SRC ?= $(notdir $(wildcard $(srcdir)/*.c))
+S_SRC ?= $(notdir $(wildcard $(srcdir)/*.S))
+OBJS ?= $(addprefix $(top_builddir)$(builddir)/,$(C_SRC:.c=.o) $(S_SRC:.S=.o))
LIB_O ?= $(OBJS)
ifneq (,$(strip $(MKLIB)))
-LIB_LIB = $(topsrcdir)/$(builddir)/$(MKLIB)
+LIB_LIB = $(top_builddir)$(builddir)/$(MKLIB)
TARGETS ?= $(LIB_LIB)
else
LIB_LIB =
ifneq (,$(strip $(TARGETS)))
# usually install $(LIB_LIB) or $(OBJS), race condition in "[ -d x ] || mkdir x"
install : recurse $(OBJS) $(LIB_LIB)
- @[ -d "$(topsrcdir)/$(installdir)" ] || ( $(MKDIR) "$(topsrcdir)/$(installdir)" || true );
+ @$(MKDIR) "$(top_builddir)$(installdir)"
ifndef SILENT
- @echo "[INSTALL] $(patsubst $(topsrcdir)/$(builddir)/%,%,$(TARGETS))";
+ @echo "[INSTALL] $(patsubst $(top_builddir)$(builddir)/%,%,$(TARGETS))";
endif
- $(Q)$(CP) $(TARGETS) "$(topsrcdir)/$(installdir)"
+ $(Q)$(CP) $(TARGETS) "$(top_builddir)$(installdir)"
else
# used in subdirs like libc/ctype whose files
# are contained in a parent's library
@-echo "dummy" > .dummy
$(Q)-$(RM) .dummy $(TARGETS)
@-echo "dummy" > .dummy
- $(Q)-$(RM) .dummy $(addprefix $(topsrcdir)/$(installdir)/,$(notdir $(TARGETS)))
- $(Q)-[ ! -d "$(topsrcdir)/$(builddir)" ] || $(RMDIR) "$(topsrcdir)/$(builddir)"
+ $(Q)-$(RM) .dummy $(addprefix $(top_builddir)$(installdir)/,$(notdir $(TARGETS)))
+ $(Q)-[ ! -d "$(top_builddir)$(builddir)" ] || $(RMDIR) "$(top_builddir)$(builddir)"
clean-intermediate : recurse
@-echo "dummy" > .dummy
$(Q)-$(RM) .dummy $(foreach suf,p lst hex cod sym,$(OBJS:.o=.$(suf)))
-include $(topsrcdir)/Makefile.rules
+include $(top_srcdir)/Makefile.rules
# Checks for library functions.
-$CP pics.all pics.build
+$CP "$srcdir"/pics.all pics.build
- ac_config_files="$ac_config_files Makefile.common"
+ ac_config_files="$ac_config_files Makefile Makefile.common debug/Makefile debug/gstack/Makefile libc/Makefile libc/ctype/Makefile libc/delay/Makefile libc/stdio/Makefile libc/stdlib/Makefile libc/string/Makefile libc/utils/Makefile libdev/Makefile libio/Makefile libio/adc/Makefile libio/i2c/Makefile libio/usart/Makefile libm/Makefile libsdcc/Makefile libsdcc/char/Makefile libsdcc/fixed16x16/Makefile libsdcc/float/Makefile libsdcc/gptr/Makefile libsdcc/int/Makefile libsdcc/long/Makefile libsdcc/lregs/Makefile startup/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
do
case "$ac_config_target" in
# Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"Makefile.common" ) CONFIG_FILES="$CONFIG_FILES Makefile.common" ;;
+ "debug/Makefile" ) CONFIG_FILES="$CONFIG_FILES debug/Makefile" ;;
+ "debug/gstack/Makefile" ) CONFIG_FILES="$CONFIG_FILES debug/gstack/Makefile" ;;
+ "libc/Makefile" ) CONFIG_FILES="$CONFIG_FILES libc/Makefile" ;;
+ "libc/ctype/Makefile" ) CONFIG_FILES="$CONFIG_FILES libc/ctype/Makefile" ;;
+ "libc/delay/Makefile" ) CONFIG_FILES="$CONFIG_FILES libc/delay/Makefile" ;;
+ "libc/stdio/Makefile" ) CONFIG_FILES="$CONFIG_FILES libc/stdio/Makefile" ;;
+ "libc/stdlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES libc/stdlib/Makefile" ;;
+ "libc/string/Makefile" ) CONFIG_FILES="$CONFIG_FILES libc/string/Makefile" ;;
+ "libc/utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES libc/utils/Makefile" ;;
+ "libdev/Makefile" ) CONFIG_FILES="$CONFIG_FILES libdev/Makefile" ;;
+ "libio/Makefile" ) CONFIG_FILES="$CONFIG_FILES libio/Makefile" ;;
+ "libio/adc/Makefile" ) CONFIG_FILES="$CONFIG_FILES libio/adc/Makefile" ;;
+ "libio/i2c/Makefile" ) CONFIG_FILES="$CONFIG_FILES libio/i2c/Makefile" ;;
+ "libio/usart/Makefile" ) CONFIG_FILES="$CONFIG_FILES libio/usart/Makefile" ;;
+ "libm/Makefile" ) CONFIG_FILES="$CONFIG_FILES libm/Makefile" ;;
+ "libsdcc/Makefile" ) CONFIG_FILES="$CONFIG_FILES libsdcc/Makefile" ;;
+ "libsdcc/char/Makefile" ) CONFIG_FILES="$CONFIG_FILES libsdcc/char/Makefile" ;;
+ "libsdcc/fixed16x16/Makefile" ) CONFIG_FILES="$CONFIG_FILES libsdcc/fixed16x16/Makefile" ;;
+ "libsdcc/float/Makefile" ) CONFIG_FILES="$CONFIG_FILES libsdcc/float/Makefile" ;;
+ "libsdcc/gptr/Makefile" ) CONFIG_FILES="$CONFIG_FILES libsdcc/gptr/Makefile" ;;
+ "libsdcc/int/Makefile" ) CONFIG_FILES="$CONFIG_FILES libsdcc/int/Makefile" ;;
+ "libsdcc/long/Makefile" ) CONFIG_FILES="$CONFIG_FILES libsdcc/long/Makefile" ;;
+ "libsdcc/lregs/Makefile" ) CONFIG_FILES="$CONFIG_FILES libsdcc/lregs/Makefile" ;;
+ "startup/Makefile" ) CONFIG_FILES="$CONFIG_FILES startup/Makefile" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
# Checks for library functions.
-$CP pics.all pics.build
+$CP "$srcdir"/pics.all pics.build
-AC_CONFIG_FILES([Makefile.common])
+AC_CONFIG_FILES([Makefile
+ Makefile.common
+ debug/Makefile
+ debug/gstack/Makefile
+ libc/Makefile
+ libc/ctype/Makefile
+ libc/delay/Makefile
+ libc/stdio/Makefile
+ libc/stdlib/Makefile
+ libc/string/Makefile
+ libc/utils/Makefile
+ libdev/Makefile
+ libio/Makefile
+ libio/adc/Makefile
+ libio/i2c/Makefile
+ libio/usart/Makefile
+ libm/Makefile
+ libsdcc/Makefile
+ libsdcc/char/Makefile
+ libsdcc/fixed16x16/Makefile
+ libsdcc/float/Makefile
+ libsdcc/gptr/Makefile
+ libsdcc/int/Makefile
+ libsdcc/long/Makefile
+ libsdcc/lregs/Makefile
+ startup/Makefile
+ ])
AC_OUTPUT
+++ /dev/null
-topsrcdir=..
-
-SUBDIRS = gstack
-MKLIB = libdebug.lib
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+SUBDIRS = gstack
+MKLIB = libdebug.lib
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-topsrcdir=../..
-
-SUBDIRS =
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+SUBDIRS =
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-topsrcdir=..
-
-SUBDIRS = ctype delay stdio stdlib string utils
-MKLIB = libc18f.lib
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+SUBDIRS = ctype delay stdio stdlib string utils
+MKLIB = libc18f.lib
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-topsrcdir=../..
-
-SUBDIRS =
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+SUBDIRS =
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-topsrcdir=../..
-
-SUBDIRS =
-TARGETS =
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+SUBDIRS =
+TARGETS =
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-topsrcdir=../..
-
-SUBDIRS =
-TARGETS =
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+SUBDIRS =
+TARGETS =
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-topsrcdir=../..
-
-SUBDIRS =
-TARGETS =
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+SUBDIRS =
+TARGETS =
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-topsrcdir=../..
-
-SUBDIRS =
-TARGETS =
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+SUBDIRS =
+TARGETS =
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-topsrcdir=../..
-
-SUBDIRS =
-TARGETS =
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+SUBDIRS =
+TARGETS =
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-###########################################################
-### Makefile for the GNU PIC Library
-###
-### Copyright (C) 2005 by Raphael Neider <rneider@web.de>
-###
-### The GNU PIC Library was originally designed and
-### implemented by
-### Vangelis Rokas <vrokas@otenet.gr>
-###
-### It is currently maintained by
-### Raphael Neider <rneider@web.de>
-###
-### This file may be distributed under the terms of the the
-### GNU General Public License (GPL). See COPYING for details.
-###
-### $Id$
-###
-
-topsrcdir=..
-
-SUBDIRS =
-MKLIB = device_libs
-C_FILES = $(wildcard *.c)
-TARGETS = $(OBJS:.o=.lib)
-
-# allow invoking make without arguments (otherwise
-# [...]/devicelibs would be the default target)
-suball : all
-
-.PHONY : $(topsrcdir)/$(builddir)/device_libs suball
-
-$(topsrcdir)/$(builddir)/device_libs :
- $(Q)+$(foreach dev,$(C_FILES:.c=),$(MAKE) $(topsrcdir)/$(builddir)/$(dev).lib LIB_O=$(topsrcdir)/$(builddir)/$(dev).o;)
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+###########################################################
+### Makefile for the GNU PIC Library
+###
+### Copyright (C) 2005 by Raphael Neider <rneider@web.de>
+###
+### The GNU PIC Library was originally designed and
+### implemented by
+### Vangelis Rokas <vrokas@otenet.gr>
+###
+### It is currently maintained by
+### Raphael Neider <rneider@web.de>
+###
+### This file may be distributed under the terms of the the
+### GNU General Public License (GPL). See COPYING for details.
+###
+### $Id$
+###
+
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+SUBDIRS =
+MKLIB = device_libs
+C_FILES = $(notdir $(wildcard $(srcdir)/*.c))
+TARGETS = $(OBJS:.o=.lib)
+
+# allow invoking make without arguments (otherwise
+# [...]/devicelibs would be the default target)
+suball : all
+
+.PHONY : $(top_builddir)$(builddir)/device_libs suball
+
+$(top_builddir)$(builddir)/device_libs :
+ $(Q)+$(foreach dev,$(C_FILES:.c=),$(MAKE) $(top_builddir)$(builddir)/$(dev).lib LIB_O=$(top_builddir)$(builddir)/$(dev).o;)
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-###########################################################
-### Makefile for the GNU PIC Library
-###
-### Copyright (C) 2005 by Raphael Neider <rneider@web.de>
-###
-### The GNU PIC Library was originally designed and
-### implemented by
-### Vangelis Rokas <vrokas@otenet.gr>
-###
-### It is currently maintained by
-### Raphael Neider <rneider@web.de>
-###
-### This file may be distributed under the terms of the the
-### GNU General Public License (GPL). See COPYING for details.
-###
-### $Id$
-###
-
-topsrcdir=..
-
-SUBDIRS = adc i2c usart
-
-ifeq ($(origin IO_ARCH),undefined)
-include $(topsrcdir)/Makefile.common
-
-.PHONY : all clean clean-intermediate install
-
-# I create $(builddir)/$${arch} right here in order to prevent
-# the sub-make's `builddir´ rules from aborting if another sub-make
-# already created the above directory (happened on Alpha).
-all clean clean-intermediate install :
- $(Q)+cat $(topsrcdir)/pics.build \
- | $(SED) -e "s,[ \t]*#.*$$,," \
- | $(GREP) -v "^[ \t]*$$" \
- | while read arch; do \
- [ "x$${arch}" = "x" ] \
- || ( [ -d "$(builddir)/$${arch}" ] || $(MKDIR) "$(builddir)/$${arch}"; \
- $(MAKE) MKLIB=libio18f$${arch}.lib builddir=$(builddir)/$${arch} ARCH=$${arch} IO_ARCH=$${arch} $(MAKECMDGOALS); ) \
- || exit 1; \
- done
-
-include $(topsrcdir)/Makefile.rules
-
-else
-
-include $(topsrcdir)/Makefile.subdir
-
-# prevent library to be build in $(SUBDIRS) as well
-unexport MKLIB
-
-endif
--- /dev/null
+###########################################################
+### Makefile for the GNU PIC Library
+###
+### Copyright (C) 2005 by Raphael Neider <rneider@web.de>
+###
+### The GNU PIC Library was originally designed and
+### implemented by
+### Vangelis Rokas <vrokas@otenet.gr>
+###
+### It is currently maintained by
+### Raphael Neider <rneider@web.de>
+###
+### This file may be distributed under the terms of the the
+### GNU General Public License (GPL). See COPYING for details.
+###
+### $Id$
+###
+
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+SUBDIRS = adc i2c usart
+
+ifeq ($(origin IO_ARCH),undefined)
+include $(top_builddir)Makefile.common
+
+.PHONY : all clean clean-intermediate install
+
+# I create $(builddir)/$${arch} right here in order to prevent
+# the sub-make's `builddir´ rules from aborting if another sub-make
+# already created the above directory (happened on Alpha).
+all clean clean-intermediate install :
+ $(Q)+cat $(top_builddir)pics.build \
+ | $(SED) -e "s,[ \t]*#.*$$,," \
+ | $(GREP) -v "^[ \t]*$$" \
+ | while read arch; do \
+ [ "x$${arch}" = "x" ] \
+ || ( $(MKDIR) "$(top_builddir)$(builddir)/$${arch}"; \
+ $(MAKE) MKLIB=libio18f$${arch}.lib builddir=$(builddir)/$${arch} ARCH=$${arch} IO_ARCH=$${arch} $(MAKECMDGOALS); ) \
+ || exit 1; \
+ done
+
+include $(top_srcdir)/Makefile.rules
+
+else
+
+include $(top_srcdir)/Makefile.subdir
+
+# prevent library to be build in $(SUBDIRS) as well
+unexport MKLIB
+
+endif
+++ /dev/null
-topsrcdir=../..
-
-SUBDIRS =
-TARGETS =
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+SUBDIRS =
+TARGETS =
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-topsrcdir=../..
-
-SUBDIRS =
-TARGETS =
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+SUBDIRS =
+TARGETS =
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-topsrcdir=../..
-
-SUBDIRS =
-TARGETS =
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+SUBDIRS =
+TARGETS =
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-topsrcdir=..
-
-SUBDIRS =
-MKLIB = libm18f.lib
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+SUBDIRS =
+MKLIB = libm18f.lib
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-topsrcdir=..
-
-SUBDIRS = char fixed16x16 float gptr int long
- # lregs
-MKLIB = libsdcc.lib
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+SUBDIRS = char fixed16x16 float gptr int long
+ # lregs
+MKLIB = libsdcc.lib
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-topsrcdir=../..
-
-SUBDIRS =
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+SUBDIRS =
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-topsrcdir=../..
-
-SUBDIRS =
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+SUBDIRS =
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-topsrcdir=../..
-
-SUBDIRS =
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+SUBDIRS =
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-topsrcdir=../..
-
-SUBDIRS =
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+SUBDIRS =
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-topsrcdir=../..
-
-SUBDIRS =
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+SUBDIRS =
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-topsrcdir=../..
-
-SUBDIRS =
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+SUBDIRS =
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-topsrcdir=../..
-
-SUBDIRS =
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+SUBDIRS =
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-topsrcdir=..
-
-SUBDIRS =
-TARGETS = $(OBJS)
-
-include $(topsrcdir)/Makefile.subdir
--- /dev/null
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+SUBDIRS =
+TARGETS = $(OBJS)
+
+include $(top_srcdir)/Makefile.subdir
+++ /dev/null
-# Dummy Makefile to get around Subversion
-all:
- $(MAKE) -C ../mcs51 all
- cp ../mcs51/*.rel ../mcs51/*.lib .
- touch dummy.lib
- touch dummy.rel
-
-clean:
- rm *.rel *.lib
--- /dev/null
+all:
+ $(MAKE) -C ../mcs51 all
+ cp ../mcs51/*.rel ../mcs51/*.lib .
+ touch dummy.lib
+ touch dummy.rel
+
+clean:
+ rm -f *.rel *.lib
+
+distclean: clean
+ rm -f Makefile
\ No newline at end of file
+++ /dev/null
-# libc/z80 Makefile
-
-TOPDIR = ../../..
-
-SCC = $(TOPDIR)/bin/sdcc -mz80
-SAS = $(TOPDIR)/bin/as-z80
-
-OBJ = div.o mul.o putchar.o shift.o stubs.o crt0_rle.o heap.o fstubs.o
-
-LIB = z80.lib
-CC = $(SCC)
-AS = $(SAS)
-ASFLAGS = -plosgff
-
-CFLAGS = -I../../include -I.
-
-all: $(LIB) crt0.o
-
-$(LIB): $(OBJ) Makefile _dummy
- rm -f $(LIB)
- for i in $(OBJ); do echo $$i >> $(LIB); done
-
-.c.o:
- $(CC) $(CFLAGS) -c $<
-
-.s.o:
- $(AS) $(ASFLAGS) $@ $<
-
-_dummy:
-
-clean:
- rm -f *.o *.sym *.lst *~ $(CLEANSPEC) *.dump* *.asm *.lib
--- /dev/null
+# libc/z80 Makefile
+
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+TOPDIR = ../../..
+
+SCC = $(TOPDIR)/bin/sdcc -mz80
+SAS = $(TOPDIR)/bin/as-z80
+
+OBJ = div.o mul.o putchar.o shift.o stubs.o crt0_rle.o heap.o fstubs.o
+
+LIB = z80.lib
+CC = $(SCC)
+AS = $(SAS)
+ASFLAGS = -plosgff
+
+CFLAGS = -I../../include -I.
+
+all: $(LIB) crt0.o
+
+$(LIB): $(OBJ) Makefile _dummy
+ rm -f $(LIB)
+ for i in $(OBJ); do echo $$i >> $(LIB); done
+
+.c.o:
+ $(CC) $(CFLAGS) -c $<
+
+.s.o:
+ $(AS) $(ASFLAGS) $@ $<
+
+_dummy:
+
+clean:
+ rm -f *.o *.sym *.lst *~ $(CLEANSPEC) *.dump* *.asm *.lib
+
+distclean: clean
+ rm -f Makefile
\ No newline at end of file
+++ /dev/null
-include ../Makefile.common
-
-ifdef $(LYX_SYSDIR)
- LYXFLAGS += -sysdir $(LYX_SYSDIR)
-endif
-
-MANUAL = sdccman
-TSS = test_suite_spec
-CDB = cdbfileformat
-
-SOURCES = $(MANUAL).lyx $(TSS).lyx $(CDB).lyx
-
-TXT = $(SOURCES:.lyx=.txt)
-PDF = $(SOURCES:.lyx=.pdf)
-TEX = $(SOURCES:.lyx=.tex)
-HTML_DIR = $(SOURCES:.lyx=.html)
-HTML_INDEX = $(SOURCES:.lyx=.html/index.html)
-
-all: $(TXT) $(PDF) $(HTML_INDEX)
-
-install:
- $(INSTALL) -d $(DESTDIR)$(docdir)
- cp -rf *.txt z80 avr $(DESTDIR)$(docdir)
- if [ -f $(MANUAL).html/index.html ]; then cp -rf $(MANUAL).html $(DESTDIR)$(docdir); fi
- if [ -f $(TSS).html/index.html ]; then cp -rf $(TSS).html $(DESTDIR)$(docdir); fi
- if [ -f $(CDB).html/index.html ]; then cp -rf $(CDB).html $(DESTDIR)$(docdir); fi
- if [ -f $(MANUAL).pdf ]; then cp -rf $(MANUAL).pdf $(DESTDIR)$(docdir); fi
- if [ -f $(TSS).pdf ]; then cp -rf $(TSS).pdf $(DESTDIR)$(docdir); fi
- if [ -f $(CDB).pdf ]; then cp -rf $(CDB).pdf $(DESTDIR)$(docdir); fi
- rm -rf `find $(DESTDIR)$(docdir) -name .svn -type d`
- rm -f $(DESTDIR)$(docdir)/*/WARNINGS $(DESTDIR)$(docdir)/*/*.pl $(DESTDIR)$(docdir)/*/images.*
-
-uninstall:
- rm -rf $(DESTDIR)$(docdir)
-
-$(MANUAL).html/index.html: $(MANUAL).tex $(MANUAL).ind
- rm -rf $(MANUAL).html
- mkdir -p `dirname $@`
- # fixes latex2html problems with two consecutive dashes for long-options: --stack-auto
- # fixes latex2html problems with \tabularnewline
- mv $< `basename $< .tex`.orig.tex
- sed 's,-\\/-,-\\/-\\/-,g' < `basename $< .tex`.orig.tex | \
- sed 's,\\tabularnewline$$,\\\\,g' > $<
- -latex2html -show_section_numbers -split 5 -local_icons -dir $(MANUAL).html `basename $<`
- mv `basename $< .tex`.orig.tex $<
- rm -f $(MANUAL).html/WARNINGS $(MANUAL).html/labels.pl
-
-$(TSS).html/index.html: $(TSS).tex
- rm -rf `dirname $@`
- mkdir -p `dirname $@`
- # fixes latex2html problems with two consecutive dashes for long-options: --stack-auto
- # fixes latex2html problems with \tabularnewline
- mv $< `basename $< .tex`.orig.tex
- sed 's,-\\/-,-\\/-\\/-,g' < `basename $< .tex`.orig.tex | \
- sed 's,\\tabularnewline$$,\\\\,g' > $<
- -latex2html -split 0 -local_icons -dir $(TSS).html `basename $<`
- mv `basename $< .tex`.orig.tex $<
- rm -f $(TSS).html/WARNINGS $(TSS).html/labels.pl
-
-$(CDB).html/index.html: $(CDB).tex
- rm -rf `dirname $@`
- mkdir -p `dirname $@`
- # fixes latex2html problems with two consecutive dashes for long-options: --stack-auto
- # fixes latex2html problems with \tabularnewline
- mv $< `basename $< .tex`.orig.tex
- sed 's,-\\/-,-\\/-\\/-,g' < `basename $< .tex`.orig.tex | \
- sed 's,\\tabularnewline$$,\\\\,g' > $<
- -latex2html -show_section_numbers -split 0 -local_icons -dir $(CDB).html `basename $<`
- mv `basename $< .tex`.orig.tex $<
- rm -f $(CDB).html/WARNINGS $(CDB).html/labels.pl
-
-%.txt: %.lyx
- lyx -e text $(LYXFLAGS) $<
-
-%.pdf: %.tex
- @echo "### Create pdf from tex: $< -> $@"
- pdflatex $*
- -makeindex $*
- pdflatex $*
- pdflatex $*
- pdfopt $*.pdf tmp.pdf
- rm $*.pdf
- mv tmp.pdf $*.pdf
-
-#%.ps: %.pdf
-# dvips $*
-
-%.dvi: %.tex
- latex $<
-
-%.tex: %.lyx
- lyx -e latex $< $(LYXFLAGS)
-
-#%.ind: %.dvi
-# latex $*
-# -makeindex $*
-## -makeindex -s l2hidx.ist $*
- #latex $*
-# latex $*
-
-#%.glo: %.dvi
-# # the glossary, not implemented yet
-# # makeindex -s l2hglo.ist -o $@ $<
-
-archive: all
- rm -rf sdcc-doc sdcc-doc.tar.bz2
- mkdir sdcc-doc
- rsync -rCt avr z80 *.pdf *.txt sdcc-doc
-
- for doc in $(MANUAL) $(TSS) $(CDB); do \
- rsync -Rt $$doc.html/*.html $$doc.html/*.png $$doc.html/*.css sdcc-doc/; \
- done
-
- mkdir sdcc-doc/as
- rsync -rCt ../as/doc/* sdcc-doc/as/
-
- mkdir sdcc-doc/ucsim
- cd ../sim/ucsim/doc; rsync *.html *.jpg *.gif *.fig ../../../doc/sdcc-doc/ucsim/
-
- tar -c sdcc-doc | bzip2 -9 > sdcc-doc.tar.bz2
-
-include clean.mk
--- /dev/null
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+LYX = @LYX@
+LATEX = @LATEX@
+LATEX2HTML = @LATEX2HTML@
+PDFLATEX = @PDFLATEX@
+DVIPDF = @DVIPDF@
+DVIPS = @DVIPS@
+MAKEINDEX = @MAKEINDEX@
+
+include ../Makefile.common
+
+MANUAL = sdccman
+TSS = test_suite_spec
+CDB = cdbfileformat
+
+all: $(MANUAL).pdf $(MANUAL).html/index.html $(MANUAL).txt \
+ $(TSS).pdf $(TSS).html/index.html $(TSS).txt \
+ $(CDB).pdf $(CDB).html/index.html $(CDB).txt
+
+install:
+ $(INSTALL) -d $(DESTDIR)$(docdir)
+ cp -rf $(srcdir)/*.txt $(srcdir)/z80 $(srcdir)/avr $(DESTDIR)$(docdir)
+ cp -rf *.txt $(DESTDIR)$(docdir)
+ if [ -f $(MANUAL).html/index.html ]; then cp -rf $(MANUAL).html $(DESTDIR)$(docdir); fi
+ if [ -f $(TSS).html/index.html ]; then cp -rf $(TSS).html $(DESTDIR)$(docdir); fi
+ if [ -f $(CDB).html/index.html ]; then cp -rf $(CDB).html $(DESTDIR)$(docdir); fi
+ if [ -f $(MANUAL).pdf ]; then cp -rf $(MANUAL).pdf $(DESTDIR)$(docdir); fi
+ if [ -f $(TSS).pdf ]; then cp -rf $(TSS).pdf $(DESTDIR)$(docdir); fi
+ if [ -f $(CDB).pdf ]; then cp -rf $(CDB).pdf $(DESTDIR)$(docdir); fi
+ rm -rf `find $(DESTDIR)$(docdir) -name .svn -type d`
+ rm -f $(DESTDIR)$(docdir)/*/WARNINGS $(DESTDIR)$(docdir)/*/*.pl $(DESTDIR)$(docdir)/*/images.*
+
+uninstall:
+ rm -rf $(DESTDIR)$(docdir)
+
+$(MANUAL).html/index.html: $(MANUAL).tex $(MANUAL).ind ;#$(MANUAL).glo
+ mkdir -p $(dir $@)
+ @# fixes $(LATEX2HTML) problems with two consecutive dashes for long-options: --stack-auto
+ @# fixes $(LATEX2HTML) problems with \tabularnewline
+ mv $< $(basename $<).orig.tex
+ sed -e 's,-\\/-,-\\/-\\/-,g' \
+ -e 's,\\tabularnewline$$,\\\\,g' < $(basename $<).orig.tex > $<
+ touch $< -r $(basename $<).orig.tex # avoid warning that *.tex is newer than *.aux
+ -$(LATEX2HTML) -split 5 -show_section_numbers -local_icons -info "" -dir $(MANUAL).html $(MANUAL)
+ mv $(basename $<).orig.tex $<
+
+$(TSS).html/index.html: $(TSS).tex
+ mkdir -p $(dir $@)
+ @# fixes $(LATEX2HTML) problems with two consecutive dashes for long-options: --stack-auto
+ @# fixes $(LATEX2HTML) problems with \tabularnewline
+ mv $< $(basename $<).orig.tex
+ sed -e 's,-\\/-,-\\/-\\/-,g' \
+ -e 's,\\tabularnewline$$,\\\\,g' < $(basename $<).orig.tex > $<
+ touch $< -r $(basename $<).orig.tex # avoid warning that *.tex is newer than *.aux
+ -$(LATEX2HTML) -split 0 -local_icons -info "" -dir $(TSS).html $(TSS)
+ mv $(basename $<).orig.tex $<
+
+$(CDB).html/index.html: $(CDB).tex
+ mkdir -p $(dir $@)
+ @# fixes $(LATEX2HTML) problems with two consecutive dashes for long-options: --stack-auto
+ @# fixes $(LATEX2HTML) problems with \tabularnewline
+ mv $< $(basename $<).orig.tex
+ sed -e 's,-\\/-,-\\/-\\/-,g' \
+ -e 's,\\tabularnewline$$,\\\\,g' < $(basename $<).orig.tex > $<
+ touch $< -r $(basename $<).orig.tex # avoid warning that *.tex is newer than *.aux
+ -$(LATEX2HTML) -split 0 -show_section_numbers -local_icons -info "" -dir $(CDB).html $(CDB)
+ mv $(basename $<).orig.tex $<
+
+%.txt: %.lyx
+ @# $(LYX) will export the file in the directory of the $(LYX) file
+ @# if VPATH is used the $(LYX) file is copied first
+ if [ "$(srcdir)" != "." ]; then \
+ cp $< . ; \
+ $(LYX) -e text $(notdir $<) ; \
+ rm $(notdir $<) ; \
+ else \
+ $(LYX) -e text $< ; \
+ fi
+
+%.pdf: %.tex %.dvi %.ind
+ $(DVIPDF) $*
+# pdflatex creates documents for acrobat reader >= 5.0
+# which $(PDFLATEX) > /dev/null && $(PDFLATEX) $* || $(DVIPDF) $*
+
+%.ps: %.pdf
+ $(DVIPS) $*
+
+%.dvi: %.tex
+ $(LATEX) $<
+ @# rerun to in include aux
+ $(LATEX) $<
+
+%.tex: %.lyx
+ if [ "$(srcdir)" != "." ] ; then \
+ cp $< . ; \
+ $(LYX) -e latex $(notdir $<) ; \
+ rm $(notdir $<) ; \
+ else \
+ $(LYX) -e latex $< ; \
+ fi
+
+%.ind: %.dvi
+ $(LATEX) $*
+ # is there an index?
+ if [ -f $*.idx ] ; then \
+ $(MAKEINDEX) $*; \
+ $(LATEX) $*; \
+ $(LATEX) $*; \
+ fi
+# -$(MAKEINDEX) -s l2hidx.ist $*; \
+
+%.glo: %.dvi
+ # the glossary, not implemented yet
+ # $(MAKEINDEX) -s l2hglo.ist -o $@ $<
+
+archive: all
+ rm -rf sdcc-doc sdcc-doc.tar.bz2
+ mkdir sdcc-doc
+ rsync -rCt avr z80 *.pdf *.txt $(srcdir)/*.txt sdcc-doc
+
+ for doc in $(MANUAL) $(TSS) $(CDB); do \
+ rsync -Rt $$doc.html/*.html $$doc.html/*.png $$doc.html/*.css sdcc-doc/; \
+ done
+
+ mkdir sdcc-doc/as
+ rsync -rCt $(top_srcdir)/as/doc/* sdcc-doc/as/
+
+ mkdir sdcc-doc/ucsim
+ cd $(top_srcdir)/sim/ucsim/doc; rsync *.html *.jpg *.gif *.fig ../../../doc/sdcc-doc/ucsim/
+
+ tar -c sdcc-doc | bzip2 -9 > sdcc-doc.tar.bz2
+
+include $(srcdir)/clean.mk
clean:
-# The directories are still in Subversion, so don't delete them
-# rm -rf $(MANUAL).html $(TSS).html
- rm -rf $(MANUAL).html/* $(TSS).html/* $(CDB).html
+ rm -rf $(MANUAL).html $(TSS).html $(CDB).html
rm -rf $(MANUAL).txt $(TSS).txt $(CDB).txt \
*.pdf *.tex *.aux *.dvi *.idx *.ilg *.out\
*.ind *.log *.toc *~ \#* *.ps */*.css */*.pl *.gif core *.glo
# Deleting all files created by configuring or building the program
# -----------------------------------------------------------------
distclean: clean
+ rm -f Makefile
# Like clean but some files may still exist
# -----------------------------------------
/
\end_inset
--disable-device-lib-build Disables automatically building device libraries
+-disable-device-lib Disables automatically building device libraries
\layout List
\labelwidthstring 00.00.0000
/
\end_inset
+-enable-doc Build pdf, html and txt files from the lyx sources
+\layout List
+\labelwidthstring 00.00.0000
+
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
-enable-libgc Use the Bohem memory allocator.
Lower runtime footprint.
\layout Standard
/
\end_inset
--disable-device-lib-build
+-disable-device-lib
\backslash
\newline
and execute it.
A windows typical installer will guide you through the installation process.
+\layout Subsection
+
+VPATH
+\begin_inset LatexCommand \index{VPATH}
+
+\end_inset
+
+ feature
+\layout Standard
+
+SDCC supports the VPATH feature provided by configure and make.
+ It allows to separate the source and build trees.
+ Here's an example:
+\layout Standard
+
+
+\family typewriter
+cd ~\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+# cd $HOME
+\layout Standard
+
+
+\family typewriter
+tar -xzf sdcc.src.tar.gz\SpecialChar ~
+# extract source to directory sdcc
+\layout Standard
+
+
+\family typewriter
+mkdir sdcc.build\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+# put output in sdcc.build
+\layout Standard
+
+
+\family typewriter
+cd sdcc.build
+\layout Standard
+
+
+\family typewriter
+../sdcc/configure\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+# configure is doing all the magic!
+\layout Standard
+
+
+\family typewriter
+make
+\layout Standard
+\noindent
+That's it!
+\series bold
+configure
+\series default
+ will create the directory tree will all the necessary Makefiles in ~/sdcc.build.
+ It automagically computes the variables srcdir, top_srcdir and top_buildir
+ for each directory.
+ After running
+\series bold
+make
+\series default
+ the generated files will be in ~/sdcc.build, while the source files stay
+ in ~/sdcc.
+\newline
+This is not only usefull for building different binaries, e.g.
+ when cross compiling.
+ It also gives you a much better overview in the source tree when all the
+ generated files are not scattered between the source files.
+ And the best thing is: if you want to change a file you can leave the original
+ file untouched in the source directory.
+ Simply copy it to the build directory, edit it, enter `make clean`, `rm
+ Makefile.dep` and `make`.
+
+\series bold
+make
+\series default
+ will do the rest for you!
\layout Section
Building the Documentation
\layout Standard
-If the necessary tools (LyX, LaTeX, LaTeX2HTML) are installed it is as easy
- as changing into the doc directory and typing
+Add -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-enable-doc to the configure arguments to build the documentation together
+ with all the other stuff.
+ You will need several tools (LyX, LaTeX, LaTeX2HTML, pdflatex, dvipdf,
+ dvips and makeindex) to get the job done.
+ Another possibility is to change to the doc directory and to type
\family sans
\series bold
\end_inset
- as editor this is straightforward.
+ as editor is straightforward.
Prebuilt documentation in html and pdf format is available from
\begin_inset LatexCommand \url{http://sdcc.sf.net/snap.php}
+++ /dev/null
-PRJDIR = ..
-
-include $(PRJDIR)/Makefile.common
-
-PORTS = z80 gbz80
-
-all:
- $(MAKE) -C z80 _link-z80 _link-gbz80 E=$(E) BUILDDIR=../../bin/
-
-install: all
- $(INSTALL) $(PRJDIR)/bin/link-z80$(EXEEXT) `echo $(DESTDIR)$(bindir)/link-z80$(EXEEXT)|sed '$(transform)'`
- $(STRIP) `echo $(DESTDIR)$(bindir)/link-z80$(EXEEXT)|sed '$(transform)'`
- $(INSTALL) $(PRJDIR)/bin/link-gbz80$(EXEEXT) `echo $(DESTDIR)$(bindir)/link-gbz80$(EXEEXT)|sed '$(transform)'`
- $(STRIP) `echo $(DESTDIR)$(bindir)/link-gbz80$(EXEEXT)|sed '$(transform)'`
-
-uninstall:
- cd $(DESTDIR)$(bindir); rm -f link-z80$(EXEEXT) link-gbz80$(EXEEXT)
-
-include clean.mk
--- /dev/null
+VPATH = @srcdir@
+srcdir = @srcdir@
+top_builddir = @top_builddir@
+
+include $(top_builddir)Makefile.common
+
+PORTS = z80 gbz80
+
+all:
+ $(MAKE) -C z80 _link-z80 _link-gbz80 E=$(E) BUILDDIR=../../bin/
+
+install: all
+ $(INSTALL) $(top_builddir)bin/link-z80$(EXEEXT) `echo $(DESTDIR)$(bindir)/link-z80$(EXEEXT)|sed '$(transform)'`
+ $(STRIP) `echo $(DESTDIR)$(bindir)/link-z80$(EXEEXT)|sed '$(transform)'`
+ $(INSTALL) $(top_builddir)bin/link-gbz80$(EXEEXT) `echo $(DESTDIR)$(bindir)/link-gbz80$(EXEEXT)|sed '$(transform)'`
+ $(STRIP) `echo $(DESTDIR)$(bindir)/link-gbz80$(EXEEXT)|sed '$(transform)'`
+
+uninstall:
+ cd $(DESTDIR)$(bindir); rm -f link-z80$(EXEEXT) link-gbz80$(EXEEXT)
+
+include $(srcdir)/clean.mk
clean:
- $(MAKE) -C z80 -f clean.mk clean
+ $(MAKE) -C z80 clean
distclean: clean
+ $(MAKE) -C z80 distclean
+ rm -f Makefile
-#
-#
-#
+VPATH = @srcdir@
+srcdir = @srcdir@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
-VERSION = @VERSION@
-VERSIONHI = @VERSIONHI@
-VERSIONLO = @VERSIONLO@
-VERSIONP = @VERSIONP@
+include $(top_builddir)Makefile.common
-SHELL = /bin/sh
-CC = @CC@
-CPP = @CPP@
-INSTALL = @INSTALL@
+OBJDIR = obj/$(EXT)
-PRJDIR = ../..
+SLIBSRC = NewAlloc.c
-EXEEXT = @EXEEXT@
+SRC = lkarea.c lkdata.c lkeval.c lkhead.c lkihx.c lklex.c \
+ lklibr.c lklist.c lkmain.c lkrloc.c lks19.c lksym.c \
+ lkgb.c lkgg.c
-srcdir = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-bindir = @bindir@
-libdir = @libdir@
-datadir = @datadir@
-includedir = @includedir@
-mandir = @mandir@
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-infodir = @infodir@
+OBJS = $(SRC:%.c=$(OBJDIR)/%.o)
+SLIBOBJS = $(SLIBSRC:%.c=$(OBJDIR)/%.o)
-SLIB =$(PRJDIR)/support/Util
+BINS = $(BUILDDIR)link$(EXT)$(EXEEXT)
-CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(PRJDIR)/as/z80 -I$(SLIB)
-CFLAGS = @CFLAGS@ -Wall -DINDEXLIB -DMLH_MAP -DUNIX -DSDK -DSDK_VERSION_STRING="\"3.0.0\"" -DTARGET_STRING="\"gbz80\"" -funsigned-char
-M_OR_MM = @M_OR_MM@
-LDFLAGS = @LDFLAGS@ -lm
+CFLAGS += $(CPPFLAGS) $(OPTS) -DINDEXLIB -DMLH_MAP -DUNIX -DSDK
+CFLAGS += -funsigned-char -DUNIX
+CFLAGS += -I$(top_builddir)as/$(PORT) -I$(SLIB)
-SLIBOBJS = NewAlloc.o
+LDFLAGS += -lm $(EXTRALIBS)
-LKOBJECTS = lkarea.o lkdata.o lkeval.o lkhead.o lkihx.o lklex.o \
- lklibr.o lklist.o lkmain.o lkrloc.o lks19.o lksym.o \
- lkgb.o lkgg.o
-LKSOURCES = $(patsubst %.o,%.c,$(LKOBJECTS))
+all: $(BINS)
-LKZ80 = $(PRJDIR)/bin/link-z80$(EXEEXT)
+$(BINS): $(OBJDIR) $(OBJS) $(SLIBOBJS)
+ $(CC) -g -o $(BINS) $(OBJS) $(SLIBOBJS) $(LDFLAGS)
-# Compiling entire program or any subproject
-# ------------------------------------------
-all: checkconf $(LKZ80)
+$(OBJDIR):
+ mkdir -p $(OBJDIR)
-$(LKZ80): $(SLIBOBJS) $(LKOBJECTS)
- $(CC) $(CFLAGS) -o $@ $(SLIBOBJS) $(LKOBJECTS) $(LDFLAGS)
+$(OBJDIR)/%.o: %.c
+ $(CC) -c $(CFLAGS) -o $@ $<
-# Compiling and installing everything and runing test
-# ---------------------------------------------------
-install: all installdirs
- $(INSTALL) $(LKZ80) $(DESTDIR)$(bindir)/link-z80$(EXEEXT)
+$(OBJDIR)/%.o: $(SLIB)/%.c
+ $(CC) -c $(CFLAGS) -o $@ $<
-# Deleting all the installed files
-# --------------------------------
-uninstall:
- rm -f $(DESTDIR)$(bindir)/link-z80$(EXEEXT)
+_link-z80:
+ $(MAKE) EXT=-z80$(E) PORT=z80
+_link-gbz80:
+ $(MAKE) EXT=-gbz80$(E) OPTS=-DGAMEBOY PORT=z80
-# Performing self-test
-# --------------------
-check:
-
-
-# Performing installation test
-# ----------------------------
-installcheck:
-
-
-# Creating installation directories
-# ---------------------------------
-installdirs:
- $(INSTALL) -d $(DESTDIR)$(bindir)
-
-
-# Creating dependencies
-# ---------------------
-dep: Makefile.dep
-
-Makefile.dep: $(LKSOURCES) *.h $(PRJDIR)/*.h
- $(CPP) $(CPPFLAGS) $(M_OR_MM) $(LKSOURCES) >Makefile.dep
-
-include Makefile.dep
-include clean.mk
-
-# My rules
-# --------
-.c.o:
- $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
-
-$(SLIBOBJS):%.o:$(SLIB)/%.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
-
-# Remaking configuration
-# ----------------------
-checkconf:
- @if [ -f $(PRJDIR)/devel ]; then\
- $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
- fi
-
-# End of Makefile
+include $(srcdir)/clean.mk
# Deleting all files created by building the program
# --------------------------------------------------
-PRJDIR = ../..
-include $(PRJDIR)/Makefile.common
+include $(top_builddir)Makefile.common
clean:
rm -f *core *[%~] *.[oa]
rm -f .[a-z]*~
- rm -f $(PRJDIR)/bin/link-z80$(EXEEXT) link-z80$(EXEEXT) \
- $(PRJDIR)/bin/link-gbz80$(EXEEXT) link-gbz80$(EXEEXT)
+ rm -f $(top_builddir)bin/link-z80$(EXEEXT) link-z80$(EXEEXT) \
+ $(top_builddir)bin/link-gbz80$(EXEEXT) link-gbz80$(EXEEXT)
rm -f *.dep
rm -rf obj
# Deleting all files created by configuring or building the program
# -----------------------------------------------------------------
distclean: clean
-
+ rm -f Makefile
# Like clean but some files may still exist
# -----------------------------------------
clean:
rm -f *core *[%~] *.[oa]
rm -f .[a-z]*~
- rm -f $(PRJDIR)/link-z80 link-z80
+ rm -f $(top_builddir)bin/link-z80 link-z80
# Deleting all files created by configuring or building the program
# $(CPP) $(CPPFLAGS) $(M_OR_MM) *.c >main.dep
#include main.dep
-include clean.mk
+include $(srcdir)/clean.mk
# My rules
# --------
PRJDIR = ..
+VPATH = @srcdir@
+srcdir = @srcdir@
+top_builddir = @top_builddir@
-include $(PRJDIR)/Makefile.common
+include $(PRJDIR)/$(top_builddir)Makefile.common
CFLAGS += -Wall
SOURCES = $(patsubst %.o,%.c,$(OBJECTS))
-TARGET = $(PRJDIR)/bin/packihx$(EXEEXT)
+TARGET = $(PRJDIR)/$(top_builddir)bin/packihx$(EXEEXT)
all: $(TARGET)
checkconf:
-include clean.mk
+include $(srcdir)/clean.mk
-PRJDIR = ..
-
clean:
rm -f *core *[%~] *.[oa] *.output
rm -f .[a-z]*~ \#*
- rm -f $(PRJDIR)/bin/packihx$(EXEEXT)
+ rm -f $(top_builddir)bin/packihx$(EXEEXT)
distclean realclean: clean
rm -f config.* Makefile
+++ /dev/null
-#
-# uCsim Makefile
-#
-# (c) Drotos Daniel, Talker Bt. 1997,99
-#
-
-STARTYEAR = 1997
-
-SHELL = /bin/sh
-
-PRJDIR = .
-include packages.mk
-#PKGS = cmd.src sim.src gui.src s51.src avr.src z80.src doc
-
-srcdir = .
-
-
-# Compiling entire program or any subproject
-# ------------------------------------------
-all: checkconf
- $(MAKE) -f main.mk all
- @for pkg in $(PKGS); do\
- cd $$pkg && $(MAKE) $$pkg ; cd ..;\
- done
- $(MAKE) -f main.mk main_app
-
-libs: main.mk
- $(MAKE) -f main.mk libs
-
-
-# Compiling and installing everything and runing test
-# ---------------------------------------------------
-.PHONY: install INSTALL Install
-install:
- $(MAKE) -f main.mk install
- @for pkg in $(PKGS); do\
- $(MAKE) -C $$pkg install ;\
- done
-
-
-# Deleting all the installed files
-# --------------------------------
-uninstall:
- $(MAKE) -f main.mk uninstall
- @for pkg in $(PKGS); do\
- $(MAKE) -C $$pkg uninstall ;\
- done
-
-
-# Deleting all files created by building the program
-# --------------------------------------------------
-clean:
- $(MAKE) -f clean.mk clean EXEEXT=$(EXEEXT)
- @for pkg in $(PKGS); do\
- $(MAKE) -C $$pkg -f clean.mk clean EXEEXT=$(EXEEXT) ;\
- done
-
-
-# Deleting all files created by configuring or building the program
-# -----------------------------------------------------------------
-distclean: clean
- $(MAKE) -f clean.mk distclean
- @for pkg in $(PKGS); do\
- $(MAKE) -C $$pkg -f clean.mk distclean ;\
- done
- rm -rf doc/*~ doc/*.bak
-
-
-# Like clean but some files may still exist
-# -----------------------------------------
-mostlyclean: clean
- $(MAKE) -f clean.mk mostlyclean
- @for pkg in $(PKGS); do\
- $(MAKE) -C $$pkg -f clean.mk mostlyclean ;\
- done
-
-
-# Deleting everything that can reconstructed by this Makefile. It deletes
-# everything deleted by distclean plus files created by bison, stc.
-# -----------------------------------------------------------------------
-realclean: distclean
- $(MAKE) -f clean.mk realclean
- @for pkg in $(PKGS); do\
- $(MAKE) -C $$pkg -f clean.mk realclean ;\
- done
-
-
-# Creating distribution
-# ---------------------
-dist: distclean
- @if [ -f devel ]; then\
- rm -f devel; mkdist; touch devel;\
- else\
- mkdist;\
- fi
-
-
-# Performing self-test
-# --------------------
-check:
- $(MAKE) -f main.mk check
- @for pkg in $(PKGS); do\
- $(MAKE) -C $$pkg check ;\
- done
-
-test:
- $(MAKE) -f main.mk test
- @for pkg in $(PKGS); do\
- $(MAKE) -C $$pkg test ;\
- done
-
-
-# Performing installation test
-# ----------------------------
-installcheck:
-
-
-# Creating dependencies
-# ---------------------
-dep:
- $(MAKE) -f main.mk dep
- @for pkg in $(PKGS); do\
- $(MAKE) -C $$pkg dep ;\
- done
-
-
-# My rules
-# --------
-putcopyright:
- 'put(c)' -s $(STARTYEAR) *.cc *.h *.y *.l
-
-start:
- date '+%Y.%m.%d-%H:%M' >.start
-
-newer: distclean
- @if [ -f .start ]; then \
- tar cvf - \
- `find . -newer .start -type f -print` |\
- gzip -9c >ucsim-newer-`cat .start`_`date '+%Y.%m.%d-%H:%M'`_`hostname`.tgz; \
- else \
- echo ".start file not found.\n"; \
- exit 1; \
- fi
-
-print-newer:
- @if [ -f .start ]; then \
- find . -newer .start -type f -print ;\
- else \
- echo ".start file not found.\n" ;\
- exit 1 ;\
- fi
-
-new_files:
- diff -rNu $$HOME/clean-source/sdcc/sim/ucsim .|\
- grep '^diff' | grep -v "\.svn" | awk '{print $$4}'
-
-lines:
- @find . \( -name '*.[ch]' -o -name '*.cc' -o -name '*.hh' \) \
- -exec cat {} \; | clines
-
-
-# Remaking configuration
-# ----------------------
-configure: configure.in
- @$(PRJDIR)/mkecho $(PRJDIR) "RE-CREATING CONFIGURE"
- autoconf configure.in >configure
- chmod 755 configure
-
-config.status: configure
- @$(PRJDIR)/mkecho $(PRJDIR) "RE-CHECKING CONFIGURATION (re-creating config.status from configure)"
- @if [ -x ./config.status ]; then \
- ./config.status -recheck;\
- else\
- if [ -x ./conf ]; then\
- ./conf;\
- else\
- ./configure;\
- fi\
- fi
-
-makefiles: config.status
- @$(PRJDIR)/mkecho $(PRJDIR) "RE-MAKING MAKEFILES"
- $(SHELL) ./config.status
-
-main.mk: $(srcdir)/main_in.mk config.status
- @$(PRJDIR)/mkecho $(PRJDIR) "RE-MAKING MAIN.MK"
- $(SHELL) ./config.status
-
-freshconf: echo_freshconf configure main.mk ddconfig.h
-
-ddconfig.h: ddconfig_in.h config.status
- $(SHELL) ./config.status
-
-echo_freshconf:
- @$(PRJDIR)/mkecho $(PRJDIR) "FRESHCONF"
-
-checkconf:
- @$(PRJDIR)/mkecho $(PRJDIR) "CHECKCONF"
- @if [ -f devel ]; then $(MAKE) freshconf; fi
-
-# End of Makefile
--- /dev/null
+#
+# uCsim Makefile
+#
+# (c) Drotos Daniel, Talker Bt. 1997,99
+#
+
+STARTYEAR = 1997
+
+SHELL = /bin/sh
+
+include packages.mk
+#PKGS = cmd.src sim.src gui.src s51.src avr.src z80.src doc
+
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# Compiling entire program or any subproject
+# ------------------------------------------
+all: checkconf
+ $(MAKE) -f main.mk all
+ @for pkg in $(PKGS); do\
+ $(MAKE) -C $$pkg $$pkg ;\
+ done
+ $(MAKE) -f main.mk main_app
+
+libs: main.mk
+ $(MAKE) -f main.mk libs
+
+
+# Compiling and installing everything and runing test
+# ---------------------------------------------------
+.PHONY: install INSTALL Install
+install:
+ $(MAKE) -f main.mk install
+ @for pkg in $(PKGS); do\
+ $(MAKE) -C $$pkg install ;\
+ done
+
+
+# Deleting all the installed files
+# --------------------------------
+uninstall:
+ $(MAKE) -f main.mk uninstall
+ @for pkg in $(PKGS); do\
+ $(MAKE) -C $$pkg uninstall ;\
+ done
+
+
+# Deleting all files created by building the program
+# --------------------------------------------------
+clean:
+ $(MAKE) -f $(srcdir)/clean.mk clean EXEEXT=$(EXEEXT)
+ @for pkg in $(PKGS_ALL); do\
+ $(MAKE) -C $$pkg -f ../$(srcdir)/$$pkg/clean.mk clean EXEEXT=$(EXEEXT) ;\
+ done
+
+
+# Deleting all files created by configuring or building the program
+# -----------------------------------------------------------------
+distclean: clean
+ $(MAKE) -f $(srcdir)/clean.mk distclean
+ @for pkg in $(PKGS_ALL); do\
+ $(MAKE) -C $$pkg -f ../$(srcdir)/$$pkg/clean.mk distclean ;\
+ done
+ rm -rf doc/*~ doc/*.bak Makefile packages.mk libtool
+
+
+# Like clean but some files may still exist
+# -----------------------------------------
+mostlyclean: clean
+ $(MAKE) -f clean.mk mostlyclean
+ @for pkg in $(PKGS_ALL); do\
+ $(MAKE) -C $$pkg -f ../$(srcdir)/$$pkg/clean.mk mostlyclean ;\
+ done
+
+
+# Deleting everything that can reconstructed by this Makefile. It deletes
+# everything deleted by distclean plus files created by bison, stc.
+# -----------------------------------------------------------------------
+realclean: distclean
+ $(MAKE) -f clean.mk realclean
+ @for pkg in $(PKGS_ALL); do\
+ $(MAKE) -C $$pkg -f ../$(srcdir)/$$pkg/clean.mk realclean ;\
+ done
+
+
+# Creating distribution
+# ---------------------
+dist: distclean
+ @if [ -f devel ]; then\
+ rm -f devel; mkdist; touch devel;\
+ else\
+ mkdist;\
+ fi
+
+
+# Performing self-test
+# --------------------
+check:
+ $(MAKE) -f main.mk check
+ @for pkg in $(PKGS); do\
+ $(MAKE) -C $$pkg check ;\
+ done
+
+test:
+ $(MAKE) -f main.mk test
+ @for pkg in $(PKGS); do\
+ $(MAKE) -C $$pkg test ;\
+ done
+
+
+# Performing installation test
+# ----------------------------
+installcheck:
+
+
+# Creating dependencies
+# ---------------------
+dep:
+ $(MAKE) -f main.mk dep
+ @for pkg in $(PKGS); do\
+ $(MAKE) -C $$pkg dep ;\
+ done
+
+
+# My rules
+# --------
+putcopyright:
+ 'put(c)' -s $(STARTYEAR) *.cc *.h *.y *.l
+
+start:
+ date '+%Y.%m.%d-%H:%M' >.start
+
+newer: distclean
+ @if [ -f .start ]; then \
+ tar cvf - \
+ `find . -newer .start -type f -print` |\
+ gzip -9c >ucsim-newer-`cat .start`_`date '+%Y.%m.%d-%H:%M'`_`hostname`.tgz; \
+ else \
+ echo ".start file not found.\n"; \
+ exit 1; \
+ fi
+
+print-newer:
+ @if [ -f .start ]; then \
+ find . -newer .start -type f -print ;\
+ else \
+ echo ".start file not found.\n" ;\
+ exit 1 ;\
+ fi
+
+new_files:
+ diff -rNu $$HOME/clean-source/sdcc/sim/ucsim .|\
+ grep '^diff' | grep -v .svn | awk '{print $$4}'
+
+lines:
+ @find . \( -name '*.[ch]' -o -name '*.cc' -o -name '*.hh' \) \
+ -exec cat {} \; | clines
+
+
+# Remaking configuration
+# ----------------------
+configure: configure.in
+ @$(top_srcdir)/mkecho $(top_builddir) "RE-CREATING CONFIGURE"
+ autoconf configure.in >configure
+ chmod 755 configure
+
+config.status: configure
+ @$(top_srcdir)/mkecho $(top_builddir) "RE-CHECKING CONFIGURATION (re-creating config.status from configure)"
+ @if [ -x ./config.status ]; then \
+ ./config.status -recheck;\
+ else\
+ if [ -x ./conf ]; then\
+ ./conf;\
+ else\
+ ./configure;\
+ fi\
+ fi
+
+makefiles: config.status
+ @$(top_srcdir)/mkecho $(top_builddir) "RE-MAKING MAKEFILES"
+ $(SHELL) ./config.status
+
+main.mk: $(srcdir)/main_in.mk config.status
+ @$(top_srcdir)/mkecho $(top_builddir) "RE-MAKING MAIN.MK"
+ $(SHELL) ./config.status
+
+freshconf: echo_freshconf configure main.mk ddconfig.h
+
+ddconfig.h: ddconfig_in.h config.status
+ $(SHELL) ./config.status
+
+echo_freshconf:
+ @$(top_srcdir)/mkecho $(top_builddir) "FRESHCONF"
+
+checkconf:
+ @$(top_srcdir)/mkecho $(top_builddir) "CHECKCONF"
+ @if [ -f devel ]; then $(MAKE) freshconf; fi
+
+# End of Makefile
INSTALL = @INSTALL@
STRIP = @STRIP@
-PRJDIR = ..
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
-CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) \
- -I$(PRJDIR)/cmd.src -I$(PRJDIR)/sim.src -I$(PRJDIR)/gui.src
+CPPFLAGS = @CPPFLAGS@ -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) \
+ -I$(top_srcdir)/cmd.src -I$(top_srcdir)/sim.src \
+ -I$(top_srcdir)/gui.src
CFLAGS = @CFLAGS@ -Wall
CXXFLAGS = @CXXFLAGS@ -Wall
M_OR_MM = @M_OR_MM@
SHAREDLIB = @SHAREDLIB@
EXEEXT = @EXEEXT@
-LIBS = @LIBS@ -L$(PRJDIR) -lsim -lutil -lguiucsim -lcmd -lsim
+LIBS = @LIBS@ -L$(top_builddir) -lsim -lutil -lguiucsim -lcmd -lsim
DL = @DL@
dl_ok = @dl_ok@
man2dir = $(mandir)/man2
infodir = @infodir@
srcdir = @srcdir@
+VPATH = @srcdir@
OBJECTS_SHARED = glob.o \
simavr.o avr.o port.o \
# ---------------------
dep: Makefile.dep
-Makefile.dep: *.cc *.h
- $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
+Makefile.dep: $(srcdir)/*.cc $(srcdir)/*.h
+ $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $^ >Makefile.dep
include Makefile.dep
-include clean.mk
+include $(srcdir)/clean.mk
#parser.cc: parser.y
avr.src: savr$(EXEEXT) shared_lib
-savr$(EXEEXT): $(OBJECTS) $(PRJDIR)/*.a
+savr$(EXEEXT): $(OBJECTS) $(top_builddir)*.a
$(CXX) $(CXXFLAGS) $(OBJECTS) $(LIBS) -o $@
ifeq ($(dlso_ok),yes)
-shared_lib: $(PRJDIR)/savr.so
+shared_lib: $(top_builddir)savr.so
else
shared_lib:
- @$(PRJDIR)/mkecho $(PRJDIR) "No AVR shared lib made."
- @$(PRJDIR)/mkecho $(PRJDIR) "(SHAREDLIB="$(SHAREDLIB)",dl_ok="$(dl_ok)",enable_dlso="$(enable_dlso)")"
+ @$(top_srcdir)/mkecho $(top_builddir) "No AVR shared lib made."
+ @$(top_srcdir)/mkecho $(top_builddir) "(SHAREDLIB="$(SHAREDLIB)",dl_ok="$(dl_ok)",enable_dlso="$(enable_dlso)")"
endif
-$(PRJDIR)/savr.so: $(OBJECTS_SHARED)
- $(CXX) -shared $(OBJECTS_SHARED) -o $(PRJDIR)/savr.so
+$(top_builddir)savr.so: $(OBJECTS_SHARED)
+ $(CXX) -shared $(OBJECTS_SHARED) -o $(top_builddir)savr.so
otherlibs:
- cd $(PRJDIR)/cmd.src && $(MAKE) all
- cd $(PRJDIR)/sim.src && $(MAKE) all
+ $(MAKE) -C $(top_builddir)cmd.src all
+ $(MAKE) -C $(top_builddir)sim.src all
.cc.o:
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
# Remaking configuration
# ----------------------
checkconf:
- @if [ -f $(PRJDIR)/devel ]; then\
- $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
+ @if [ -f $(top_builddir)devel ]; then\
+ $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
fi
# End of avr.src/Makefile.in
freshconf: Makefile
-Makefile: $(srcdir)/Makefile.in $(PRJDIR)/configure.in
- cd $(PRJDIR) && $(SHELL) ./config.status
+Makefile: $(srcdir)/Makefile.in $(top_srcdir)/configure.in
+ cd $(top_builddir) && $(SHELL) ./config.status
# End of avr.src/conf.mk
# -----------------------------------------------------------------
distclean: clean
rm -f config.cache config.log config.status
- rm -f ddconfig.h main.mk *.dep
+ rm -f ddconfig.h main.mk Makefile *.dep
rm -rf autom4te.cache
YACC = @YACC@
BISON_PLUS_PLUS = @BISON_PLUS_PLUS@
-PRJDIR = ..
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
-CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) \
- -I$(PRJDIR)/sim.src -I$(PRJDIR)/gui.src
+CPPFLAGS = @CPPFLAGS@ -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) \
+ -I$(top_srcdir)/sim.src -I$(top_srcdir)/gui.src
CFLAGS = @CFLAGS@ -Wall
CXXFLAGS = @CXXFLAGS@ -Wall
M_OR_MM = @M_OR_MM@
man2dir = $(mandir)/man2
infodir = @infodir@
srcdir = @srcdir@
+VPATH = @srcdir@
OBJECTS = cmdset.o command.o newcmd.o cmdutil.o syntax.o \
get.o set.o timer.o bp.o info.o show.o cmdgui.o cmdconf.o \
cmduc.o cmdstat.o cmdmem.o \
cmdpars.o cmdlex.o
-DEVEL = $(shell ( bash -c "test -e $(PRJDIR)/devel && echo yes" ))
+DEVEL = $(shell ( bash -c "test -e $(top_builddir)devel && echo yes" ))
# Compiling entire program or any subproject
# ------------------------------------------
# ---------------------
dep: Makefile.dep
-Makefile.dep: *.cc *.h
- $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
+Makefile.dep: $(srcdir)/*.cc $(srcdir)/*.h
+ $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $^ >Makefile.dep
include Makefile.dep
-include clean.mk
+include $(srcdir)/clean.mk
cmdpars.cc: cmdpars.y
# My rules
# --------
-cmdlib: $(PRJDIR)/libcmd.a
+cmdlib: $(top_builddir)libcmd.a
-$(PRJDIR)/libcmd.a: $(OBJECTS)
+$(top_builddir)libcmd.a: $(OBJECTS)
ar -rcu $*.a $(OBJECTS)
$(RANLIB) $*.a
# Remaking configuration
# ----------------------
checkconf:
- @if [ -f $(PRJDIR)/devel ]; then\
- $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
+ @if [ -f $(top_builddir)devel ]; then\
+ $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
fi
# End of cmd.src/Makefile.in
freshconf: Makefile
-Makefile: $(srcdir)/Makefile.in $(PRJDIR)/configure.in
- cd $(PRJDIR) && $(SHELL) ./config.status
+Makefile: $(srcdir)/Makefile.in $(top_srcdir)/configure.in
+ cd $(top_builddir) && $(SHELL) ./config.status
# End of cmd.src/conf.mk
--enable-dlso compile dynamically loadable shared libraries
--disable-51 do not compile simulator for MCS51
--disable-avr do not compile simulator for AVR
- --enable-z80 compile simulator for Z80
- --enable-hc08 compile simulator for hc08
+ --disable-z80 do not compile simulator for Z80
+ --disable-hc08 do not compile simulator for hc08
--enable-xa compile simulator for XA
--enable-serio compile serio GUI tool (needs curses)
--enable-statistic compile statistical features (slower simulation)
else
echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi
- cd "$ac_popdir"
+ cd $ac_popdir
done
fi
echo "$as_me:$LINENO: checking version of the package" >&5
echo $ECHO_N "checking version of the package... $ECHO_C" >&6
-if test -f .version; then
- VERSION=`cat .version`
+if test -f ${srcdir}/.version; then
+ VERSION=`cat ${srcdir}/.version`
echo "$as_me:$LINENO: result: $VERSION" >&5
echo "${ECHO_T}$VERSION" >&6
else
enable_z80="yes"
fi
else
- enable_z80="no"
+ enable_z80="yes"
fi;
# Check whether --enable-hc08 or --disable-hc08 was given.
if test "${enable_hc08+set}" = set; then
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 5040 "configure"' > conftest.$ac_ext
+ echo '#line 5053 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
compiler_c_o=no
-if { (eval echo configure:5613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+if { (eval echo configure:5629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
if test -s out/conftest.err; then
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 7544 "configure"
+#line 7568 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 7642 "configure"
+#line 7666 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
+
+#AC_CHECK_LIB(panel,panel_above,
+#panel_ok="yes"
+#curses_ok="yes"
+#CURSES_LIBS="-lpanel -lcurses"
+#,
+#panel_ok="no"
+#AC_CHECK_LIB(curses,nl,
+#curses_ok="yes"
+#CURSES_LIBS="-lcurses"
+#,
+#curses_ok="no")
+#,
+#-lcurses)
+
echo "$as_me:$LINENO: checking for panel_above in -lpanel" >&5
echo $ECHO_N "checking for panel_above in -lpanel... $ECHO_C" >&6
if test "${ac_cv_lib_panel_panel_above+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpanel -lcurses $LIBS"
+LIBS="-lpanel $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
if test $ac_cv_lib_panel_panel_above = yes; then
panel_ok="yes"
curses_ok="yes"
-CURSES_LIBS="-lpanel -lcurses"
-
+CURSES_LIBS="-lpanel"
else
panel_ok="no"
-echo "$as_me:$LINENO: checking for nl in -lcurses" >&5
+curses_ok="no"
+
+fi
+
+
+if test $curses_ok != yes; then
+ echo "$as_me:$LINENO: checking for nl in -lcurses" >&5
echo $ECHO_N "checking for nl in -lcurses... $ECHO_C" >&6
if test "${ac_cv_lib_curses_nl+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "${ECHO_T}$ac_cv_lib_curses_nl" >&6
if test $ac_cv_lib_curses_nl = yes; then
curses_ok="yes"
-CURSES_LIBS="-lcurses"
-
+ CURSES_LIBS="-lcurses"
else
- ncurses_ok="no"
+ curses_ok="no"
fi
+fi
+
+if test $curses_ok != yes; then
+ echo "$as_me:$LINENO: checking for nl in -lncurses" >&5
+echo $ECHO_N "checking for nl in -lncurses... $ECHO_C" >&6
+if test "${ac_cv_lib_ncurses_nl+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lncurses $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char nl ();
+int
+main ()
+{
+nl ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ncurses_nl=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ncurses_nl=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_nl" >&5
+echo "${ECHO_T}$ac_cv_lib_ncurses_nl" >&6
+if test $ac_cv_lib_ncurses_nl = yes; then
+ curses_ok="yes"
+ CURSES_LIBS="-lncurses"
+else
+ curses_ok="no"
+fi
fi
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
esac
else
if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
-echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
esac
else
if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
-echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
esac
else
if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
-echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
esac
else
if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
-echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
esac
else
if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
-echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
# Generating output files
# ===========================================================================
- ac_config_files="$ac_config_files main.mk:main_in.mk packages.mk:packages_in.mk sim.src/Makefile cmd.src/Makefile s51.src/Makefile avr.src/Makefile z80.src/Makefile hc08.src/Makefile xa.src/Makefile gui.src/Makefile gui.src/serio.src/Makefile doc/Makefile"
+ ac_config_files="$ac_config_files Makefile main.mk:main_in.mk packages.mk:packages_in.mk sim.src/Makefile cmd.src/Makefile s51.src/Makefile avr.src/Makefile z80.src/Makefile hc08.src/Makefile xa.src/Makefile gui.src/Makefile gui.src/serio.src/Makefile doc/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
do
case "$ac_config_target" in
# Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"main.mk" ) CONFIG_FILES="$CONFIG_FILES main.mk:main_in.mk" ;;
"packages.mk" ) CONFIG_FILES="$CONFIG_FILES packages.mk:packages_in.mk" ;;
"sim.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES sim.src/Makefile" ;;
*) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
fi;;
esac
done` || { (exit 1); exit 1; }
-
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
sed "$ac_vpsub
AC_PROG_AWK
AC_MSG_CHECKING(version of the package)
-if test -f .version; then
- VERSION=`cat .version`
+if test -f ${srcdir}/.version; then
+ VERSION=`cat ${srcdir}/.version`
AC_MSG_RESULT($VERSION)
else
VERSION="0.0.0"
fi,
enable_avr="yes")
AC_ARG_ENABLE(z80,
-[ --enable-z80 compile simulator for Z80],
+[ --disable-z80 do not compile simulator for Z80],
if test $enable_z80 != "no"; then
enable_z80="yes"
fi,
-enable_z80="no")
+enable_z80="yes")
AC_ARG_ENABLE(hc08,
-[ --enable-hc08 compile simulator for hc08],
+[ --disable-hc08 do not compile simulator for hc08],
if test $enable_hc08 != "no"; then
enable_hc08="yes"
fi,
DL="")
AC_SUBST(dl_ok)
AC_SUBST(DL)
+
+#AC_CHECK_LIB(panel,panel_above,
+#panel_ok="yes"
+#curses_ok="yes"
+#CURSES_LIBS="-lpanel -lcurses"
+#,
+#panel_ok="no"
+#AC_CHECK_LIB(curses,nl,
+#curses_ok="yes"
+#CURSES_LIBS="-lcurses"
+#,
+#curses_ok="no")
+#,
+#-lcurses)
+
AC_CHECK_LIB(panel,panel_above,
panel_ok="yes"
curses_ok="yes"
-CURSES_LIBS="-lpanel -lcurses"
-,
+CURSES_LIBS="-lpanel",
panel_ok="no"
-AC_CHECK_LIB(curses,nl,
-curses_ok="yes"
-CURSES_LIBS="-lcurses"
-,
-ncurses_ok="no")
-,
--lcurses)
+curses_ok="no"
+)
+
+if test $curses_ok != yes; then
+ AC_CHECK_LIB(curses,nl,
+ curses_ok="yes"
+ CURSES_LIBS="-lcurses",
+ curses_ok="no")
+fi
+
+if test $curses_ok != yes; then
+ AC_CHECK_LIB(ncurses,nl,
+ curses_ok="yes"
+ CURSES_LIBS="-lncurses",
+ curses_ok="no")
+fi
+
AC_SUBST(panel_ok)
AC_SUBST(curses_ok)
AC_SUBST(CURSES_LIBS)
# Generating output files
# ===========================================================================
-AC_OUTPUT(main.mk:main_in.mk
+AC_OUTPUT(Makefile
+main.mk:main_in.mk
packages.mk:packages_in.mk
sim.src/Makefile
cmd.src/Makefile
SHELL = /bin/sh
INSTALL = @INSTALL@
-PRJDIR = ..
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
man2dir = $(mandir)/man2
infodir = @infodir@
srcdir = @srcdir@
+VPATH = @srcdir@
#docdir = $(prefix)/share/doc/ucsim
docdir = @docdir@/ucsim
# Compiling and installing everything and runing test
# ---------------------------------------------------
install: all installdirs
- cp *.html $(DESTDIR)$(docdir)
- cp *.gif $(DESTDIR)$(docdir)
- cp *.jpg $(DESTDIR)$(docdir)
- cp *.fig $(DESTDIR)$(docdir)
+ cp $(srcdir)/*.html $(DESTDIR)$(docdir)
+ cp $(srcdir)/*.gif $(DESTDIR)$(docdir)
+ cp $(srcdir)/*.jpg $(DESTDIR)$(docdir)
+ cp $(srcdir)/*.fig $(DESTDIR)$(docdir)
# Deleting all the installed files
# Creating dependencies
# ---------------------
-include clean.mk
+include $(srcdir)/clean.mk
# My rules
# --------
# Remaking configuration
# ----------------------
checkconf:
- @if [ -f $(PRJDIR)/devel ]; then\
- $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
+ @if [ -f $(top_builddir)devel ]; then\
+ $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
fi
# End of s51.src/Makefile.in
freshconf: Makefile
-Makefile: $(srcdir)/Makefile.in $(PRJDIR)/configure.in
- cd $(PRJDIR) && $(SHELL) ./config.status
+Makefile: $(srcdir)/Makefile.in $(top_srcdir)/configure.in
+ cd $(top_builddir) && $(SHELL) ./config.status
# End of conf.mk
RANLIB = @RANLIB@
INSTALL = @INSTALL@
-PRJDIR = ..
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
-CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) \
- -I$(PRJDIR)/sim.src -I$(PRJDIR)/cmd.src
+CPPFLAGS = @CPPFLAGS@ -I$(srcdir) -I$(top_builddir) -I$(top_srcdir) \
+ -I$(top_srcdir)/sim.src -I$(top_srcdir)/cmd.src
CFLAGS = @CFLAGS@ -Wall
CXXFLAGS = @CXXFLAGS@ -Wall
M_OR_MM = @M_OR_MM@
-LIBS = @LIBS@ @CURSES_LIBS@ -L$(PRJDIR)
+LIBS = @LIBS@ @CURSES_LIBS@ -L$(top_builddir)
curses_ok = @curses_ok@
man2dir = $(mandir)/man2
infodir = @infodir@
srcdir = @srcdir@
+VPATH = @srcdir@
enable_serio = @enable_serio@
PKGS =
gui.src: checkconf gui_api
ifeq ($(curses_ok),yes)
@for pkg in dummy $(CURSES_PKGS); do\
- if test -d $$pkg; then $(MAKE) -C $$pkg $$pkg; else : ; fi ;\
+ if test -f $$pkg/Makefile; then $(MAKE) -C $$pkg $$pkg; else : ; fi ;\
done
endif
# @for pkg in $(PKGS); do\
install: install_gui_api
ifeq ($(curses_ok),yes)
@for pkg in $(CURSES_PKGS); do\
- cd $$pkg && $(MAKE) install ; cd ..;\
+ $(MAKE) -C $$pkg install ; cd ..;\
done
endif
uninstall: uninstall_gui_api
ifeq ($(curses_ok),yes)
@for pkg in $(CURSES_PKGS); do\
- cd $$pkg && $(MAKE) uninstall ; cd ..;\
+ $(MAKE) -C $$pkg uninstall ; cd ..;\
done
endif
# --------------------
check: check_local
@for pkg in $(CURSES_PKGS); do\
- cd $$pkg && $(MAKE) check ; cd ..;\
+ $(MAKE) -C $$pkg check ; cd ..;\
done
check_local:
test: test_local
@for pkg in $(CURSES_PKGS); do\
- cd $$pkg && $(MAKE) test ; cd ..;\
+ $(MAKE) -C $$pkg test ; cd ..;\
done
test_local:
# ----------------------------
installcheck: installcheck_gui_api
@for pkg in $(CURSES_PKGS); do\
- cd $$pkg && $(MAKE) installcheck ; cd ..;\
+ $(MAKE) -C $$pkg installcheck ; cd ..;\
done
installcheck_gui_api:
# ---------------------------------
installdirs:
@for pkg in $(CURSES_PKGS); do\
- cd $$pkg && $(MAKE) installdirs ; cd ..;\
+ $(MAKE) -C $$pkg installdirs ; cd ..;\
done
# ---------------------
dep: Makefile.dep
-Makefile.dep: $(ALL_SOURCES) *.h
- $(CXXCPP) -MM $(CPPFLAGS) $(M_OR_MM) $(ALL_SOURCES) >Makefile.dep
+Makefile.dep: $(ALL_SOURCES) $(srcdir)/*.h
+ $(CXXCPP) -MM $(CPPFLAGS) $(M_OR_MM) $^ >Makefile.dep
-include Makefile.dep
-include clean.mk
+# don't include Makefile.dep for the listed targets:
+ifeq "$(findstring $(MAKECMDGOALS),uninstall uninstall_gui_api \
+ check check_local test test_local \
+ checkconf \
+ clean_local clean distclean_local \
+ distclean mostlyclean realclean)" ""
+ include Makefile.dep
+endif
+include $(srcdir)/clean.mk
# My rules
# --------
-ucsim_lib: $(PRJDIR)/libguiucsim.a
+ucsim_lib: $(top_builddir)libguiucsim.a
-$(PRJDIR)/libguiucsim.a: $(OBJECTS) $(UCSIM_OBJECTS)
+$(top_builddir)libguiucsim.a: $(OBJECTS) $(UCSIM_OBJECTS)
ar -rcu $*.a $(OBJECTS) $(UCSIM_OBJECTS)
$(RANLIB) $*.a
-tool_lib: $(PRJDIR)/libguitool.a
+tool_lib: $(top_builddir)libguitool.a
-$(PRJDIR)/libguitool.a: $(OBJECTS) $(TOOL_OBJECTS)
+$(top_builddir)libguitool.a: $(OBJECTS) $(TOOL_OBJECTS)
ar -rcu $*.a $(OBJECTS) $(TOOL_OBJECTS)
$(RANLIB) $*.a
# Remaking configuration
# ----------------------
checkconf:
- @if [ -f $(PRJDIR)/devel ]; then\
- $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
+ @if [ -f $(top_builddir)devel ]; then\
+ $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
fi
# End of gui.src/Makefile
clean: clean_local
@for pkg in $(PKGS); do\
- cd $$pkg && $(MAKE) -f clean.mk clean; cd ..;\
+ $(MAKE) -C $$pkg clean;\
done
distclean: distclean_local
@for pkg in $(PKGS); do\
- cd $$pkg && $(MAKE) -f clean.mk distclean; cd ..;\
+ $(MAKE) -C $$pkg distclean;\
done
# -----------------------------------------
mostlyclean: clean_local
@for pkg in $(PKGS); do\
- cd $$pkg && $(MAKE) -f clean.mk mostlyclean; cd ..;\
+ $(MAKE) -C $$pkg mostlyclean;\
done
# -----------------------------------------------------------------------
realclean: distclean_local
@for pkg in $(PKGS); do\
- cd $$pkg && $(MAKE) -f clean.mk realclean; cd ..;\
+ $(MAKE) $$pkg realclean;\
done
# End of gui.src/clean.mk
freshconf: Makefile
-Makefile: $(srcdir)/Makefile.in $(PRJDIR)/configure.in
- cd $(PRJDIR) && $(SHELL) ./config.status
+Makefile: $(srcdir)/Makefile.in $(top_srcdir)/configure.in
+ cd $(top_builddir) && $(SHELL) ./config.status
# End of gui.src/conf.mk
RANLIB = @RANLIB@
INSTALL = @INSTALL@
-PRJDIR = ../..
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
PKGDIR = ../
DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
-CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(PKGDIR)
+CPPFLAGS = @CPPFLAGS@ -I. -I$(top_builddir) -I$(PKGDIR)
CFLAGS = @CFLAGS@ -Wall
CXXFLAGS = @CXXFLAGS@ -Wall
M_OR_MM = @M_OR_MM@
-LIBS = -L$(PRJDIR) -L$(PKGDIR) -lgui @CURSES_LIBS@ -lutil @LIBS@
+LIBS = -L$(top_builddir) -L$(PKGDIR) -lgui @CURSES_LIBS@ -lutil @LIBS@
curses_ok = @curses_ok@
# ---------------------
dep: Makefile.dep
-Makefile.dep: *.cc *.h $(PRJDIR)/*.h $(PKGDIR)/*.h
- $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
+Makefile.dep: $(srcdir)/*.cc $(top_builddir)*.h $(PKGDIR)/*.h
+ $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.cc,$^) >Makefile.dep
include Makefile.dep
include clean.mk
portmon.src:
endif
-portmon: $(OBJECTS) $(PRJDIR)/*.a $(PKGDIR)/*.a
+portmon: $(OBJECTS) $(top_builddir)*.a $(PKGDIR)/*.a
$(CXX) $(CXXFLAGS) -o portmon $(OBJECTS) $(LIBS)
ifeq ($(curses_ok),yes)
otherlibs:
- cd $(PRJDIR) && $(MAKE) libs
- cd $(PKGDIR) && $(MAKE) libs
+ $(MAKE) -C $(top_builddir) libs
+ $(MAKE) -C $(PKGDIR) libs
else
otherlibs:
endif
# Remaking configuration
# ----------------------
checkconf:
- @if [ -f $(PRJDIR)/devel ]; then\
- $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
+ @if [ -f $(top_builddir)devel ]; then\
+ $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
fi
# End of gui.src/portmon.src/Makefile.in
freshconf: Makefile
-Makefile: $(srcdir)/Makefile.in $(PRJDIR)/configure.in
- cd $(PRJDIR) && $(SHELL) ./config.status
+Makefile: $(srcdir)/Makefile.in $(top_srcdir)/configure.in
+ cd $(top_builddir) && $(SHELL) ./config.status
# End of gui.src/portmon.src/conf.mk
STRIP = @STRIP@
CP = /bin/cp
-PRJDIR = ../..
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
-CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR)
-# -I$(PRJDIR)/cmd.src -I$(PRJDIR)/sim.src
+CPPFLAGS = @CPPFLAGS@ -I. -I$(top_builddir)
+# -I$(top_builddir)cmd.src -I$(top_builddir)sim.src
CFLAGS = @CFLAGS@ -Wall
CXXFLAGS = @CXXFLAGS@ -Wall
M_OR_MM = @M_OR_MM@
man2dir = $(mandir)/man2
infodir = @infodir@
srcdir = @srcdir@
+VPATH = @srcdir@
OBJECTS = main.o fileio.o frontend.o posix_signal.o
# ---------------------
dep: Makefile.dep
-Makefile.dep: *.cc *.h *.hh
- $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
+Makefile.dep: $(srcdir)/*.cc $(srcdir)/*.h $(srcdir)/*.hh
+ $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.cc,$^) >Makefile.dep
-include Makefile.dep
-include clean.mk
+ifeq "$(findstring $(MAKECMDGOALS),uninstall installcheck installdirs checkconf \
+ clean distclean mostlyclean realclean)" ""
+ include Makefile.dep
+endif
+include $(srcdir)/clean.mk
# My rules
# Remaking configuration
# ----------------------
checkconf:
- @if [ -f $(PRJDIR)/devel ]; then\
- $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
+ @if [ -f $(top_builddir)devel ]; then\
+ $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
fi
# End of gui.src/serio.src/Makefile.in
freshconf: Makefile
-Makefile: $(srcdir)/Makefile.in $(PRJDIR)/configure.in
- cd $(PRJDIR) && $(SHELL) ./config.status
+Makefile: $(srcdir)/Makefile.in $(top_srcdir)/configure.in
+ cd $(top_builddir) && $(SHELL) ./config.status
# End of gui.src/serio.src/conf.mk
INSTALL = @INSTALL@
STRIP = @STRIP@
-PRJDIR = ..
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
-CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) \
- -I$(PRJDIR)/cmd.src -I$(PRJDIR)/sim.src -I$(PRJDIR)/gui.src
+CPPFLAGS = @CPPFLAGS@ -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) \
+ -I$(top_srcdir)/cmd.src -I$(top_srcdir)/sim.src \
+ -I$(top_srcdir)/gui.src
CFLAGS = @CFLAGS@ -Wall
CXXFLAGS = @CXXFLAGS@ -Wall
M_OR_MM = @M_OR_MM@
EXEEXT = @EXEEXT@
-LIBS = @LIBS@ -L$(PRJDIR) -lsim -lutil -lguiucsim -lcmd -lsim
+LIBS = @LIBS@ -L$(top_builddir) -lsim -lutil -lguiucsim -lcmd -lsim
DL = @DL@
dl_ok = @dl_ok@
man2dir = $(mandir)/man2
infodir = @infodir@
srcdir = @srcdir@
+VPATH = @srcdir@
OBJECTS_SHARED = glob.o \
inst.o \
# ---------------------
dep: Makefile.dep
-Makefile.dep: *.cc *.h
- $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
+Makefile.dep: $(srcdir)/*.cc $(srcdir)/*.h
+ $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $^ >Makefile.dep
include Makefile.dep
-include clean.mk
+include $(srcdir)/clean.mk
# My rules
# --------
hc08.src: shc08$(EXEEXT) shared_lib
-shc08$(EXEEXT): $(OBJECTS) $(PRJDIR)/*.a
+shc08$(EXEEXT): $(OBJECTS) $(top_builddir)*.a
$(CXX) $(CXXFLAGS) -o $@ $(OBJECTS) $(LIBS)
ifeq ($(dlso_ok),yes)
-shared_lib: $(PRJDIR)/shc08.so
+shared_lib: $(top_builddir)shc08.so
else
shared_lib:
- @$(PRJDIR)/mkecho $(PRJDIR) "No hc08 shared lib made."
- @$(PRJDIR)/mkecho $(PRJDIR) "(SHAREDLIB="$(SHAREDLIB)",dl_ok="$(dl_ok)",enable_dlso="$(enable_dlso)")"
+ @$(top_srcdir)/mkecho $(top_builddir) "No hc08 shared lib made."
+ @$(top_srcdir)/mkecho $(top_builddir) "(SHAREDLIB="$(SHAREDLIB)",dl_ok="$(dl_ok)",enable_dlso="$(enable_dlso)")"
endif
-$(PRJDIR)/shc08.so: $(OBJECTS_SHARED)
- $(CXX) -shared $(OBJECTS_SHARED) -o $(PRJDIR)/shc08.so
+$(top_builddir)shc08.so: $(OBJECTS_SHARED)
+ $(CXX) -shared $(OBJECTS_SHARED) -o $(top_builddir)shc08.so
otherlibs:
- cd $(PRJDIR)/cmd.src && $(MAKE) all
- cd $(PRJDIR)/sim.src && $(MAKE) all
+ $(MAKE) -C $(top_builddir)cmd.src all
+ $(MAKE) -C $(top_builddir)sim.src all
.cc.o:
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
# Remaking configuration
# ----------------------
checkconf:
- @if [ -f $(PRJDIR)/devel ]; then\
- $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
+ @if [ -f $(top_builddir)devel ]; then\
+ $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
fi
# End of hc08.src/Makefile.in
freshconf: Makefile
-Makefile: $(srcdir)/Makefile.in $(PRJDIR)/configure.in
- cd $(PRJDIR) && $(SHELL) ./config.status
+Makefile: $(srcdir)/Makefile.in $(top_srcdir)/configure.in
+ cd $(top_builddir) && $(SHELL) ./config.status
# End of hc08.src/conf.mk
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$@ $(SHELL) ./config.status
-$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+$(top_builddir)config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
rm -f stamp-h; \
$(MAKE) stamp-h; \
else :; fi
-stamp-h: $(srcdir)/config-h.in $(top_builddir)/config.status
+stamp-h: $(srcdir)/config-h.in $(top_builddir)config.status
@rm -f stamp-h stamp-hT
@echo timestamp > stamp-hT 2> /dev/null
cd $(top_builddir) \
RANLIB = @RANLIB@
INSTALL = @INSTALL@
-PRJDIR = .
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
SIMDIR = sim.src
CMDDIR = cmd.src
GUIDIR = gui.src
DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
# FIXME: -Imcs51 must be removed!!!
-CPPFLAGS = @CPPFLAGS@ -I$(PRJDIR) -I$(PRJDIR)/$(SIMDIR) \
- -I$(CMDDIR) -I$(GUIDIR)
-CFLAGS = @CFLAGS@ -I$(PRJDIR) -Wall
-CXXFLAGS = @CXXFLAGS@ -I$(PRJDIR) -Wall
+CPPFLAGS = @CPPFLAGS@ -I$(top_builddir). -I$(srcdir) \
+ -I$(top_srcdir)/$(SIMDIR) \
+ -I$(top_srcdir)/$(CMDDIR) -I$(top_srcdir)/$(GUIDIR)
+CFLAGS = @CFLAGS@ -I$(top_builddir) -Wall
+CXXFLAGS = @CXXFLAGS@ -I$(top_builddir) -Wall
M_OR_MM = @M_OR_MM@
EXEEXT = @EXEEXT@
man2dir = $(mandir)/man2
infodir = @infodir@
srcdir = @srcdir@
+VPATH = @srcdir@
OBJECTS = pobj.o globals.o utils.o error.o app.o option.o
SOURCES = $(patsubst %.o,%.cc,$(OBJECTS))
# ---------------------
dep: main.dep
-main.dep: $(ALL_SOURCES) *.h
- $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(ALL_SOURCES) >main.dep
+main.dep: $(ALL_SOURCES) *.h $(srcdir)/*.h
+ $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $^ >main.dep
include main.dep
-include clean.mk
+include $(srcdir)/clean.mk
#parser.cc: parser.y
ucsim: $(UCSIM_OBJECTS) $(UCSIM_LIB_FILES)
echo $(UCSIM_LIB_FILES)
- $(CXX) $(CXXFLAGS) -o $@ $< -L$(PRJDIR) $(UCSIM_LIBS)
+ $(CXX) $(CXXFLAGS) -o $@ $< -L$(top_builddir) $(UCSIM_LIBS)
ptt: ptt.o
$(CXX) $(CXXFLAGS) -o $@ $< -lpthread
# ----------------------
checkconf:
@if [ -f devel ]; then\
- $(PRJDIR)/mkecho $(PRJDIR) "MAIN.MK checkconf";\
+ $(top_srcdir)/mkecho $(top_builddir) "MAIN.MK checkconf";\
$(MAKE) -f conf.mk srcdir="$(srcdir)" freshconf;\
fi
PKGS = cmd.src sim.src gui.src $(S51) $(SAVR) $(SZ80) $(XA) \
$(SHC08) doc
+PKGS_ALL = cmd.src sim.src gui.src s51.src avr.src z80.src xa.src \
+ hc08.src doc
INSTALL = @INSTALL@
STRIP = @STRIP@
-PRJDIR = ..
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
-CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) \
- -I$(PRJDIR)/cmd.src -I$(PRJDIR)/sim.src -I$(PRJDIR)/gui.src
+CPPFLAGS = @CPPFLAGS@ -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) \
+ -I$(top_srcdir)/cmd.src -I$(top_srcdir)/sim.src \
+ -I$(top_srcdir)/gui.src
CFLAGS = @CFLAGS@ -Wall
CXXFLAGS = @CXXFLAGS@ -Wall
M_OR_MM = @M_OR_MM@
SDCFLAGS = --debug --stack-after-data --model-small
SDCPPFLAGS =
-LIBS = @LIBS@ -L$(PRJDIR) -lsim -lutil -lguiucsim -lcmd -lsim
+LIBS = @LIBS@ -L$(top_builddir) -lsim -lutil -lguiucsim -lcmd -lsim
DL = @DL@
dl_ok = @dl_ok@
man2dir = $(mandir)/man2
infodir = @infodir@
srcdir = @srcdir@
+VPATH = @srcdir@
EXEEXT = @EXEEXT@
# ---------------------
dep: Makefile.dep
-Makefile.dep: *.cc *.h
- $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
+Makefile.dep: $(srcdir)/*.cc $(srcdir)/*.h
+ $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $^ >Makefile.dep
include Makefile.dep
-include clean.mk
+include $(srcdir)/clean.mk
#parser.cc: parser.y
s51.src: s51$(EXEEXT) shared_lib
-s51$(EXEEXT): $(OBJECTS) $(PRJDIR)/*.a
+s51$(EXEEXT): $(OBJECTS) $(top_builddir)*.a
$(CXX) $(CXXFLAGS) $(OBJECTS) $(LIBS) -o $@
ifeq ($(dlso_ok),yes)
-shared_lib: $(PRJDIR)/s51.so
+shared_lib: $(top_builddir)s51.so
else
shared_lib:
- @$(PRJDIR)/mkecho $(PRJDIR) "No 51 shared lib made."
- @$(PRJDIR)/mkecho $(PRJDIR) "(SHAREDLIB="$(SHAREDLIB)",dl_ok="$(dl_ok)",enable_dlso="$(enable_dlso)")"
+ @$(top_srcdir)/mkecho $(top_builddir) "No 51 shared lib made."
+ @$(top_srcdir)/mkecho $(top_builddir) "(SHAREDLIB="$(SHAREDLIB)",dl_ok="$(dl_ok)",enable_dlso="$(enable_dlso)")"
endif
-$(PRJDIR)/s51.so: $(OBJECTS_SHARED)
+$(top_builddir)s51.so: $(OBJECTS_SHARED)
$(CXX) -shared $(OBJECTS_SHARED) -o $@
otherlibs:
- cd $(PRJDIR) && $(MAKE) libs
- cd $(PRJDIR)/cmd.src && $(MAKE) all
- cd $(PRJDIR)/sim.src && $(MAKE) all
- $(MAKE) -C $(PRJDIR)/gui.src checkconf ucsim_lib
+ $(MAKE) -C $(top_builddir) libs
+ $(MAKE) -C $(top_builddir)cmd.src all
+ $(MAKE) -C $(top_builddir)sim.src all
+ $(MAKE) -C $(top_builddir)gui.src checkconf ucsim_lib
.cc.o:
$(CXX) $(CXXFLAGS) $(PICOPT) $(CPPFLAGS) -c $< -o $@
# Remaking configuration
# ----------------------
checkconf:
- @if [ -f $(PRJDIR)/devel ]; then\
- $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
+ @if [ -f $(top_builddir)devel ]; then\
+ $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
fi
# End of s51.src/Makefile.in
freshconf: Makefile
-Makefile: $(srcdir)/Makefile.in $(PRJDIR)/configure.in
- cd $(PRJDIR) && $(SHELL) ./config.status
+Makefile: $(srcdir)/Makefile.in $(top_srcdir)/configure.in
+ cd $(top_builddir) && $(SHELL) ./config.status
# End of s51.src/conf.mk
RANLIB = @RANLIB@
INSTALL = @INSTALL@
-PRJDIR = ..
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
-CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) \
- -I$(PRJDIR)/cmd.src -I$(PRJDIR)/gui.src
+CPPFLAGS = @CPPFLAGS@ -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) \
+ -I$(top_srcdir)/cmd.src -I$(top_srcdir)/gui.src
CFLAGS = @CFLAGS@ -Wall
CXXFLAGS = @CXXFLAGS@ -Wall
M_OR_MM = @M_OR_MM@
man2dir = $(mandir)/man2
infodir = @infodir@
srcdir = @srcdir@
+VPATH = @srcdir@
OBJECTS = stack.o mem.o sim.o itsrc.o brk.o arg.o \
guiobj.o uc.o hw.o
# ------------------------------------------
all: checkconf sim_lib
-test_mem_speed: $(PRJDIR)/lib*.a test_mem_speed.o
- $(CXX) -o $@ test_mem_speed.o -L$(PRJDIR) -Wl,--start-group -lsim -lutil -lcmd -Wl,--end-group
+test_mem_speed: $(top_builddir)lib*.a test_mem_speed.o
+ $(CXX) -o $@ test_mem_speed.o -L$(top_builddir) -Wl,--start-group -lsim -lutil -lcmd -Wl,--end-group
sim.src: all
# ---------------------
dep: main.dep
-Makefile.dep: *.cc *.h
- $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
+Makefile.dep: $(srcdir)/*.cc $(srcdir)/*.h
+ $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $^ >Makefile.dep
include Makefile.dep
-include clean.mk
+include $(srcdir)/clean.mk
#parser.cc: parser.y
# My rules
# --------
-sim_lib: $(PRJDIR)/libsim.a
+sim_lib: $(top_builddir)libsim.a
-$(PRJDIR)/libsim.a: $(OBJECTS)
+$(top_builddir)libsim.a: $(OBJECTS)
ar -rcu $*.a $(OBJECTS)
$(RANLIB) $*.a
# Remaking configuration
# ----------------------
checkconf:
- @if [ -f $(PRJDIR)/devel ]; then\
- $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
+ @if [ -f $(top_builddir)devel ]; then\
+ $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
fi
# End of sim.src/Makefile
freshconf: Makefile
-Makefile: $(srcdir)/Makefile.in $(PRJDIR)/configure.in
- cd $(PRJDIR) && $(SHELL) ./config.status
+Makefile: $(srcdir)/Makefile.in $(top_builddir)configure.in
+ cd $(top_builddir) && $(SHELL) ./config.status
# End of conf.mk
INSTALL = @INSTALL@
STRIP = @STRIP@
-PRJDIR = ..
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
EXEEXT = @EXEEXT@
DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
-CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) \
- -I$(PRJDIR)/cmd.src -I$(PRJDIR)/sim.src -I$(PRJDIR)/gui.src
+CPPFLAGS = @CPPFLAGS@ -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) \
+ -I$(top_srcdir)/cmd.src -I$(top_srcdir)/sim.src \
+ -I$(top_srcdir)/gui.src
CFLAGS = @CFLAGS@ -Wall
CXXFLAGS = @CXXFLAGS@ -Wall
M_OR_MM = @M_OR_MM@
-LIBS = @LIBS@ -L$(PRJDIR) -lsim -lutil -lguiucsim -lcmd -lsim
+LIBS = @LIBS@ -L$(top_builddir) -lsim -lutil -lguiucsim -lcmd -lsim
prefix = @prefix@
exec_prefix = @exec_prefix@
man2dir = $(mandir)/man2
infodir = @infodir@
srcdir = @srcdir@
+VPATH = @srcdir@
OBJECTS = sxa.o glob.o \
inst.o \
# ---------------------
dep: Makefile.dep
-Makefile.dep: *.cc *.h
- $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
+Makefile.dep: $(srcdir)/*.cc $(srcdir)/*.h
+ $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $^ >Makefile.dep
include Makefile.dep
-include clean.mk
+include $(srcdir)/clean.mk
# My rules
# --------
xa.src: sxa$(EXEEXT)
-sxa$(EXEEXT): $(OBJECTS) $(PRJDIR)/*.a
+sxa$(EXEEXT): $(OBJECTS) $(top_builddir)*.a
$(CXX) $(CXXFLAGS) -o $@ $(OBJECTS) $(LIBS)
otherlibs:
- cd $(PRJDIR)/cmd.src && $(MAKE) all
- cd $(PRJDIR)/sim.src && $(MAKE) all
+ $(MAKE) -C $(top_builddir)cmd.src all
+ $(MAKE) -C $(top_builddir)sim.src all
.cc.o:
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
# Remaking configuration
# ----------------------
checkconf:
- @if [ -f $(PRJDIR)/devel ]; then\
- $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
+ @if [ -f $(top_builddir)devel ]; then\
+ $(MAKE) -f $(srcdir)/conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
fi
# End of xa.src/Makefile.in
freshconf: Makefile
-Makefile: $(srcdir)/Makefile.in $(PRJDIR)/configure.in
- cd $(PRJDIR) && $(SHELL) ./config.status
+Makefile: $(srcdir)/Makefile.in $(top_srcdir)/configure.in
+ cd $(top_builddir) && $(SHELL) ./config.status
# End of xa.src/conf.mk
INSTALL = @INSTALL@
STRIP = @STRIP@
-PRJDIR = ..
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
-CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) \
- -I$(PRJDIR)/cmd.src -I$(PRJDIR)/sim.src -I$(PRJDIR)/gui.src
+CPPFLAGS = @CPPFLAGS@ -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) \
+ -I$(top_srcdir)/cmd.src -I$(top_srcdir)/sim.src \
+ -I$(top_srcdir)/gui.src
CFLAGS = @CFLAGS@ -Wall
CXXFLAGS = @CXXFLAGS@ -Wall
M_OR_MM = @M_OR_MM@
SHAREDLIB = @SHAREDLIB@
EXEEXT = @EXEEXT@
-LIBS = @LIBS@ -L$(PRJDIR) -lsim -lutil -lguiucsim -lcmd -lsim
+LIBS = @LIBS@ -L$(top_builddir) -lsim -lutil -lguiucsim -lcmd -lsim
DL = @DL@
dl_ok = @dl_ok@
man2dir = $(mandir)/man2
infodir = @infodir@
srcdir = @srcdir@
+VPATH = @srcdir@
OBJECTS_SHARED = glob.o \
inst.o \
# ---------------------
dep: Makefile.dep
-Makefile.dep: *.cc *.h
- $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
+Makefile.dep: $(srcdir)/*.cc $(srcdir)/*.h
+ $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.cc,$^) >Makefile.dep
include Makefile.dep
-include clean.mk
+include $(srcdir)/clean.mk
# My rules
# --------
z80.src: sz80$(EXEEXT) shared_lib
-sz80$(EXEEXT): $(OBJECTS) $(PRJDIR)/*.a
+sz80$(EXEEXT): $(OBJECTS) $(top_builddir)*.a
$(CXX) $(CXXFLAGS) -o $@ $(OBJECTS) $(LIBS)
ifeq ($(dlso_ok),yes)
-shared_lib: $(PRJDIR)/sz80.so
+shared_lib: $(top_builddir)sz80.so
else
shared_lib:
- @$(PRJDIR)/mkecho $(PRJDIR) "No z80 shared lib made."
- @$(PRJDIR)/mkecho $(PRJDIR) "(SHAREDLIB="$(SHAREDLIB)",dl_ok="$(dl_ok)",enable_dlso="$(enable_dlso)")"
+ @$(top_srcdir)/mkecho $(top_builddir) "No z80 shared lib made."
+ @$(top_srcdir)/mkecho $(top_builddir) "(SHAREDLIB="$(SHAREDLIB)",dl_ok="$(dl_ok)",enable_dlso="$(enable_dlso)")"
endif
-$(PRJDIR)/sz80.so: $(OBJECTS_SHARED)
- $(CXX) -shared $(OBJECTS_SHARED) -o $(PRJDIR)/sz80.so
+$(top_builddir)sz80.so: $(OBJECTS_SHARED)
+ $(CXX) -shared $(OBJECTS_SHARED) -o $(top_builddir)sz80.so
otherlibs:
- cd $(PRJDIR)/cmd.src && $(MAKE) all
- cd $(PRJDIR)/sim.src && $(MAKE) all
+ $(MAKE) -C $(top_builddir)cmd.src all
+ $(MAKE) -C $(top_builddir)sim.src all
.cc.o:
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
# Remaking configuration
# ----------------------
checkconf:
- @if [ -f $(PRJDIR)/devel ]; then\
- $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
+ @if [ -f $(top_builddir)devel ]; then\
+ $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
fi
# End of z80.src/Makefile.in
freshconf: Makefile
-Makefile: $(srcdir)/Makefile.in $(PRJDIR)/configure.in
- cd $(PRJDIR) && $(SHELL) ./config.status
+Makefile: $(srcdir)/Makefile.in $(top_srcdir)/configure.in
+ cd $(top_builddir) && $(SHELL) ./config.status
# End of z80.src/conf.mk
#
#
-PRJDIR = ..
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
+VPATH = @srcdir@
-include $(PRJDIR)/Makefile.common
+include $(top_builddir)Makefile.common
USE_ALT_LEX = 0
LIBS = -lm @LIBS@
#CFLAGS += -Werror
+CPPFLAGS += -I$(srcdir)
ifdef SDCC_SUB_VERSION
CFLAGS += -DSDCC_SUB_VERSION_STR=\"$(SDCC_SUB_VERSION)\"
SLIBSOURCES = $(patsubst %.o,$(SLIB)/%.c,$(SLIBOBJS))
SOURCES = $(patsubst %.o,%.c,$(OBJECTS))
-TARGET = $(PRJDIR)/bin/sdcc$(EXEEXT)
+TARGET = $(top_builddir)bin/sdcc$(EXEEXT)
# Compiling entire program or any subproject
# ------------------------------------------
all: checkconf version.h $(TARGET)
$(PORT_LIBS): FORCE
- $(MAKE) -C `dirname $@`
-
+ $(MAKE) -C $(dir $@)
+
FORCE:
-$(PRJDIR)/support/gc/libgc.a:
- cd $(PRJDIR)/support/gc && $(MAKE)
+$(top_builddir)support/gc/libgc.a:
+ $(MAKE) -C $(top_builddir)support/gc
# Compiling and installing everything and runing test
# ---------------------------------------------------
# ---------------------
dep: version.h Makefile.dep
-Makefile.dep: version.h $(SOURCES) $(SLIBSOURCES) $(SPECIAL) *.h $(PRJDIR)/*.h
- $(CPP) $(CPPFLAGS) $(M_OR_MM) $(SOURCES) $(SLIBSOURCES) >Makefile.dep
+Makefile.dep: version.h $(SOURCES) $(SLIBSOURCES) $(SPECIAL)
+ $(CPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.c,$^) >Makefile.dep
-include Makefile.dep
-include clean.mk
+# don't include Makefile.dep for the listed targets:
+ifeq "$(findstring $(MAKECMDGOALS),uninstall check installcheck installdirs checkconf \
+ clean distclean mostlyclean realclean)" ""
+ include Makefile.dep
+endif
+include $(srcdir)/clean.mk
# My rules
$(LEX) -t $< >$@
version.h: ../ChangeLog
- $(AWK) -f version.awk $< > $@
+ $(AWK) -f $(srcdir)/version.awk $< > $@
.y.c:
rm -f $*.cc $*.h
# Remaking configuration
# ----------------------
checkconf:
- @if [ -f $(PRJDIR)/devel ]; then\
- $(MAKE) -f $(srcdir)/conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" \
+ @if [ -f $(top_builddir)devel ]; then\
+ $(MAKE) -f $(srcdir)/conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" \
freshconf;\
fi
+++ /dev/null
-# Make all in this directory
-include ../port.mk
--- /dev/null
+VPATH = @srcdir@
+srcdir = @srcdir@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# Make all in this directory
+include $(srcdir)/../port.mk
-CLEANALLPORTS = avr ds390 izt mcs51 pic pic16 z80 xa51
-PRJDIR = ..
+CLEANALLPORTS = avr ds390 ds400 hc08 izt mcs51 pic pic16 z80 xa51
# Deleting all files created by building the program
# --------------------------------------------------
rm -f *core *[%~] *.[oa] *.output
rm -f .[a-z]*~ \#*
rm -f version.h
- rm -f $(PRJDIR)/bin/sdcc$(EXEEXT) sdcc$(EXEEXT)
+ rm -f $(top_builddir)bin/sdcc$(EXEEXT) sdcc$(EXEEXT)
for port in $(CLEANALLPORTS) ; do\
- $(MAKE) -C $$port -f ../port-clean.mk clean ;\
+ if [ -f $$port/Makefile ]; then\
+ $(MAKE) -C $$port clean ;\
+ fi\
done
# -----------------------------------------------------------------
distclean: clean
rm -f Makefile *.dep
+ for port in $(CLEANALLPORTS) ; do\
+ if [ -f $$port/Makefile ]; then\
+ $(MAKE) -C $$port distclean ;\
+ fi\
+ done
# Like clean but some files may still exist
freshconf: Makefile
-Makefile: $(srcdir)/Makefile.in $(PRJDIR)/configure.in
- cd $(PRJDIR) && $(SHELL) ./config.status
+Makefile: $(srcdir)/Makefile.in $(top_srcdir)/configure.in
+ cd $(top_builddir) && $(SHELL) ./config.status
# End of conf.mk
+++ /dev/null
-# Make all in this directory
-include ../port.mk
--- /dev/null
+VPATH = @srcdir@
+srcdir = @srcdir@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# Make all in this directory
+include $(srcdir)/../port.mk
+++ /dev/null
-# Make all in this directory
-include ../port.mk
--- /dev/null
+VPATH = @srcdir@
+srcdir = @srcdir@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# Make all in this directory
+include $(srcdir)/../port.mk
+++ /dev/null
-# Make all in this directory
-include ../port.mk
--- /dev/null
+VPATH = @srcdir@
+srcdir = @srcdir@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# Make all in this directory
+include $(srcdir)/../port.mk
+srcdir = .
+top_builddir = ../../
+top_srcdir = ../..
+
# Make all in this directory
include ../port.mk
+++ /dev/null
-# Make all in this directory
-include ../port.mk
--- /dev/null
+VPATH = @srcdir@
+srcdir = @srcdir@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# Make all in this directory
+include $(srcdir)/../port.mk
+++ /dev/null
-# Make all in this directory
-PORT = pic
-
-include ../port.mk
--- /dev/null
+VPATH = @srcdir@
+srcdir = @srcdir@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# Make all in this directory
+PORT = pic
+
+include $(srcdir)/../port.mk
+++ /dev/null
-# Make all in this directory
-include ../port.mk
--- /dev/null
+VPATH = @srcdir@
+srcdir = @srcdir@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# Make all in this directory
+include $(srcdir)/../port.mk
Current pic16 port status is: Development
Some things may change without notification between port updates. The latest
-CVS snapshot is guarenteed to compile without problems, but does not
+SVN snapshot is guarenteed to compile without problems, but does not
guarantee backwards compatibility.
For any questions please ask the current port
rm -f $(LIB) *.o *~ port.a *.lst *.asm *.sym *~ *.cdb *.dep *.rul
distclean: clean
-
+ rm -f Makefile
\ No newline at end of file
# PREBUILD - list of special files to build before deps.
# Ports are always located in sdcc/src/<portname>
-PRJDIR = ../..
+
# Output
LIB = port.a
# Include the sdcc/src directory
-INCLUDEFLAGS = -I..
+INCLUDEFLAGS = -I$(srcdir)/.. -I..
# If the sources aren't specified, assume all in this directory.
ifndef SOURCES
-SOURCES = $(wildcard *.c)
+SOURCES = $(notdir $(wildcard $(srcdir)/*.c))
endif
# If the peephole rules aren't specified, assume all.
ifndef PEEPRULES
-PEEPDEFS = $(wildcard *.def)
+PEEPDEFS = $(notdir $(wildcard $(srcdir)/*.def))
PEEPRULES = $(PEEPDEFS:.def=.rul)
endif
all: $(PREBUILD) dep $(LIB)
-include $(PRJDIR)/Makefile.common
+include $(top_builddir)Makefile.common
$(LIB): $(OBJ)
rm -f $(LIB)
$(RANLIB) $(LIB)
%.rul: %.def
- $(AWK) -f ../SDCCpeeph.awk $< > $@
+ $(AWK) -f $(srcdir)/../SDCCpeeph.awk $< > $@
dep: Makefile.dep
-Makefile.dep: $(PREBUILD) Makefile $(SOURCES) $(SPECIAL) *.h $(PRJDIR)/*.h $(PRJDIR)/src/*.h
- $(CPP) $(CPPFLAGS) $(M_OR_MM) $(SOURCES) >Makefile.dep
+Makefile.dep: $(PREBUILD) Makefile $(SOURCES) $(SPECIAL)
+ $(CPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.c,$^) >Makefile.dep
-include Makefile.dep
+# don't include Makefile.dep for the listed targets:
+ifeq "$(findstring $(MAKECMDGOALS),clean distclean)" ""
+ include Makefile.dep
+endif
-include ../port-clean.mk
+include $(srcdir)/../port-clean.mk
+++ /dev/null
-# Make all in this directory
-include ../port.mk
--- /dev/null
+VPATH = @srcdir@
+srcdir = @srcdir@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# Make all in this directory
+include $(srcdir)/../port.mk
+++ /dev/null
-# Make all in this directory
-include ../port.mk
--- /dev/null
+VPATH = @srcdir@
+srcdir = @srcdir@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# Make all in this directory
+include $(srcdir)/../port.mk
#Boston MA 02111-1307, USA.
EXEEXT = @EXEEXT@
-PRJDIR = ../..
-TARGET = $(PRJDIR)/bin/sdcpp$(EXEEXT)
+TARGET = ../../bin/sdcpp$(EXEEXT)
+
+VPATH = @srcdir@
# This is the default target.
all: $(TARGET)
transform = @program_transform_name@
# Top build directory, relative to here.
-top_builddir = .
+top_builddir = @top_builddir@
# Whether we were configured with NLS.
USE_NLS = @USE_NLS@
distclean: clean
-rm -f auto-host.h auto-build.h cstamp-h Makefile
- -rm -f config.status config.run config.cache config.bak config.log *~
+ -rm -f configargs.h config.status config.run config.cache config.bak config.log *~
# This tells GNU Make version 3 not to put all variables in the environment.
.NOEXPORT:
#@build_overrides@
#\f
-INCLUDES = -I$(srcdir) -I$(LIBIBERTY_DIR)
+INCLUDES = -I$(srcdir) -I$(LIBIBERTY_DIR) -I.
# Always use -I$(srcdir)/config when compiling.
.c.o:
lbasename.o
$(TARGET): cppmain.o intl.o $(MY_LIBIBERTY_BITS) libcpp.a $(LIBDEPS)
+ mkdir -p $(dir $@)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cppmain.o \
$(MY_LIBIBERTY_BITS) libcpp.a $(LIBS)
-PRJDIR = ../..
-
# Deleting all files created by building the program
# --------------------------------------------------
clean:
rm -f *core *[%~] *.[oa]
rm -f .[a-z]*~
- rm -f $(PRJDIR)/bin/sdcpp$(EXEEXT)
+ rm -f $(top_builddir)bin/sdcpp$(EXEEXT)
# Deleting all files created by configuring or building the program
+++ /dev/null
-PRJDIR = ../..
-
-include $(PRJDIR)/Makefile.common
-
-CFLAGS += -Wall
-
-OBJECTS = sdcclib.o
-
-SOURCES = $(patsubst %.o,%.c,$(OBJECTS))
-
-TARGET = $(PRJDIR)/bin/sdcclib$(EXEEXT)
-
-all: $(TARGET)
-
-install: all installdirs
- $(INSTALL) $(TARGET) `echo $(DESTDIR)$(bindir)/sdcclib$(EXEEXT)|sed '$(transform)'`
- $(STRIP) `echo $(DESTDIR)$(bindir)/sdcclib$(EXEEXT)|sed '$(transform)'`
-
-# Deleting all the installed files
-# --------------------------------
-uninstall:
- rm -f $(DESTDIR)$(bindir)/sdcclib$(EXEEXT)
-
-# Performing self-test
-# --------------------
-check:
-
-
-# Performing installation test
-# ----------------------------
-installcheck:
-
-
-# Creating installation directories
-# ---------------------------------
-installdirs:
- $(INSTALL) -d $(DESTDIR)$(bindir)
-
-
-# Creating dependencies
-# ---------------------
-dep:
-
-$(TARGET): $(OBJECTS)
- $(CC) $(LDFLAGS) -o $@ $(OBJECTS)
-
-.c.o:
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
-
-
-checkconf:
-
-include clean.mk
--- /dev/null
+VPATH = @srcdir@
+srcdir = @srcdir@
+top_builddir = @top_builddir@
+
+include $(top_builddir)Makefile.common
+
+CFLAGS += -Wall
+
+OBJECTS = sdcclib.o
+
+SOURCES = $(patsubst %.o,%.c,$(OBJECTS))
+
+TARGET = $(top_builddir)bin/sdcclib$(EXEEXT)
+
+all: $(TARGET)
+
+install: all installdirs
+ $(INSTALL) $(TARGET) `echo $(DESTDIR)$(bindir)/sdcclib$(EXEEXT)|sed '$(transform)'`
+ $(STRIP) `echo $(DESTDIR)$(bindir)/sdcclib$(EXEEXT)|sed '$(transform)'`
+
+# Deleting all the installed files
+# --------------------------------
+uninstall:
+ rm -f $(DESTDIR)$(bindir)/sdcclib$(EXEEXT)
+
+# Performing self-test
+# --------------------
+check:
+
+
+# Performing installation test
+# ----------------------------
+installcheck:
+
+
+# Creating installation directories
+# ---------------------------------
+installdirs:
+ $(INSTALL) -d $(DESTDIR)$(bindir)
+
+
+# Creating dependencies
+# ---------------------
+dep:
+
+$(TARGET): $(OBJECTS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJECTS)
+
+.c.o:
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+
+checkconf:
+
+include $(srcdir)/clean.mk
-PRJDIR = ../..
-
clean:
rm -f *core *[%~] *.[oa] *.output
rm -f .[a-z]*~ \#*
- rm -f $(PRJDIR)/bin/sdcclib$(EXEEXT)
+ rm -f $(top_builddir)bin/sdcclib$(EXEEXT)
distclean realclean: clean
+ rm -f Makefile
+++ /dev/null
-PRJDIR = ../..
-
-SOURCES = makebin.c
-BIN = $(PRJDIR)/bin/makebin$(EXEEXT)
-
-include $(PRJDIR)/Makefile.common
-
-all: $(BIN)
-
-$(BIN): $(OBJ)
- $(CC) $(LDFLAGS) -o $(BIN) $(OBJ)
-
-install: all
- mkdir -p $(DESTDIR)$(bindir)
- $(INSTALL) $(BIN) `echo $(DESTDIR)$(bindir)/makebin$(EXEEXT)|sed '$(transform)'`
- $(STRIP) `echo $(DESTDIR)$(bindir)/makebin$(EXEEXT)|sed '$(transform)'`
-
-uninstall:
- rm -f $(DESTDIR)$(bindir)/makebin$(EXEEXT)
-
-include clean.mk
--- /dev/null
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+top_builddir = @top_builddir@
+
+SOURCES = makebin.c
+BIN = $(top_builddir)bin/makebin$(EXEEXT)
+
+include $(top_builddir)Makefile.common
+
+all: $(BIN)
+
+$(BIN): $(OBJ)
+ mkdir -p $(top_builddir)bin
+ $(CC) $(LDFLAGS) -o $(BIN) $(OBJ)
+
+install: all
+ mkdir -p $(DESTDIR)$(bindir)
+ $(INSTALL) $(BIN) `echo $(DESTDIR)$(bindir)/makebin$(EXEEXT)|sed '$(transform)'`
+ $(STRIP) `echo $(DESTDIR)$(bindir)/makebin$(EXEEXT)|sed '$(transform)'`
+
+uninstall:
+ rm -f $(DESTDIR)$(bindir)/makebin$(EXEEXT)
+
+include $(srcdir)/clean.mk
# Deleting all files created by building the program
# --------------------------------------------------
-PRJDIR = ../..
-
clean:
rm -rf obj
- rm -f *core *[%~] *.[oa] $(PRJDIR)/bin/makebin$(EXEEXT)
+ rm -f *core *[%~] *.[oa] $(top_builddir)bin/makebin$(EXEEXT)
rm -f *.[a-z]*~
# Deleting all files created by configuring or building the program
# -----------------------------------------------------------------
distclean: clean
- rm -f *.dep
+ rm -f Makefile *.dep
# Like clean but some files may still exist
# one of the library files should cause all to re-run
# Dependancies:
-# * The sdcc-extra package, available from Subversion.
-# o svn co https://svn.sourceforge.net/svnroot/sdcc/trunk/sdcc-extra sdcc-extra
+# * The sdcc-extra package, available from svn.
+# o svn co https://svn.sourceforge.net/svnroot/sdcc/trunk/sdcc-extra
# o Provides the emulators
# * The gbdk-lib package from gbdk.
# o cvs -d cvs.gbdk.sourceforge.net:/cvsroot/gbdk co gbdk-lib
CC = @CC@
+# support VPATH:
+VPATH = @srcdir@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
+
# All original tests live in TESTS_DIR and below
-TESTS_DIR = tests
+TESTS_DIR = $(srcdir)/tests
TESTS_NAME = $(TESTS_DIR)
# All suite results go in RESULTS_DIR
RESULTS_DIR = results
# All data relating to supported ports live in their own directory
# under PORTS_DIR.
-PORTS_DIR = ports
+PORTS_DIR = $(srcdir)/ports
# Itermediate data directories
# Directory that generated cases and the related object code go.
CASES_DIR = gen
# Script that takes a source test suite and generates the iterations
-GENERATE_CASES = generate-cases.py
+GENERATE_CASES = $(srcdir)/generate-cases.py
# Magically generate the list of configured ports to test.
# Each directory under ports/ is used as a port name. Each port is tested.
# Each test generates a result log file
PORT_RESULTS = $(ALL_TESTS:$(TESTS_DIR)/%.c=$(PORT_RESULTS_DIR)/%.out)
-SDCC_DIR = ../..
-SDCC_EXTRA_DIR = ../../../sdcc-extra
-INC_DIR = $(SDCC_DIR)/device/include
+SDCC_EXTRA_DIR = $(top_builddir)../sdcc-extra
+INC_DIR = $(top_srcdir)/device/include
# Defaults. Override in spec.mk if required.
# Path to SDCC
-SDCC = $(SDCC_DIR)/bin/sdcc
+SDCC = $(top_builddir)bin/sdcc
# Base flags.
SDCCFLAGS +=
# Extension of object intermediate files
make_library: $(MAKE_LIBRARY)
-SDCCFLAGS += -Ifwk/include -Itests -I$(INC_DIR)
+SDCCFLAGS += -I$(srcdir)/fwk/include -I$(srcdir)/tests -I$(INC_DIR)
# List of intermediate files to keep. Pretty much keep everything as
# disk space is free.
# Rule to generate the iterations of a test suite off the soure suite.
$(PORT_CASES_DIR)/%/iterations.stamp: $(TESTS_DIR)/%.c $(GENERATE_CASES)
- echo Processing $<
- rm -rf `dirname $@`
- mkdir -p `dirname $@`
- python $(GENERATE_CASES) $< `dirname $@` > /dev/null
+ echo Processing $(notdir $<)
+ rm -rf $(dir $@)
+ mkdir -p $(dir $@)
+ python $(GENERATE_CASES) $< $(dir $@) > /dev/null
touch $@
# Rule linking the combined results log to all of the files in the
# iteration directory.
$(PORT_RESULTS_DIR)/%.out: $(PORT_CASES_DIR)/%/iterations.stamp
- $(MAKE) iterations PORT=$(PORT) CASES=`dirname $<`
+ $(MAKE) iterations PORT=$(PORT) CASES=$(dir $<)
# Rule to summaries the results for one port after all of the tests
# have been run.
port-results: port-dirs $(PORT_RESULTS)
- echo Summary for \'$(PORT)\': `cat $(PORT_RESULTS) | python collate-results.py`
+ echo Summary for \'$(PORT)\': `cat $(PORT_RESULTS) | python $(srcdir)/collate-results.py`
echo
port-dirs:
# test
# List of all of the generated iteration source files.
-SUB_CASES = $(sort $(wildcard $(CASES)/*.c))
+SUB_CASES = $(sort $(wildcard $(CASES)*.c))
# List of all the sub result logs generated from the iterations.
SUB_RESULTS = $(SUB_CASES:%.c=%.out)
# Overall target. Concatenation of all of the sub results.
-RESULTS = $(CASES:$(CASES_DIR)/%$(DIREXT)=$(RESULTS_DIR)/%.out)
+RESULTS = $(CASES:$(CASES_DIR)/%/$(DIREXT)=$(RESULTS_DIR)/%.out)
iterations: $(RESULTS)
$(RESULTS): $(SUB_RESULTS)
cat $(SUB_RESULTS) > $@
-# The remainder of the rules are in $PORT/spec.mak. The port needs to
+# The remainder of the rules are in $PORT/spec.mk. The port needs to
# be able to turn an iterated test suite into a sub result, normally
# by:
# 1. Compile the required library files
# BeginGeneric rules
clean:
- rm -rf $(CASES_DIR) $(RESULTS_DIR) *.pyc fwk/lib/timeout fwk/lib/timeout.exe
+ rm -rf $(CASES_DIR) $(RESULTS_DIR) *.pyc
for i in $(CLEAN_PORTS); do $(MAKE) -f $(PORTS_DIR)/$$i/spec.mk _clean PORTS_DIR=$(PORTS_DIR) PORT=$$i; done
+
+distclean: clean
+ rm -f Makefile
# Port specification for the ds390 port running with uCsim
# path to uCsim
-S51A = $(SDCC_DIR)/sim/ucsim/s51.src/s51
-S51B = $(SDCC_DIR)/bin/s51
+S51A = $(top_builddir)sim/ucsim/s51.src/s51
+S51B = $(top_builddir)bin/s51
S51 = $(shell if [ -f $(S51A) ]; then echo $(S51A); else echo $(S51B); fi)
-SDCCFLAGS +=-mds390 --nostdinc --less-pedantic -DREENTRANT=reentrant -Wl-r
+SDCCFLAGS +=-mds390 --nostdinc --less-pedantic -DREENTRANT=reentrant -Wl-r -I$(top_srcdir)
LINKFLAGS = --nostdlib
LINKFLAGS += libds390.lib libsdcc.lib liblong.lib libint.lib libfloat.lib
-LIBDIR = $(SDCC_DIR)/device/lib/build/ds390
+LIBDIR = $(top_builddir)device/lib/build/ds390
OBJEXT = .rel
EXEEXT = .ihx
-EXTRAS = $(PORTS_DIR)/$(PORT)/testfwk$(OBJEXT) $(PORTS_DIR)/$(PORT)/support$(OBJEXT)
+EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT)
# Rule to link into .ihx
%$(EXEEXT): %$(OBJEXT) $(EXTRAS)
%$(OBJEXT): %.c
$(SDCC) $(SDCCFLAGS) -c $< -o $@
-$(PORTS_DIR)/$(PORT)/testfwk$(OBJEXT): fwk/lib/testfwk.c
+$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.c
+ $(SDCC) $(SDCCFLAGS) -c $< -o $@
+
+$(PORT_CASES_DIR)/%$(OBJEXT): fwk/lib/%.c
$(SDCC) $(SDCCFLAGS) -c $< -o $@
# run simulator with 25 seconds timeout
-%.out: %$(EXEEXT) fwk/lib/timeout
- mkdir -p `dirname $@`
- -fwk/lib/timeout 25 $(S51) -tds390f -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/ds390/uCsim.cmd > $(@:.out=.sim) || \
+%.out: %$(EXEEXT) $(CASES_DIR)/timeout
+ mkdir -p $(dir $@)
+ -$(CASES_DIR)/timeout 25 $(S51) -tds390f -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/ds390/uCsim.cmd > $(@:.out=.sim) || \
echo -e --- FAIL: \"timeout, simulation killed\" in $(<:$(EXEEXT)=.c)"\n"--- Summary: 1/1/1: timeout >> $@
- python get_ticks.py < $(@:.out=.sim) >> $@
+ python $(srcdir)/get_ticks.py < $(@:.out=.sim) >> $@
-grep -n FAIL $@ /dev/null || true
-fwk/lib/timeout: fwk/lib/timeout.c
-
+$(CASES_DIR)/timeout: fwk/lib/timeout.c
+ $(CC) $< -o $@
_clean:
- rm -f fwk/lib/timeout fwk/lib/timeout.exe $(PORTS_DIR)/$(PORT)/*.rel $(PORTS_DIR)/$(PORT)/*.rst \
- $(PORTS_DIR)/$(PORT)/*.lst $(PORTS_DIR)/$(PORT)/*.sym $(PORTS_DIR)/$(PORT)/*.asm \
- $(PORTS_DIR)/$(PORT)/*.lnk $(PORTS_DIR)/$(PORT)/*.map $(PORTS_DIR)/$(PORT)/*.mem
-
SDCCFLAGS +=-mgbz80 --nostdinc --less-pedantic -DREENTRANT=
LINKFLAGS = --nostdlib
LINKFLAGS += gbz80.lib
-LIBDIR = $(SDCC_DIR)/device/lib/build/gbz80
+LIBDIR = $(top_builddir)device/lib/build/gbz80
EXEEXT = .gb
# Needs parts of gbdk-lib, namely the internal mul/div/mod functions.
-EXTRAS = ports/$(PORT)/testfwk$(OBJEXT) ports/$(PORT)/support$(OBJEXT)
+EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT)
# Rule to link into .ihx
%.gb: %.c $(EXTRAS)
$(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L $(LIBDIR) $(EXTRAS) $< -o $@
-%$(OBJEXT): %.asm
- ../../bin/as-gbz80 -plosgff $@ $<
-
-%$(OBJEXT): %.s
+$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.asm
../../bin/as-gbz80 -plosgff $@ $<
%$(OBJEXT): %.c
- echo $(OBJEXT)
$(SDCC) $(SDCCFLAGS) -c $< -o $@
-ports/$(PORT)/%$(OBJEXT): fwk/lib/%.c
+$(PORT_CASES_DIR)/%$(OBJEXT): fwk/lib/%.c
$(SDCC) $(SDCCFLAGS) -c $< -o $@
# PENDING: Path to sdcc-extra
%.out: %$(EXEEXT)
- mkdir -p `dirname $@`
+ mkdir -p $(dir $@)
$(EMU) -k -m $< > $@
-grep -n FAIL $@ /dev/null || true
_clean:
- rm -f ports/$(PORT)/testfwk.asm ports/$(PORT)/*.lst ports/$(PORT)/*.o ports/$(PORT)/*.sym
-
# path to uCsim
-UCHC08A = $(SDCC_DIR)/sim/ucsim/hc08.src/shc08
-UCHC08B = $(SDCC_DIR)/bin/shc08
+UCHC08A = $(top_builddir)sim/ucsim/hc08.src/shc08
+UCHC08B = $(top_builddir)bin/shc08
UCHC08 = $(shell if [ -f $(UCHC08A) ]; then echo $(UCHC08A); else echo $(UCHC08B); fi)
-SDCCFLAGS +=-mhc08 --nostdinc --less-pedantic --out-fmt-ihx -DREENTRANT=reentrant
+SDCCFLAGS +=-mhc08 --nostdinc --less-pedantic --out-fmt-ihx -DREENTRANT=reentrant -I$(top_srcdir)
LINKFLAGS = --nostdlib
LINKFLAGS += hc08.lib
-LIBDIR = $(SDCC_DIR)/device/lib/build/hc08
+LIBDIR = $(top_builddir)device/lib/build/hc08
OBJEXT = .rel
EXEEXT = .ihx
-EXTRAS = $(PORTS_DIR)/$(PORT)/testfwk$(OBJEXT) $(PORTS_DIR)/$(PORT)/support$(OBJEXT)
+EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT)
# Rule to link into .ihx
#%$(EXEEXT): %$(OBJEXT) $(EXTRAS)
$(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L $(LIBDIR) $(EXTRAS) $< -o $@
%$(OBJEXT): %.asm
- $(SDCC_DIR)/bin/as-hc08 -plosgff $<
+ $(top_builddir)bin/as-hc08 -plosgff $<
%$(OBJEXT): %.c
$(SDCC) $(SDCCFLAGS) -c $< -o $@
-$(PORTS_DIR)/$(PORT)/%$(OBJEXT): fwk/lib/%.c
+$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.c
+ $(SDCC) $(SDCCFLAGS) -c $< -o $@
+
+$(PORT_CASES_DIR)/%$(OBJEXT): fwk/lib/%.c
$(SDCC) $(SDCCFLAGS) -c $< -o $@
# run simulator with 10 seconds timeout
-%.out: %$(EXEEXT) fwk/lib/timeout
- mkdir -p `dirname $@`
- -fwk/lib/timeout 10 $(UCHC08) $< < $(PORTS_DIR)/$(PORT)/uCsim.cmd > $@ \
+%.out: %$(EXEEXT) $(CASES_DIR)/timeout
+ mkdir -p $(dir $@)
+ -$(CASES_DIR)/timeout 10 $(UCHC08) $< < $(PORTS_DIR)/$(PORT)/uCsim.cmd > $@ \
|| echo -e --- FAIL: \"timeout, simulation killed\" in $(<:$(EXEEXT)=.c)"\n"--- Summary: 1/1/1: timeout >> $@
- python get_ticks.py < $@ >> $@
+ python $(srcdir)/get_ticks.py < $@ >> $@
-grep -n FAIL $@ /dev/null || true
-fwk/lib/timeout: fwk/lib/timeout.c
+$(CASES_DIR)/timeout: fwk/lib/timeout.c
+ $(CC) $< -o $@
_clean:
- rm -f ports/$(PORT)/*.asm ports/$(PORT)/*.lst ports/$(PORT)/*.rel ports/$(PORT)/*.sym
-
# Port specification for compiling on the host machines version of gcc
SDCC = $(shell ( sh -c "gcc --version" 2>&1 ) > /dev/null && echo gcc || echo cc)
-SDCCFLAGS = -DPORT_HOST=1 -Wall -fsigned-char -fpack-struct -DREENTRANT=
+SDCCFLAGS = -DPORT_HOST=1 -Wall -fsigned-char -fpack-struct -DREENTRANT= -I$(top_builddir) -I$(top_srcdir)
EXEEXT = .bin
OBJEXT = .o
INC_DIR = .
-# otherwise `make` deletes it and `make -j`will fail
-.PRECIOUS: ports/$(PORT)/testfwk$(OBJEXT)
+# otherwise `make` deletes testfwk.o and `make -j` will fail
+.PRECIOUS: $(PORT_CASES_DIR)/%$(OBJEXT)
# Required extras
-EXTRAS = ports/$(PORT)/testfwk$(OBJEXT) ports/$(PORT)/support$(OBJEXT)
+EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT)
%.out: %$(EXEEXT)
- mkdir -p `dirname $@`
+ mkdir -p $(dir $@)
-$< > $@
-grep -n FAIL $@ /dev/null || true
%$(OBJEXT): %.c
$(SDCC) $(SDCCFLAGS) -c $< -o $@
-ports/$(PORT)/%$(OBJEXT): fwk/lib/%.c
+$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.c
$(SDCC) $(SDCCFLAGS) -c $< -o $@
-_clean:
- rm -f ports/$(PORT)/support.o ports/$(PORT)/testfwk$(OBJEXT)
+$(PORT_CASES_DIR)/%$(OBJEXT): fwk/lib/%.c
+ $(SDCC) $(SDCCFLAGS) -c $< -o $@
+_clean:
SDCCFLAGS +=--model-large
-# copy support.c
-$(PORTS_DIR)/$(PORT)/%.c: $(PORTS_DIR)/mcs51/%.c
- cp $< $@
-
include $(PORTS_DIR)/mcs51/spec.mk
-LIBDIR = $(SDCC_DIR)/device/lib/build/large
+# use C sources from mcs51
+$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/mcs51/%.c
+ $(SDCC) $(SDCCFLAGS) -c $< -o $@
+
+LIBDIR = $(top_builddir)device/lib/build/large
SDCCFLAGS +=--model-medium
-# copy support.c
-$(PORTS_DIR)/$(PORT)/%.c: $(PORTS_DIR)/mcs51/%.c
- cp $< $@
-
include $(PORTS_DIR)/mcs51/spec.mk
-LIBDIR = $(SDCC_DIR)/device/lib/build/medium
+# use C sources from mcs51
+$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/mcs51/%.c
+ $(SDCC) $(SDCCFLAGS) -c $< -o $@
+
+LIBDIR = $(top_builddir)device/lib/build/medium
SDCCFLAGS +=--stack-auto
-# copy support.c
-$(PORTS_DIR)/$(PORT)/%.c: $(PORTS_DIR)/mcs51/%.c
- cp $< $@
-
include $(PORTS_DIR)/mcs51/spec.mk
-LIBDIR = $(SDCC_DIR)/device/lib/build/small-stack-auto
+# use C sources from mcs51
+$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/mcs51/%.c
+ $(SDCC) $(SDCCFLAGS) -c $< -o $@
+
+LIBDIR = $(top_builddir)device/lib/build/small-stack-auto
include $(PORTS_DIR)/mcs51/spec.mk
-LIBSRCDIR = ../../device/lib
-LIBDIR = gen/$(PORT)/lib
+LIBSRCDIR = $(top_srcdir)/device/lib
+LIBBUILDDIR = $(top_builddir)device/lib
+LIBDIR = $(PORT_CASES_DIR)/lib
LIBSDCCFLAGS+=--std-sdcc99 --stack-auto --xstack
SDCCFLAGS +=$(LIBSDCCFLAGS)
-# copy support.c
-$(PORTS_DIR)/$(PORT)/%.c: $(PORTS_DIR)/mcs51/%.c
- cp $< $@
+# use C sources from mcs51
+$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/mcs51/%.c
+ $(SDCC) $(SDCCFLAGS) -c $< -o $@
SOURCES = _atoi.c _atol.c _autobaud.c _bp.c _schar2fs.c \
_decdptr.c _divsint.c _divslong.c _divuint.c \
mkdir -p $(LIBDIR)
$(LIBDIR)/%.rel: $(LIBSRCDIR)/%.c
- -$(SDCC) -I../../device/include -I../../device/include/mcs51 $(LIBSDCCFLAGS) -c $< -o $@
+ -$(SDCC) -I$(top_srcdir)/device/include -I$(top_srcdir)/device/include/mcs51 $(LIBSDCCFLAGS) -c $< -o $@
.PHONY: lib-files
lib-files:
- make -C $(LIBSRCDIR)/mcs51 all
- cp $(LIBSRCDIR)/mcs51/*.rel $(LIBSRCDIR)/mcs51/mcs51.lib $(LIBDIR)
+ make -C $(LIBBUILDDIR)/mcs51 all
+ cp $(LIBBUILDDIR)/mcs51/*.rel $(LIBBUILDDIR)/mcs51/mcs51.lib $(LIBDIR)
echo $(MODULES) | tr ' ' '\n' > $(LIBDIR)/libsdcc.lib
touch $(LIBDIR)/libfloat.lib $(LIBDIR)/libint.lib $(LIBDIR)/liblong.lib
# model small
# path to uCsim
-S51A = $(SDCC_DIR)/sim/ucsim/s51.src/s51
-S51B = $(SDCC_DIR)/bin/s51
+S51A = $(top_builddir)sim/ucsim/s51.src/s51
+S51B = $(top_builddir)bin/s51
S51 = $(shell if [ -f $(S51A) ]; then echo $(S51A); else echo $(S51B); fi)
-SDCCFLAGS +=--nostdinc --less-pedantic -DREENTRANT=reentrant -I$(INC_DIR)/mcs51
+SDCCFLAGS +=--nostdinc --less-pedantic -DREENTRANT=reentrant -I$(INC_DIR)/mcs51 -I$(top_srcdir)
LINKFLAGS = --nostdlib
LINKFLAGS += mcs51.lib libsdcc.lib liblong.lib libint.lib libfloat.lib
-LIBDIR = $(SDCC_DIR)/device/lib/build/small
+LIBDIR = $(top_builddir)device/lib/build/small
OBJEXT = .rel
EXEEXT = .ihx
-EXTRAS = $(PORTS_DIR)/$(PORT)/testfwk$(OBJEXT) $(PORTS_DIR)/$(PORT)/support$(OBJEXT)
-FWKLIB = $(PORTS_DIR)/$(PORT)/T2_isr$(OBJEXT)
+EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT)
+FWKLIB = $(PORT_CASES_DIR)/T2_isr$(OBJEXT)
# Rule to link into .ihx
-%$(EXEEXT): %$(OBJEXT) $(EXTRAS) $(FWKLIB) $(PORTS_DIR)/$(PORT)/fwk.lib
- $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L $(LIBDIR) $(EXTRAS) $(PORTS_DIR)/$(PORT)/fwk.lib $< -o $@
+%$(EXEEXT): %$(OBJEXT) $(EXTRAS) $(FWKLIB) $(PORT_CASES_DIR)/fwk.lib
+ $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L $(LIBDIR) $(EXTRAS) $(PORT_CASES_DIR)/fwk.lib $< -o $@
%$(OBJEXT): %.c
$(SDCC) $(SDCCFLAGS) -c $< -o $@
-$(PORTS_DIR)/$(PORT)/testfwk$(OBJEXT): fwk/lib/testfwk.c
+$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.c
$(SDCC) $(SDCCFLAGS) -c $< -o $@
-$(PORTS_DIR)/$(PORT)/fwk.lib:
- cp $(PORTS_DIR)/mcs51/fwk.lib $(PORTS_DIR)/$(PORT)/fwk.lib
+$(PORT_CASES_DIR)/%$(OBJEXT): fwk/lib/%.c
+ $(SDCC) $(SDCCFLAGS) -c $< -o $@
+
+$(PORT_CASES_DIR)/fwk.lib:
+ cp $(PORTS_DIR)/mcs51/fwk.lib $@
# run simulator with 30 seconds timeout
-%.out: %$(EXEEXT) fwk/lib/timeout
- mkdir -p `dirname $@`
- -fwk/lib/timeout 30 $(S51) -t32 -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/mcs51/uCsim.cmd > $(@:.out=.sim) \
+%.out: %$(EXEEXT) gen/timeout
+ mkdir -p $(dir $@)
+ -gen/timeout 30 $(S51) -t32 -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/mcs51/uCsim.cmd > $(@:.out=.sim) \
|| echo -e --- FAIL: \"timeout, simulation killed\" in $(<:$(EXEEXT)=.c)"\n"--- Summary: 1/1/1: timeout >> $@
- python get_ticks.py < $(@:.out=.sim) >> $@
+ python $(srcdir)/get_ticks.py < $(@:.out=.sim) >> $@
-grep -n FAIL $@ /dev/null || true
-fwk/lib/timeout: fwk/lib/timeout.c
+gen/timeout: $(srcdir)/fwk/lib/timeout.c
+ $(CC) $< -o $@
_clean:
- rm -f fwk/lib/timeout fwk/lib/timeout.exe $(PORTS_DIR)/$(PORT)/*.rel $(PORTS_DIR)/$(PORT)/*.rst \
- $(PORTS_DIR)/$(PORT)/*.lst $(PORTS_DIR)/$(PORT)/*.sym $(PORTS_DIR)/$(PORT)/*.asm \
- $(PORTS_DIR)/$(PORT)/*.lnk $(PORTS_DIR)/$(PORT)/*.map $(PORTS_DIR)/$(PORT)/*.mem
GPSIM := gpsim
endif
-SDCCFLAGS += -mpic16 -pp18f452 -I$(SDCC_DIR)/device/include/pic16 --nostdinc --less-pedantic -Wl,-t255 -Wl,-q -DREENTRANT=reentrant
+SDCCFLAGS += -mpic16 -pp18f452 -I$(top_srcdir)/device/include/pic16 --nostdinc --less-pedantic -Wl,-t255 -Wl,-q -DREENTRANT=reentrant -I$(top_srcdir)
LINKFLAGS = --nostdlib
LINKFLAGS += libsdcc.lib libc18f.lib libm18f.lib
-LIBDIR = $(SDCC_DIR)/device/lib/build/pic16
+LIBDIR = $(top_builddir)device/lib/build/pic16
OBJEXT = .o
EXEEXT = .cod
-EXTRAS = $(PORTS_DIR)/$(PORT)/testfwk$(OBJEXT) $(PORTS_DIR)/$(PORT)/support$(OBJEXT)
+EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT)
# Rule to link into .ihx
%$(EXEEXT): %$(OBJEXT) $(EXTRAS)
%$(OBJEXT): %.c
$(SDCC) $(SDCCFLAGS) -c $< -o $@
-$(PORTS_DIR)/$(PORT)/testfwk$(OBJEXT): fwk/lib/testfwk.c
+$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.c
+ $(SDCC) $(SDCCFLAGS) -c $< -o $@
+
+$(PORT_CASES_DIR)/%$(OBJEXT): fwk/lib/%.c
$(SDCC) $(SDCCFLAGS) -c $< -o $@
# run simulator with 25 seconds timeout
-%.out: %$(EXEEXT) fwk/lib/timeout
- mkdir -p `dirname $@`
- -fwk/lib/timeout 25 $(GPSIM) -i -s $< -c $(PORTS_DIR)/pic16/gpsim.cmd > $@ || \
+%.out: %$(EXEEXT) $(CASES_DIR)/timeout
+ mkdir -p $(dir $@)
+ -$(CASES_DIR)/timeout 25 $(GPSIM) -i -s $< -c $(PORTS_DIR)/pic16/gpsim.cmd > $@ || \
echo -e --- FAIL: \"timeout, simulation killed\" in $(<:$(EXEEXT)=.c)"\n"--- Summary: 1/1/1: timeout >> $@
- python get_ticks.py < $@ >> $@
+ python $(srcdir)/get_ticks.py < $@ >> $@
-grep -n FAIL $@ /dev/null || true
-fwk/lib/timeout: fwk/lib/timeout.c
+$(CASES_DIR)/timeout: fwk/lib/timeout.c
+ $(CC) $< -o $@
_clean:
- rm -f fwk/lib/timeout fwk/lib/timeout.exe $(PORTS_DIR)/$(PORT)/*.rel $(PORTS_DIR)/$(PORT)/*.rst \
- $(PORTS_DIR)/$(PORT)/*.lst $(PORTS_DIR)/$(PORT)/*.sym $(PORTS_DIR)/$(PORT)/*.asm \
- $(PORTS_DIR)/$(PORT)/*.lnk $(PORTS_DIR)/$(PORT)/*.map $(PORTS_DIR)/$(PORT)/*.mem
# path to uCsim
# path to uCsim
-SZ80A = $(SDCC_DIR)/sim/ucsim/z80.src/sz80
-SZ80B = $(SDCC_DIR)/bin/sz80
+SZ80A = $(top_builddir)sim/ucsim/z80.src/sz80
+SZ80B = $(top_builddir)bin/sz80
UCZ80 = $(shell if [ -f $(SZ80A) ]; then echo $(SZ80A); else echo $(SZ80B); fi)
-SDCCFLAGS +=-mz80 --less-pedantic --profile -DREENTRANT=
+SDCCFLAGS +=-mz80 --less-pedantic --profile -DREENTRANT= -I$(top_srcdir)
#SDCCFLAGS +=--less-pedantic -DREENTRANT=reentrant
LINKFLAGS = --nostdlib
LINKFLAGS += z80.lib
-LIBDIR = $(SDCC_DIR)/device/lib/build/z80
+LIBDIR = $(top_builddir)device/lib/build/z80
#OBJEXT = .o
EXEEXT = .ihx
-EXTRAS = $(PORTS_DIR)/$(PORT)/testfwk$(OBJEXT) $(PORTS_DIR)/$(PORT)/support$(OBJEXT)
+EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT)
# Rule to link into .ihx
%.ihx: %.c $(EXTRAS)
$(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L $(LIBDIR) $(EXTRAS) $< -o $@
-%$(OBJEXT): %.asm
- $(SDCC_DIR)/bin/as-z80 -plosgff $@ $<
+$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.asm
+ $(top_builddir)bin/as-z80 -plosgff $@ $<
%$(OBJEXT): %.c
$(SDCC) $(SDCCFLAGS) -c $< -o $@
-$(PORTS_DIR)/$(PORT)/%$(OBJEXT): fwk/lib/%.c
+$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.c
+ $(SDCC) $(SDCCFLAGS) -c $< -o $@
+
+$(PORT_CASES_DIR)/%$(OBJEXT): fwk/lib/%.c
$(SDCC) $(SDCCFLAGS) -c $< -o $@
# run simulator with 10 seconds timeout
-%.out: %$(EXEEXT) fwk/lib/timeout
- mkdir -p `dirname $@`
- -fwk/lib/timeout 10 $(UCZ80) $< < $(PORTS_DIR)/$(PORT)/uCsim.cmd > $@ \
+%.out: %$(EXEEXT) $(CASES_DIR)/timeout
+ mkdir -p $(dir $@)
+ -$(CASES_DIR)/timeout 10 $(UCZ80) $< < $(PORTS_DIR)/$(PORT)/uCsim.cmd > $@ \
|| echo -e --- FAIL: \"timeout, simulation killed\" in $(<:$(EXEEXT)=.c)"\n"--- Summary: 1/1/1: timeout >> $@
- python get_ticks.py < $@ >> $@
+ python $(srcdir)/get_ticks.py < $@ >> $@
-grep -n FAIL $@ /dev/null || true
-fwk/lib/timeout: fwk/lib/timeout.c
+$(CASES_DIR)/timeout: fwk/lib/timeout.c
+ $(CC) $< -o $@
_clean:
- rm -f ports/$(PORT)/testfwk.asm ports/$(PORT)/*.lst ports/$(PORT)/*.o ports/$(PORT)/*.sym
-
# Port specification for the xa51 port running with uCsim
# path to uCsim
-SXA_A = $(SDCC_DIR)/sim/ucsim/xa.src/sxa
-SXA_B = $(SDCC_DIR)/bin/sxa
+SXA_A = $(top_builddir)sim/ucsim/xa.src/sxa
+SXA_B = $(top_builddir)bin/sxa
SXA = $(shell if [ -f $(SXA_A) ]; then echo $(SXA_A); else echo $(SXA_B); fi)
-SDCCFLAGS +=-mxa51 --less-pedantic -DREENTRANT=
+SDCCFLAGS +=-mxa51 --less-pedantic -DREENTRANT= -I$(top_srcdir)
OBJEXT = .rel
EXEEXT = .hex
-EXTRAS = $(PORTS_DIR)/$(PORT)/testfwk$(OBJEXT) $(PORTS_DIR)/$(PORT)/support$(OBJEXT)
+EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT)
# Rule to link into .hex
%$(EXEEXT): %$(OBJEXT) $(EXTRAS)
$(SDCC) $(SDCCFLAGS) $(EXTRAS) $< -o $@
- mv fwk/lib/testfwk.hex $@
- mv fwk/lib/testfwk.map $(@:.hex=.map)
%$(OBJEXT): %.c
$(SDCC) $(SDCCFLAGS) -c $< -o $@
-$(PORTS_DIR)/$(PORT)/%$(OBJEXT): fwk/lib/%.c
+$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.c
+ $(SDCC) $(SDCCFLAGS) -c $< -o $@
+
+$(PORT_CASES_DIR)/%$(OBJEXT): fwk/lib/%.c
$(SDCC) $(SDCCFLAGS) -c $< -o $@
# run simulator with 1 second timeout
-%.out: %$(EXEEXT) fwk/lib/timeout
- mkdir -p `dirname $@`
- -fwk/lib/timeout 1 $(SXA) -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/xa51/uCsim.cmd >/dev/null || \
+%.out: %$(EXEEXT) $(CASES_DIR)/timeout
+ mkdir -p $(dir $@)
+ -$(CASES_DIR)/timeout 1 $(SXA) -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/xa51/uCsim.cmd >/dev/null || \
echo -e --- FAIL: \"timeout, simulation killed\" in $(<:.ihx=.c)"\n"--- Summary: 1/1/1: timeout >> $@
-grep -n FAIL $@ /dev/null || true
-fwk/lib/timeout: fwk/lib/timeout.c
+$(CASES_DIR)/timeout: fwk/lib/timeout.c
+ $(CC) $< -o $@
_clean:
- rm -f fwk/lib/timeout fwk/lib/timeout.exe $(PORTS_DIR)/$(PORT)/*.rel $(PORTS_DIR)/$(PORT)/*.rst \
- $(PORTS_DIR)/$(PORT)/*.lst $(PORTS_DIR)/$(PORT)/*.sym $(PORTS_DIR)/$(PORT)/*.xa $(PORTS_DIR)/$(PORT)/*.lnk
-
-
RRZ80 = $(SDCC_EXTRA_DIR)/emu/rrz80/rrz80
-SDCCFLAGS +=-mz80 --nostdinc --less-pedantic --profile -DREENTRANT=
+SDCCFLAGS +=-mz80 --nostdinc --less-pedantic --profile -DREENTRANT= -I$(top_srcdir)
LINKFLAGS = --nostdlib
LINKFLAGS += z80.lib
-LIBDIR = $(SDCC_DIR)/device/lib/build/z80
+LIBDIR = $(top_builddir)device/lib/build/z80
EXEEXT = .bin
# Needs parts of gbdk-lib, namely the internal mul/div/mod functions.
-EXTRAS = ports/$(PORT)/testfwk$(OBJEXT) ports/$(PORT)/support$(OBJEXT)
+EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT)
# Rule to generate a Emulator .bin file from the .ihx linker output.
%$(EXEEXT): %.ihx
- $(SDCC_DIR)/bin/makebin -s 32768 < $< > $@
+ $(top_builddir)bin/makebin -s 32768 < $< > $@
# Rule to link into .ihx
%.ihx: %.c $(EXTRAS)
$(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L $(LIBDIR) $(EXTRAS) $< -o $@
-%$(OBJEXT): %.asm
- $(SDCC_DIR)/bin/as-z80 -plosgff $@ $<
+$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.asm
+ $(top_builddir)bin/as-z80 -plosgff $@ $<
%$(OBJEXT): %.s
- $(SDCC_DIR)/bin/as-z80 -plosgff $@ $<
+ $(top_builddir)bin/as-z80 -plosgff $@ $<
%$(OBJEXT): %.c
$(SDCC) $(SDCCFLAGS) -c $< -o $@
-ports/$(PORT)/%$(OBJEXT): fwk/lib/%.c
+$(PORT_CASES_DIR)/%$(OBJEXT): fwk/lib/%.c
$(SDCC) $(SDCCFLAGS) -c $< -o $@
# PENDING: Path to sdcc-extra
%.out: %$(EXEEXT)
- mkdir -p `dirname $@`
+ mkdir -p $(dir $@)
$(RRZ80) --maxruntime=3 --mapfile=$(<:.bin=.sym) $< > $@
-grep -n FAIL $@ /dev/null || true
_clean:
- rm -f ports/$(PORT)/testfwk.asm ports/$(PORT)/*.lst ports/$(PORT)/*.o ports/$(PORT)/*.sym
-
#define type_{type}
#if defined(PORT_HOST)
-# include "../../../../../sdccconf.h"
+# include "sdccconf.h"
# define mullong(a,b) mullong_wrapper(a,b)
# if defined(type_c) && !defined(WORDS_BIGENDIAN)
# define _SDCC_NO_ASM_LIB_FUNCS 1
# define near
# define long int
-# include "../../../../../device/lib/_mullong.c"
+# include "device/lib/_mullong.c"
# endif
#else
# if defined(type_c)
# define _SDCC_NO_ASM_LIB_FUNCS 1
# endif
-# include "../../../../../device/lib/_mullong.c"
+# include "device/lib/_mullong.c"
# define mullong _mullong
#endif
include_dir_suffix=include \
lib_dir_suffix=lib \
sdccconf_h_dir_separator=\\\\ \
---disable-device-lib-build \
+--disable-device-lib \
--disable-ucsim \
--host=i586-mingw32msvc --build=unknown-unknown-linux-gnu"
+++ /dev/null
-.SILENT:
-
-TESTS_DIR = tests
-RESULTS_DIR = results
-PORTS_DIR = ports
-BUILD_DIR = gen
-ALL_PORTS = host mcs51 mcs51-large mcs51-stack-auto ds390 z80 hc08
-
-ALL_TESTS = $(shell find $(TESTS_DIR) -name "*.c")
-
-PORT_RESULTS_DIR = $(RESULTS_DIR)/$(PORT)
-PORT_RESULTS = $(ALL_TESTS:$(TESTS_DIR)/%.c=$(PORT_RESULTS_DIR)/%.out)
-PORT_BUILD_DIR = $(BUILD_DIR)/$(PORT)
-
-all: test-ports
-
-test-ports:
- for i in $(ALL_PORTS); do $(MAKE) test-port PORT=$$i; done
-
-test-mcs51:
- $(MAKE) test-port PORT=mcs51
-
-test-port: port-results
-
-clean: clean-gen
- rm -rf $(RESULTS_DIR) *.pyc
- rm -rf $(BUILD_DIR)
-
-clean-gen:
- for i in $(ALL_PORTS); do $(MAKE) clean-port PORT=$$i; done
-
-clean-port:
- rm -rf $(PORT_BUILD_DIR)
-
-$(PORT_RESULTS_DIR)/%.out: $(TESTS_DIR)/%.c
- echo Processing $<
- python valdiag.py $(PORT) $< $(PORT_BUILD_DIR)/$* > $@
-
-port-results: port-dirs $(PORT_RESULTS)
- echo Summary for \'$(PORT)\': `cat $(PORT_RESULTS) | \
- python ../regression/collate-results.py`
-
-port-dirs:
- mkdir -p $(PORT_RESULTS_DIR)
- mkdir -p $(PORT_BUILD_DIR)
--- /dev/null
+.SILENT:
+
+VPATH = @srcdir@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
+
+TESTS_DIR = $(srcdir)/tests
+RESULTS_DIR = results
+PORTS_DIR = $(srcdir)/ports
+BUILD_DIR = gen
+ALL_PORTS = host mcs51 mcs51-large mcs51-stack-auto ds390 z80 hc08
+
+ALL_TESTS = $(shell find $(TESTS_DIR) -name "*.c")
+
+PORT_RESULTS_DIR = $(RESULTS_DIR)/$(PORT)
+PORT_RESULTS = $(ALL_TESTS:$(TESTS_DIR)/%.c=$(PORT_RESULTS_DIR)/%.out)
+PORT_BUILD_DIR = $(BUILD_DIR)/$(PORT)
+
+all: test-ports
+
+test-ports:
+ for i in $(ALL_PORTS); do $(MAKE) test-port PORT=$$i; done
+
+test-mcs51:
+ $(MAKE) test-port PORT=mcs51
+
+test-port: port-results
+
+clean: clean-gen
+ rm -rf $(RESULTS_DIR) *.pyc
+ rm -rf $(BUILD_DIR)
+
+distclean: clean
+ rm -r Makefile
+
+clean-gen:
+ for i in $(ALL_PORTS); do $(MAKE) clean-port PORT=$$i; done
+
+clean-port:
+ rm -rf $(PORT_BUILD_DIR)
+
+$(PORT_RESULTS_DIR)/%.out: $(TESTS_DIR)/%.c
+ echo Processing $<
+ python $(srcdir)/valdiag.py $(PORT) $< $(PORT_BUILD_DIR)/$* > $@
+
+port-results: port-dirs $(PORT_RESULTS)
+ echo Summary for \'$(PORT)\': `cat $(PORT_RESULTS) | \
+ python $(srcdir)/../regression/collate-results.py`
+
+port-dirs:
+ mkdir -p $(PORT_RESULTS_DIR)
+ mkdir -p $(PORT_BUILD_DIR)