top_builddir = @top_builddir@
VPATH = @srcdir@
-include $(top_builddir)Makefile.common
+include $(top_builddir)/Makefile.common
USE_ALT_LEX = 0
LIBS = -lm @LIBS@
#CFLAGS += -Werror
-CPPFLAGS += -I$(srcdir) @CPPFLAGS@
+CPPFLAGS += -I$(srcdir)
+LDFLAGS = @LDFLAGS@
ifdef SDCC_SUB_VERSION
CFLAGS += -DSDCC_SUB_VERSION_STR=\"$(SDCC_SUB_VERSION)\"
endif
-SLIBOBJS = SDCCerr.o NewAlloc.o MySystem.o BuildCmd.o dbuf.o findme.o
+SLIBOBJS = NewAlloc.o MySystem.o BuildCmd.o dbuf.o dbuf_string.o findme.o
OBJECTS = SDCCy.o SDCChasht.o SDCCmain.o \
SDCCsymt.o SDCCopt.o SDCCast.o SDCCmem.o SDCCval.o \
SDCCicode.o SDCCbitv.o SDCCset.o SDCClabel.o \
SDCCBBlock.o SDCCloop.o SDCCcse.o SDCCcflow.o SDCCdflow.o \
SDCClrange.o SDCCptropt.o SDCCpeeph.o SDCCglue.o \
- asm.o SDCCmacro.o SDCCutil.o SDCCdebug.o cdbFile.o SDCCdwarf2.o
+ SDCCasm.o SDCCmacro.o SDCCutil.o SDCCdebug.o cdbFile.o SDCCdwarf2.o\
+ SDCCerr.o
SPECIAL = SDCCy.h
ifeq ($(USE_ALT_LEX), 1)
SLIBSOURCES = $(patsubst %.o,$(SLIB)/%.c,$(SLIBOBJS))
SOURCES = $(patsubst %.o,%.c,$(OBJECTS))
-TARGET = $(top_builddir)bin/sdcc$(EXEEXT)
+TARGET = $(top_builddir)/bin/sdcc$(EXEEXT)
# Compiling entire program or any subproject
# ------------------------------------------
FORCE:
-$(top_builddir)support/gc/libgc.a:
- $(MAKE) -C $(top_builddir)support/gc
+$(top_builddir)/support/gc/libgc.a:
+ $(MAKE) -C $(top_builddir)/support/gc
# Compiling and installing everything and runing test
# ---------------------------------------------------
# don't include Makefile.dep for the listed targets:
ifeq "$(findstring $(MAKECMDGOALS),uninstall check installcheck installdirs checkconf \
clean distclean mostlyclean realclean)" ""
- include Makefile.dep
+ -include Makefile.dep
endif
include $(srcdir)/clean.mk
# Remaking configuration
# ----------------------
checkconf:
- @if [ -f $(top_builddir)devel ]; then\
+ @if [ -f $(top_builddir)/devel ]; then\
$(MAKE) -f $(srcdir)/conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" \
freshconf;\
fi