Enabled VPATH feature: changed nearly all Makefiles (149 files).
[fw/sdcc] / support / regression / ports / mcs51-stack-auto / spec.mk
index 780846c0b500ba31803ca852a4a127f394cd214f..fe4cdc623014ef7b11409edc58f6e2172aea50e9 100644 (file)
@@ -2,51 +2,12 @@
 #
 # model small stack-auto
 
-LIBSRCDIR = ../../device/lib
-LIBDIR    = gen/$(PORT)/lib
-
-LIBSDCCFLAGS+=--stack-auto
-SDCCFLAGS   +=$(LIBSDCCFLAGS) --int-long-reent --float-reent --nostdlib -L$(LIBDIR) -llibsdcc -llibint -lliblong -llibfloat
-
-# copy support.c
-$(PORTS_DIR)/$(PORT)/%.c: $(PORTS_DIR)/mcs51/%.c
-       cp $< $@
+SDCCFLAGS +=--stack-auto
 
 include $(PORTS_DIR)/mcs51/spec.mk
 
-SOURCES = _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 \
-          _fs2uchar.c _fs2uint.c _fs2ulong.c _fsadd.c \
-          _fsdiv.c _fseq.c _fsgt.c _fslt.c _fsmul.c \
-          _fsneq.c _fssub.c _gptrget.c _gptrput.c \
-          _sint2fs.c _iscntrl.c _isdigit.c _isgraph.c \
-          _islower.c _isprint.c _ispunct.c _isspace.c \
-          _isupper.c _isxdigit.c _slong2fs.c _memcmp.c \
-          _memcpy.c _memset.c _modsint.c _modslong.c \
-          _moduint.c _modulong.c _mulint.c _mullong.c \
-          _ser.c _setjmp.c \
-          _spx.c _startup.c _strchr.c _strcmp.c _strcpy.c \
-          _strcspn.c _strlen.c _strncat.c _strncmp.c \
-          _strncpy.c _strpbrk.c _strrchr.c _strspn.c \
-          _strstr.c _strtok.c _uchar2fs.c _uint2fs.c \
-          _ulong2fs.c malloc.c serial.c ser_ir.c printfl.c \
-          printf_large.c vprintf.c puts.c gets.c \
-          assert.c _strcat.c time.c printf_fast.c bpx.c
-
-OBJECTS = $(patsubst %.c,$(LIBDIR)/%.rel,$(SOURCES))
-
-make-library: $(LIBDIR) $(OBJECTS) lib-files
-
-
-$(LIBDIR):
-       mkdir -p $(LIBDIR)
-
-$(LIBDIR)/%.rel: $(LIBSRCDIR)/%.c
-       -$(SDCC) -I../../device/include $(LIBSDCCFLAGS) -c $< \
-        && mv -f $(<:.c=.rel) $@ \
-        && mv -f $(<:.c=.asm) $(@:.rel=.asm) \
-        && mv -f $(<:.c=.lst) $(@:.rel=.lst)
+# use C sources from mcs51
+$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/mcs51/%.c
+       $(SDCC) $(SDCCFLAGS) -c $< -o $@
 
-lib-files:
-       cp $(LIBSRCDIR)/*.lib $(LIBDIR)
+LIBDIR = $(top_builddir)device/lib/build/small-stack-auto